What Is Model-View-Controller?

The Model-View-Controller (MVC) paradigm is a way to partition your user interface so it's easier to write and maintain. The idea is that you start with a model—a set of classes representing the data you're working with. Next, you construct various views of the data—classes that display the data on the screen. Finally, you create a controller object that accepts user input and updates the model or view.

Figure 42.1 illustrates the idea behind MVC.

Figure 42.1. A view displays data from the model, and the controller accepts input to change the model.

If you have ever written GUI programs before, you know how convoluted ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.