STRUTS/MVS in J2EE Exposed !!!

Most developers adopt MVC for developing applications in J2EE, at the application level MVC ( Model View Control ) would mean

View –    Presentation Layer ( JSP, Servlet, CSS, HTML , AJAX etc )

Control – Business Logic ( EJB, MDB ( JMS) etc)

Model – Persistance layer ( DB, XML etc )

In J2EE Presentation layer we again follow MVC. here MVC is would be

View – The UI aka the screen, here we are worried about formatting data in a presentable way to the user (  JSPs, CSS, and taglibs like the JSTL)

Model – The model is the data. In a “View Cars” screen, the model is a Plain Old Java Object (POJO) or a simple Java Bean

Control – The controller mediates communication between the View and the Model. If a  request comes in, it retrieves the Java Beans from the persistence layer and hands them to the view. In a web application, the controller generally is a servlet.

Most of the popular presentation layer frameworks such as Struts, JSF, Webwork or  Tapestry adopt similar philosophies, they differ in Implementation.

Reference – “Java at Work A Practicle Guide” a OReally Book

Advertisements

Leave a comment

Filed under j2ee

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s