what is the difference between model1 and model2
architecture in struts?

Answer Posted / jaikant

in model 1 ,either Servlets or JSP handles all the
responsibilities for request.like processing the
data,validating the data, handling the business and data
access logic.

model 1 can be use when your application is small.

application can't have multiple interfaces(or views) for
same business logic.

Model 2 breaks your application in three parts
i)Controller: performs request processing,data validation
and works as controller between model and view.so there is
no direct interaction between model and view.

ii)model: it is core of the application.it is house of
business logic and data access code.model defines what
application does.we can subdivide model in 2 sub layer(data
access layer and business logic layer).

iii)view:it is place where presentation code reside.it is
the place for getting input and displaying data that is
generated by model layer.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by actionmapping?

718


What is the purpose of @result?

755


What is the purpose of @beforeresult?

770


What are pull and push mvc architecture and which architecture does struts2 follow?

686


What is the purpose of form-be tag in struct-config.xml?

730


What are action errors and error?

770


How can we handle exceptions thrown by application in Struts2?

711


What is pojo in struts2?

740


What does apache struts do?

669


How tag libraries are defined in Struts?

770


What are the core components of a struct2 based application?

755


What are the various struts tag libraries?

710


What is difference between interceptors and filters?

726


What is the use of execAndWait interceptor?

742


What is the front controller in struts2?

679