What is MVC Architecture?

Answer Posted / shiva

Model–View–Controller (MVC) is a software architecture ,
currently considered an architectural pattern used in
software engineering. The pattern isolates "domain logic"
(the application logic for the user) from input and
presentation (GUI), permitting independent development,
testing and maintenance of each.
The model is the domain-specific representation of the data
upon which the application operates. Domain logic adds
meaning to raw data (for example, calculating whether today
is the user's birthday, or the totals, taxes, and shipping
charges for shopping cart items). When a model changes its
state, it notifies its associated views so they can refresh.
Many applications use a persistent storage mechanism such as
a database to store data. MVC does not specifically mention
the data access layer because it is understood to be
underneath or encapsulated by the model. Models are not data
access objects; however, in very simple apps that have
little domain logic there is no real distinction to be made.
Also, the ActiveRecord is an accepted design pattern which
merges domain logic and data access code - a model which
knows how to persist itself.
The view renders the model into a form suitable for
interaction, typically a user interface element. Multiple
views can exist for a single model for different purposes.
The controller receives input and initiates a response by
making calls on model objects.
An MVC application may be a collection of
model/view/controller triplets, each responsible for a
different UI element.
MVC is often seen in web applications where the view is the
HTML or XHTML generated by the app. The controller receives
GET or POST input and decides what to do with it, handing
over to domain objects (i.e. the model) that contain the
business rules and know how to carry out specific tasks such
as processing a new subscription.

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find the struts version being used in a project?

710


Describe the basic steps used to create a tiles application?

791


What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?

792


What are action errors?

747


What are the some useful annotations introduced in struts2?

773


What do struts do?

727


What is the purpose of @beforeresult?

790


Which configuration files are used in struts?

711


What is the purpose of @requiredstringvalidator annotation?

700


What does i18n interceptor?

803


What is the purpose of @customvalidator annotation?

740


What are the features of struts 2?

735


Give an example of validates method used to avoid errors.

715


What is actionservlet?

755


What are inner class and anonymous class?

738