Domain Modeling: Exercise II
Hopefully you're getting a little more comfortable with understanding domain modeling. In this exercise, we'll try to model everyone's favorite photo sharing social network. It may seem simple at first, but it's more complicated than it seems.
Tacostagram will be all the rage when it launches. People from around the world will be able to create a constantly evolving feed of photos of their favorite tacos. People will be able to "like" photos of tacos and write comments about each photo. Eventually, we will sell it to technology behemoth MetaTaco for $1 billion.
- As a user, I want to create time-stamped posts of tacos, so that I can share them in a "feed" for the world to see.
- As a user, I want to be able to "like" another user's post, so the author of the post and others will know that I liked it.
- As a user, I want to be able to see how many likes a post has, so I can see how popular it is.
- As a user, I want to not be able to like a post more than once, so I cannot artificially inflate the popularity of a post.
- As a user, I want to be able to comment (and see other's comments) on a post, so I can engage in conversation with the author and others.
- As a user, I want to be able to "follow" another user, so that I can stay up-to-date on certain users' updates.
- As a user, I want to see only my followed users' posts in my feed, so I can only see posts that I'm interested in.
- As a user, I want to sign up with my username (screen name), real name, and location, so that other people will see that information when visiting my profile.
Note: we are going to ignore the mechanics of how a photo gets uploaded and stored, and simply use a filename for the time being, e.g. tacos.jpg.
As with the last exercise, jot down your domain model visually first, then move on to the physical creation of the SQLite database.