The domain model was the next thing we planned to work on. We wanted to sketch it out first before diving into library details. We also looked at the datamodel of core themoviedb data to confirm that it matched our expectations.
In Java code this looks pretty straightforward:
class Movie { int id; String title; int year; Set<Role> cast; } class Actor { int id; String name; Set<Movie> filmography; Role playedIn(Movie movie, String role); } class Role { Movie movie; Actor actor; String role; } class User { String login; String name; String password; Set<Rating> ratings; Set<User> friends; Rating rate(Movie movie, int stars, String comment); void befriend(User user); } class Rating { User user; Movie movie; int stars; String comment; }
We then wrote some tests to show the basic plumbing works.