How Struts will follow the MVC?

Answer Posted / krishnareddy

hi all,
->designpattern means it is the solution for the
reoccuring problem.
->The main aim of the MVC architecture is to separate
the business logic and application data from the
presentation data to the user.
->in model we can write our own code(like beans).
simply we can say that model is responsible for
managing the data.
->in view component we can write jsp code.
->controler is responsible for controling the application.
as part of controler we can write the servlet code.
use of mvc:-
1)suppose we write the code as part of controler to connect
to oracle database.
now i want to connect to another database like sybase.in
that particular swictuation i dont need to change model and
view components.what ever the code up to that controler
part only has been changed.
so that performance of the application automatically
increased.
there is the clean separation between the business logic
and presentation logic.
2) By using the MVC design pattern our
application becomes more expressive

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of action-mappings tag in struct-config.xml?

758


How can we display all validation errors to user on jsp page?

841


How is forward action used for integration?

741


Can we handle exceptions in Struts programmatically?

694


What is the difference between struts1 and struts2?

706


How do I access token?

701


Can I have html form property without associated getter and setter formbean methods?

765


What is struts in java with example?

692


What is struts2 namespace?

670


Where can I get help with struts?

745


What is a custom tag?

695


What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?

763


What is the role of a handler in mvc based applications?

950


Why actionservlet is singleton in struts?

750


What is the differences between struts1 and struts2?

688