Can anyone briefly explain mvc1 and mvc2 and differences and which is best.

Questions by pbv_krishnamraju

Showing Answers 1 - 12 of 12 Answers

debabrat panda

  • Sep 25th, 2006
 

hi

m-model

v-view

c-controller

in mvc1(modle1) model all the code (your business logic and presentation logic) are written in a single jsp/servlet.for that reason mvc1 is diffcult to maintain.this is not a centarlize architecture.in mvc1 no controller concept.

but in mvc2 we separate the prestation tire and business tire.in mvc2 the presention tire is our jsp/html(view),servlet,action(controller),ejb,javabeans(model).

  Was this answer useful?  Yes

TRSP

  • Sep 27th, 2006
 

If the controller concept is not there in MVC1 means, then y is it called as MVC ?

  Was this answer useful?  Yes

Satish

  • Oct 10th, 2006
 

Hello TRSP.....The purpose of the Controller is to controll the flow of the Application, but in MVC1 architecture controller is handling the Bussiness logic alsowhereas in MVC2 model(javaneans, ejbs), view(jsps/html) and Controller(action)Hope i am clearRegards,Satish...

  Was this answer useful?  Yes

kalyani suda

  • Oct 13th, 2006
 

MVC1 architecture, the incoming request from a web browser is sent directly to the JSP page, which is responsible for processing it and replying back to the client. there is a still separation of presentation from content, because all data access is performed using beans.MVC2 architecture: it is a serverside implementation of the popular mvc design pattern. here, the processing is divided between presentation and front components. presentation components are JSP pages, thatgenerate the HTML/XML response that determines the user interface when rendered by the browser.. Front Components (also known as controllers) do not handle any presentation issues, but rather, process all the HTTP requests. here, they are responsible for creating any beans or objects used by the presentation components, as well as deciding, depending on the user's actions, which presentation component to forward the request to. front components can be implemented as either Servlet or JSP page.

  Was this answer useful?  Yes

HEpzi

  • Oct 19th, 2006
 

Hi All, In a nutshell, there was a tight coupling between model and view. Which was a hole in the security framework, which is fairly avoided in MVC2. MVC1 has a flow of Browser to JSP to Bean to DatabaseMVC2 has a flow of Browser to servlets to JSP/java classes to Bean to databaseMVC1 do not have any framework built on to readily use them, where as MVC2 has lot of frameworks built on it example: STRUTSI hope what said was clear enoughRegardsHepzi

  Was this answer useful?  Yes

Ami Patel

  • Oct 26th, 2006
 

Hi,

In MVC1 there was a controller but it was also handling business logic, which was not very efficient. While in MVC2 controller delegates the business logic processing to action classes and so just concentrates on handling requests and delegating processing to actions.

For example in Struts, Request Processor class is added which is just handling requests(i.e interrupting request  and delegating its processing to the action classes)..  comments are always welcome...

Regards,

Ami

  Was this answer useful?  Yes

Rajkumar

  • Nov 13th, 2006
 

Hi,In MVC1 architecture single component(For ex Servlet or JSP) is responsible for handling the entire process.When we make any request to the application the request is handled by the web component and it also takes the help of Beans in order to seperate the presentation logic from the web component...It increases the overload at the server as the single component is responsible for everything.To overcome this drawback Sun given another specification known as MVC2 Architecture.In MVC2 architecure the responisbilities are divided in such a way that MODElVIEW and CONTROLLER.Model is responsible for handling the process logicView is responsible for generating the response and is also responsible for prepare some views through which data can be collected...and Controller is responsible for maintaning the application. When w e make a request to the application it goes throught the controller.It acts like a gateway to the application. It is responsible for selecting the model which is responsible for process the request,dispatch the request, collect the response and selects the view which sends the response to the client.According to sun specification these responsibilities can be done byMOBEL--JavaBeans or EJBView--JSPController--Servlets.

  Was this answer useful?  Yes

Kalyan

  • Nov 16th, 2006
 

MVC Describes that each part of responsibilties

M-Model is responsible for business process and business data

V-view is responsible for response content to dispatch the client

C-Controller is responsible for to control the requset and response

In MVC1, Model is Java Bean's (or) EJB's, View is HTML's and JSP's, Controller-JSP

MVC1 Architecture every time client makes a request to the controller it is every time tranlate the content that is main problem, So SUN introduced MVC2 Arichitecture is introduced.

In MVC2, Model is Java Bean's (or) EJB's, View is HTML's and JSP's,  Controller is Servlet.

When ever client makes a request to the Controller it is tranlates the page, and also we can send unique id we can send the request but not MVC1.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions