Consider a program for reading and posting to a simple online forum. What things is such a program concerned with? Users, posts, discussion threads, and ratings. There might be other things, but those are probably the heart of the program's model. They all might be stored in a database on the server, but on the client side they will each deserve a class of their own (User
, Post
, etc.). Then the client-side Model might consist of, say, the current User
and a List<DiscussionThread>
(which in turn might include a List<Post>
).
What Views would this project need to show Model content? A View for a list of discussion threads, a View for a list of posts in a given thread, and perhaps a View for the contents of an individual post.
That's plenty of variety to give you a thorough opportunity to grapple with MVC's ins and outs.
This sort of program has the additional complexity of having both a Java client and a server side to provide access to the database, so make sure you're ready to deal with that. If you are, then some other possibilities include calendars, to-do lists, and similar utility applications.
Many arcade games have a non-trivial game state. Tetris, for example, has a Model consisting of a game board with occupied spaces, a current piece in motion, a current score, an upcoming piece, a historical list of high scores, etc. Views include the depiction of the main board, the picture of the upcoming piece, a timer, a score, music, and so on.
An Asteroids Model might have a list of rocks, a spaceship, and a list of bullets, plus high scores, etc.
John Conway's Game of Life describes a simple system of rules modeling birth and death of cells in a 2D grid. Conway's rules generate beautiful and fascinating evolution of populations. The Game of Life was one of the earliest examples in the general category of cellular automata.
You might create a program that runs Game of Life simulations, but also collects running statistics on the simulation. For example, one View could show the population of cells, while another could show a graph over time of the population density.
There are lots of other cool things to do with simulations, cellular or otherwise. This predator-prey simulation, for example, allows the user to specify birth rates and death rates of two interacting species, and has both a view of the full current population and a graphical view of population levels.
Similarly, a program that generates Julia sets based on user-entered parameters, or that allows the user to explore the Mandelbrot set, could give you simultaneous views at more than one level of resolution.
Like Newtonian mechanics? You could simulate the gravitational interactions in a 3-body problem with user-specified initial masses, positions, and velocities. Again, one View would show the bodies in motion, while another could graph each body's speed or kinetic energy or the current distances between bodies or something else interesting.