Pages

Thursday, December 8, 2011

Model 2 Overview

Model 2 is based on the Model-View-Controller (MVC) design pattern, the main concept behind the Smalltalk-80 user interface. Because the term "Design Pattern" was not in exist at that time, the named was MVC paradigm.
An application implementing the MVC pattern consists of three modules: model, view, and controller.

View takes care of display or client side of the application.
Model is nothing but the application data and business logic encapsulated.
Controller is responsible for receive/ response client request and forward client request to particular model.

In Model 2, POJOs are act as model both in struts 2 and struts 2, where as, servlet and filters act as controller. Struts 1 employs servlet controller and struts 2 uses filter. Finally JSP act as a view in both struts version.  There are some more technologies we can use instead of JSP.
Freemarker, is well-supported but there are a few issues when using some of the S2 tags because of the way FreeMarker works.
Velocity's support is there, but has somewhat tapered off. 

It recommended that either to use JSP or freemarker.
 



No comments:

Post a Comment