What is MVC1 and MVC2 Architecture?

Right now i know only Model1 and model2 Architecture . Is there any MVC1 and MVC2 architectures .If any please explain.
[126 byte] By [csreddy33a] at [2007-9-29 7:03:43]
# 1
MVC1, is architecture which does not include struts frame work in it, whereas in case of MVC2 it includes struts frame work.MVC1 is called model1 and MVC2 is called model2.
universaljavaa at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

there is no such thing as MVC1 to my knowledge, only MVC2 which is a web based MVC model coined by sun.

MVC2 used the M , V and C in a linear fashion

first V-> C -> M

whereas traditional MVC such as in case of swings is circular.

in MVC2, the terms M,V and C are a lot clearer and struts is a framework that completely supports MVC2 .ie web based mvc model

lavagopala at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 3

Model1(MVC1):

Browser -> JSP -> Bean -> DB

Browser <- JSP <- Bean <-

Modle2(MVC2)

Browser -> Servlet -> JSP -> Bean -> DB

Browser <- JSP <- Bean <- DB

servlet will instanciate the Bean

well... try this.

http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html

now I think it will be clear to you.

-prakash

prakashdewangana at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 4

> Right now i know only Model1 and model2 Architecture .

> Is there any MVC1 and MVC2 architectures .If any

> please explain.

Model 1 & 2 are architectures applied to [Java] Web-Applictions.

Model 1 is a client-server architecture, and typically means the layout is seperated from content by the use of java beans. This was the earliest architecture for web-applications.

Model 2 came alone later, by applying the MVC (Model,View,Controller) design pattern. Model 2 ~= MVC in a WebApp context, though MVC can be used in other context.

There is only a MVC pattern there is no MVC 1 / 2.

MartinS.a at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 5

> MVC1, is architecture which does not include struts

> frame work in it, whereas in case of MVC2 it includes

> struts frame work.MVC1 is called model1 and MVC2 is

> called model2.

This is completely wrong.

- There is only MVC and not MVC1 or MVC 2.

- MVC is a design pattern. MVC does not depend on or require Struts.

- Struts facilitates applying the MVC pattern, however it can also implement Model 1

- MVC1 is NOT synomonous with model1.

- MVC2 is NOT synomonous with model2.

- Model 2 most properly describes the application of MVC in a Web-Application context.

MartinS.a at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 6
In brief, MVC is a design concept and Struts is a framework implementing the concept.
ArdhenduPatria at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 7
i don't know the answer....could u help me.....
JavaSudheera at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 8
http://today.java.net/pub/a/today/2003/12/11/mvc.html
mchan0a at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 9

-->Following are the important feature of MVC1 architecture:

(1) HTML or JSP files are used to code the presentation .JSP files use java beans to retrive data if required.

(2)MVC1 architecture is page-centric design all the business and processing logic means any JSP page can either present in the JSP or may be called directly from the JSP page.

(3)Data access is usually done using Custom tag or through java bean call.

Therefore we can say that in MVC1 there is tight coupling between page and model.

--> Following are the important feature of MVC2 architecture

(1)This architecture removes the page-centric property of MVC1 architecture by seperating Presentation,Control logic and Application state

(2)In MVC2 architecture there is one module [b]Controller which receive all request for the application and is responsible for taking appropriate action in response to each request. second one is Model which is represented by javabeans,business object, and database. Third one is View or is jsp page it take the information provided by Controller and Module and present it to user

Manish.Kumara at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 10
hI,I want to know about MVC1 and MVC2 Architecture . Can anyone explain me the differences. What all I know is just MVC the Model-View - Controller. I want to know the differences b/w 1 and 2 model of MVC.
hishekharherea at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 11

I dont think ur discussion is clear. As per ur discussion JSP components will directly interact with model components in mvc1 But who is playing the controller role.

And ur discussion regarding MVC is tied to web applications only.Is it true that MVC applies only for web apps.

If MVC is not specific to web apps is struts frame work statisfying the criteria with out any changes to the controller components.

Seshubabua at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 12

