MVC Notes

MVC Notes - MVC Model-View-Controller"MVC is the Blueprint...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
MVC Model-View-Controller ("MVC") is the Blueprint recommended architectural design pattern for interactive applications. MVC, organizes an interactive application into three separate modules: one for the application model with its data representation and business logic, the second for views that provide data presentation and user input, and the third for a controller to dispatch requests and control flow. Most Web- tier application frameworks use some variation of the MVC design pattern. MVC benefits The MVC design pattern provides a host of design benefits: MVC separates design concerns (data persistence and behavior, presentation, and control) Decreases code duplication Centralizes control Makes the application more easily modifiable. Also helps developers with different skill sets to focus on their core skills and collaborate through clearly defined interfaces. For example, a J2EE application project may include developers of custom tags, views, application logic, database functionality, and networking. An MVC design can centralize control of such application facilities as security, logging, and screen flow. New data sources are easy to add to an MVC application by creating code that adapts the new data source to the view API. Similarly, new client types are easy to add by adapting the new client type to operate as an MVC view. MVC clearly defines the responsibilities of participating classes, making bugs easier to track down and eliminate. A J2EE application's Web tier serves HTTP requests. At the highest level, the Web tier does four basic things in a specific order: interprets client requests, dispatches those requests to business logic, selects the next view for display, and generates and delivers the next view. Figure The Web-Tier Service Cycle The Web-tier controller receives each incoming HTTP request and invokes the requested business logic operation in the application model. Based on the results of the operation and state of the model, the controller then selects the next view to display. Finally, the controller generates the selected view and transmits it to the client for presentation.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
An enterprise application's Web tier commonly has the following requirements: An application design must have a strategy for serving current and future client types. A Web-tier controller must be maintainable and extensible. Its tasks include mapping requests to application model operations, selecting and assembling views, and managing screen flow. Good structure can minimize code complexity. Application model API design and technology selection have important implications for an application's complexity, scalability, and software quality. Choosing an appropriate technology for generating dynamic content improves
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 14

MVC Notes - MVC Model-View-Controller"MVC is the Blueprint...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online