P. 1
MELJUN CORTES JEDI-Software Engineering Instructor's Manual (V1.2)

MELJUN CORTES JEDI-Software Engineering Instructor's Manual (V1.2)

|Views: 153|Likes:
MELJUN CORTES JEDI-Software Engineering Instructor's Manual (V1.2)
MELJUN CORTES JEDI-Software Engineering Instructor's Manual (V1.2)

More info:

Published by: MELJUN CORTES, MBA,MPA on Oct 19, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less







Enterprise applications need to support multiple types of users with multiple types of
interfaces. For one application, it may require an HTML from for web customers, a WML
from for wireless customers, a Java Swing Interface for administrators, and an XML-
based Web services for suppliers. The forces behind this pattern are as follows:

•The same enterprise data needs to be accessed by different views.

•The same enterprise data needs to be updated through different interactions.

•The support of multiple types of views and interactions should not impact the
components that provide the core functionality of the enterprise application.


The application presents contents to users in numerous pages containing various data.


The Model-View-Controller (MVC) is a widely used design pattern for interactive
applications. It divides functionality among objects involved in maintaining and
presenting data to minimize the degree of coupling between the objects. It divides the
application into three, namely, model, view and controller.
1.Model. It represents enterprise data and the business rules that govern
access to and updates to this data. It serves as a software approximation of
real-world process, so simple real-world modeling techniques apply when
defining the model.
2.View. It renders the contents of a model. It accesses enterprise data
through the model and specifies how that data is presented to the actors. It is
responsible for maintaining the consistency in its presentation when the
underlying model changes. It can be achieved through a push model, where
the view registers itself with the model for change notifications or a pull model,
where the view is responsible for calling the model when it needs to retrieve
the most current data.
3.Controller. It translates interactions with the view into actions to be
performed by the model. In a stand-alone GUI client, it can be clicks on
buttons or menu selections. For Web application, they appear as GET and
POST HTTP requests. The actions performed on the model can be activating
device, business process or changing the state of a model.
Figure 4.21 shows the Model-View-Controller Design Pattern.

Software Engineering



The strategies by which MVC can be implemented are as follows:

•For Web-based clients such as browsers, use Java Server Pages (JSP) to
render the view, Servlet as the controller, and Enterprise JavaBeans (EJB)
components as the model.

•For Centralized controller, instead of having multiple servlets as controller, a
main servlet is used to make control more manageable. The Front-Controller
pattern can be a useful pattern for this strategy.

Software Engineering


Figure 4.21 Model-View-Controller Design Pattern


enterprise data
business rules
-maintains application


-defines application
-routes user commands
to Model updates
-selects Views for


-renders the Model
-accesses enterprise data
-relays user actions to the

Query State

Change State

Select View

Notify Changes

User Actions

Method Call


You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->