Difference between MVC and Struts

Hello

I am new to Java.I am aware of MVC architecture in which how the

separation has done for the web application thorugh the three main

components(Model,View,controller).

And I heard Struts is also a framework designed & mainly follows the

MVC architecture only. I heard that Struts has incorporated Action

classes etc.

I tried to get much information through net, but everywhere explaing the

MVC concepts only even for struts also. I don't see much description

about what is the actual difference between MVC and Struts.

I understood Struts are dervied from MVC framwork only.

Can you please anyone explain

-what are the main differences between MVC and struts frameworks.

-What are the new concepts incorporated in struts.why they actually

need if we have wellversed MVC framework.

-what are the advantages of using Struts rather than MVC .

-And in which circumstances struts can be used and how it can be

useful.

Thanks & Regards

Sai Suresh

[1086 byte] By [sai.suresha] at [2007-11-26 16:27:07]
# 1

-what are the main differences between MVC and struts frameworks.

The Struts framework simply enforces the "Controller" part of MVC. It is not an "alternative" to a MVC architecture for a project.

-What are the new concepts incorporated in struts.why they actually

need if we have wellversed MVC framework.

Struts is NOT required to implement a MVC architecture, particularly if you are well versed in MVC.

-what are the advantages of using Struts rather than MVC .

From my perspective Struts is simply a crutch, enforcing the Controller implementation on developers who either cannot or will not discipline themselves to properly implement MVC. It _does_ enforce a consistent style of controller objects in your application so even if multiple developers are involved in the project, using Struts will result in a consistent MVC implementation (particularly in the controller layer.

My experience suggests most developers who have already implementd a "Model 1" architecture for a project will have trouble seeing the benefit of re-working everything to achieve a MVC architecture. (Although the benefits are many!) They seem particularly loath to make the accesses to database in a "Model" layer. One group in my company (all of whom are competent programmers, mind you) have been forced to extract the database accesses out of their JSPs and make the JSPs , thereby, implement only view and controller functionality. Now they are going to be forced (Their manager says, "Thou shalt do it this way!") to use Struts so they will thereby have implemented a correct MVC architecture.

-And in which circumstances struts can be used and how it can be

useful.

Struts can be used in any java project where one wants to enforce a MVC architecture, particularly the controller layer.

Happy MVC'***!

BCScomputersTXa at 2007-7-8 22:51:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...