The simplest answer is separation of concerns. In model one there was no clear demarcation between the domain model and the controller, it was more like "transaction script" however this boundary is much more defined in model 2, which would be MVC.

There are no MVC1 or MVC2 architectures however.

kilyasa at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 13

Hi,

The main diffrence between MVC1 and MVC2 architecture is mentioned below.

1. In MVC1 architecture we can't segregate presentation tier and

business logic.

2. No more controller is there in MVC1.

3.Large application wil give so much complexity while developing using MVC1.

venkatesanka at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 14

MVC1 Architecture has a Model part as (classes,Bean classes connectivity of Database), View part as jsp pages,and here only one controller Servlet is used .here we send request form browser by jsp page it goes to servlet(controller) servlet get information from the request acording to request it fatch information form classes(Models) and give responce to the view part( to the Jsp Page).

In MVC2 Architecture we use Struts FrameWork which is a Open Source FrameWork.Here Browser send Http Request to the ActionServlet that Reads StrutsConfig.XML (these two play role of Controller) then it goes to Model part acording to request by Browser. Here in Action part we have DataBase, ActionForm(Basicly Beans or EJB) and that give a response to View Part As Jsp Page to the Browser.

ramjia at 2007-7-14 21:01:33 > top of Java-index,Other Topics,Patterns & OO Design...
# 15

MVC1 Architecture has a Model part as (classes,Bean classes connectivity of Database), View part as jsp pages,and here only one controller Servlet is used .here we send request form browser by jsp page it goes to servlet(controller) servlet get information from the request acording to request it fatch information form classes(Models) and give responce to the view part( to the Jsp Page).

In MVC2 Architecture we use Struts FrameWork which is a Open Source FrameWork.Here Browser send Http Request to the ActionServlet that Reads StrutsConfig.XML (these two play role of Controller) then it goes to Model part acording to request by Browser. Here in Action part we have DataBase, ActionForm(Basicly Beans or EJB) and that give a response to View Part As Jsp Page to the Browser.

ramjia at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 16

> MVC1 Architecture has a ...

There is no such thing as MVC1 architecture. There is something called Model1, which has nothing to do with the MVC pattern.

>

> In MVC2 Architecture we use Struts FrameWork

There is no such thing as MVC2. There is a Model2, which is MVC-based.

Struts is only one example of a Model2 implementation.

karma-9a at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 17

MVC -> Model, View, Controller

MVC1 - "Combines View and Controller as a single unit"

[Java Eg: Jsp pages acts/performs as view and controller component, Enterprise Beans act as Model components ]

MVC2 - Complete seperation between Model, View and Controller components

[Java Eg: Jsp acts as View, Servlets acts as controller and Enterprise Beans acts as Model components] :)

rsayyappana at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 18
In MVC1 architecture your controller is JSPwhile in MVC2 architecture controller in JAVA Servlet.Struts is based on MVC2 architecture.But i am unable to find an example based on MVC1 architecture.
JaiSa at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 19

> But i am unable to find an example based on MVC1

> architecture.

And still, you're insisting on its "official" existence ?

Please list here an official reference from Sun or other authoritative source stating the existence of an "MVC1 Architecture". Discussion threads by some inept developers in some forum don't count as authoritative, BTW.

Using JSPs as controllers is bad design. JSPs are meant for presentation only (V in MVC). Maybe that's why you can't find an example. OTOH, you'll find plenty of examples of "Model 1" architecture, but it has nothing to do with the MVC pattern.

karma-9a at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 20

If you look at Hans Bergsten's JSP book, he discusses the difference between MVC1 and MVC2.

They've both web-based MVC implementations, just two different styles. MVC1 is pure JSP, with all the navigation hard-wired in the pages. MVC2 puts the navigation logic in a servlet, usually a front controller, that has all the navigation logic.

There's only one MVC, but there are several styles of implementation.

%

duffymoa at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...
# 21
> If you look at Hans Bergsten's JSP book, he discusses> the difference between MVC1 and MVC2. OK.. I couldn't find any reference on Sun's sites. So there is at least one authoritative source. Thanks.
karma-9a at 2007-7-19 4:28:51 > top of Java-index,Other Topics,Patterns & OO Design...