The Workshop is designed to help you review what you have learned and help you further increase your understanding of the material covered in this hour.
What is the essential difference between Model 1 and Model 2 architectures?
What's the difference between the Model, View and Controller in MVC?
What are some of the benefits of MVC?
In a Model 1 architecture, a JSP is responsible for the control of the application. It also generates the content. In Model 2, these responsibilities are delegated to specialized components.
The Model represents the attributes and behavior of the application. The View represents the presentation of information produced by the application. The Controller defines how the user interface responds to user input. In a typical Web application, the model is represented by business components such as JavaBeans, Enterprise JavaBeans, or specialized classes. The controller is usually a servlet and the view is constructed using JSPs and occasionally servlets.
MVC was designed to provide flexibility. In many cases, the view is the component that is swapped out. For example, using the same underlying model, it's possible to use several views to interact with different clients—or even one client. If you've used Swing, you've seen MVC in action. You can change out the look and feel dynamically.
Write a controller that implements basic security for an application.
Extend the application above to handle different classes of users, directing them to pages that are distinct for each type.