07 MVC
07 MVC
MVC Architecture
• MVC: Model-View-Controller Architecture
• No MVC
• MVC Model 1 (Page-centric)
• MVC Model 2 (Servlet-centric)
• Web application frameworks
– Example: Struts
• Standard-based Web application framework
– JavaServer Faces (JSR-127)
MVC1: Page-centric
MVC2: Servlet-centric
Web-Application Frameworks
• Web-tier applications share common set of functionality:
– Dispatching HTTP requests
– Invoking model methods
– Selecting and assembling views
• Why a Framework?
– Provide classes and interfaces that can be extended by developers
– Frameworks hide the details
– Don't repeat yourself
– Rapid application Development (provide classes and interfaces that can be
extended by developers)
– Easily replace any component
• Examples of Frameworks:
– Apache Struts
– Grails
– Django
– CakePHP
– Ruby on Rails
– Catalyst
– ... ... many others
MVC model using
Servlets&JSP
Steps…