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
How to get data from the velocity page in a action class?
How many action classes can be used in struts application?
Which configuration file is used for storing jsp configuration information in struts?
What are the loop holes of struts?
What are the ways in which duplicate form submission can occur?
Explain about struts?
How we can install struts?
Can explain about the validations and in your project where did u used the validations?
Which library is provided by struts for form elements like check boxes, text boxes etc?
How struts control data flow?
What is the use of forwardaction?
What’s the difference between struts and espresso?
What do you mean by actionmapping?
Why do we use struts?
What are the differences between http direct and http indirect?