Explain Model View and Controller Pattern

1 view
Skip to first unread message

Rohit Ghatol

unread,
Dec 16, 2007, 10:12:26 PM12/16/07
to Pune Java Puzzles
Explain Model, View and Controller Pattern. Do not use Struts any
where when you explain this, we want a very independent answer.

Pratham

unread,
Feb 1, 2008, 5:57:43 AM2/1/08
to Pune Java Puzzles
As far as MVC2 is concerned

The request first goes to the main controller (Normally a Servlet but
can also be JSP). The controller decides depending on business logic
as to which models need to be invoked and redirects/forwards the
request to a particular view.

View is only used for presentation and display. It does contain any
buisness logic and access the invoked model fet its data.

Model is a Java Bean with appropriate getter and setter methods.
Ideally it is only used as a value holder.
Reply all
Reply to author
Forward
0 new messages