Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 420|Likes:
Published by api-3745771

More info:

Published by: api-3745771 on Oct 17, 2008
Copyright:Attribution Non-commercial


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





mvc architecture

the goal of the mvc design pattern is to separate the application object (model) from the
way it is represented to the user (view) from the way in which the user controls it

the model object knows about all the data that need to be displayed. it also knows about
all the operations that can be applied to transform that object. however, it knows nothing
whatever about the gui, the manner in which the data are to be displayed, nor the gui
actions that are used to manipulate the data. the data are accessed and manipulated
through methods that are independent of the gui. the model represents enterprise data and
the business rules that govern access to and updates of this data. often the model serves as
a software approximation to a real-world process, so simple
real-world modeling techniques apply when defining the model.

the view object refers to the model. it uses the query methods of the model to obtain data
from the model and then displays the information. a view renders the contents of a model.
it accesses enterprise data through the model and specifies how that data should be
presented. it is the view's responsibility to maintain consistency in its presentation when
the model changes.

the controller object knows about the physical means by which users manipulate data
within the model. a controller translates interactions with the view into actions to be
performed by the model. in a stand-alone gui client, user interactions could be button
clicks or menu selections, whereas in a web application, they appear as get and post http
requests. the actions performed by the model include activating business processes or
changing the state of the model. based on the user interactions and the outcome of the
model actions, the controller responds by selecting an appropriate view.

in guis, views and controllers often work very closely together. for example, a controller is responsible for updating a particular parameter in the model that is then displayed by a view. in some cases a single object may function as both a controller and a view. each controller-view pair is associated with only one model, however a particular model can have many view-controller pairs.

the mvc architecture has the following benefits:

1) multiple views using the same model: the separation of model and view allows
multiple views to use the same enterprise model. consequently, an enterprise application's
model components are easier to implement, test, and maintain, since all access to the
model goes through these components.

2) easier support for new types of clients: to support a new type of client, you simply
write a view and controller for it and wire them into the existing enterprise model.
3) clarity of design: by glancing at the model's public method list, it should be easy to

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)//-->