Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is MVC Architecture?

Answer Posted / sudheer reddy a

The main aim of the MVC architecture is to separate the
business logic and application data from the presentation
data to the user.

Here are the reasons why we should use the MVC design pattern.

1. They are resuable : When the problems recurs, there is
no need to invent a new solution, we just have to follow the
pattern and adapt it as necessary.
2. They are expressive: By using the MVC design pattern
our application
becomes more expressive.

1). Model: The model object knows about all the data that
need to be displayed. It is model who is aware about all the
operations that can be applied to transform that object. It
only represents the data of an application. The model
represents enterprise data and the business rules that
govern access to and updates of this data. Model is not
aware about the presentation data and how that data will be
displayed to the browser.
2). View : The view represents the presentation of the
application. The view object refers to the model. It uses
the query methods of the model to obtain the contents and
renders it. The view is not dependent on the application
logic. It remains same if there is any modification in the
business logic. In other words, we can say that it is the
responsibility of the of the view's to maintain the
consistency in its presentation when the model changes.

3). Controller: Whenever the user sends a request for
something then it always go through the controller. The
controller is responsible for intercepting the requests from
view and passes it to the model for the appropriate action.
After the action has been taken on the data, the controller
is responsible for directing the appropriate view to the
user. In GUIs, the views and the controllers often work
very closely together.

Difference between Model 1 and Model 2 architecture:

Features of MVC1:

1. Html or jsp files are used to code the presentation.
To retrieve the data JavaBean can be used.
2. In mvc1 archictecture all the view, control elements
are implemented using Servlets or Jsp.
3. In MVC1 there is tight coupling between page and model
as data access is usually done using Custom tag or through
java bean call.

Features of MVC2:

1. The MVC2 architecture removes the page centric
property of MVC1 architecture by separating Presentation,
control logic and the application state.
2. In MVC2 architecture there is only one controller
which receives all the request for the application and is
responsible for taking appropriate action in response to
each request.

Is This Answer Correct ?    5 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can duplicate form submission be handled in struts 2?

1039


Why do the struts tags provide for so little formatting?

1017


What are the classes used in struts?

1150


Can we use struts and spring together?

1051


Can I have html form property without associated getter and setter formbean methods?

1077


What do you mean by actionmapping?

1011


How can we upload files in Struts2 application?

1085


What’s the difference between struts and turbine?

1306


List some struts tag libraries?

1004


What is lookupdispatchaction?

1080


What is actioncontext?

1009


What is the purpose of @emailvalidator?

1031


How to handle exceptions in structs?

1209


Is Struts Framework part of J2EE?

1077


What is the role of action class?

1085