Hi,
Request you all to Please clarify my doubts...
I worked in
Struts and now learning Spring.My doubt is, are these frameworks complete,in the sense that addresses all issues developer face while developing web applications.No single framework seems to be complete in addressing all the issues related in developing Web Application (this is my opinion)
Listed a very few points(rather my opinions) in using these frameworks in various layers of web frame works(I'm may be wrong)
Presentation Layer
=================
Why Struts?
1.Struts is a framework that implements Model-View-Controller (MVC) framework. The main purpose of an MVC framework is to separate presentation code and business logic code
2.Support for Internationalization
3.Support for HTML Tag Library
4.Support for Validation Framework (validation_rules.xml)
Why Not Spring for Presentation Layer?
1.There is no common parent controller for Request Handling, similar to Struts ActionServlet
2.More
JSP Coding
3.Takes more development time ??(not sure about this)
Business Layer
=================================
Why Spring?
1.Easily Switch from one persistence framework (like Hibernate) to another
2.Built in support for persistence framework like Hibernate
3.Business Objects can be modeled as services and can be looked up from Presentation Layer.
4.Uses the design
pattern Dependency Injection
Why not Struts for Business Layer?
1.In most of the cases Business Logic will be written in org.apache.struts.Action class, which will lead to dependencies between Presentation and Business Layer
2.No Built in Support for any Persistence frameworks
3.Since Presentation and Business Layer is more tightly coupled it will be difficult to move from one Persistence framework to another.
There is an article Published on ONJava.com (
http://www.onjava.com/)
http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html As mentioned in the above article do we need to combine these frameworks,or
we need to choose any one.
Please post your comments.
Chandrasekhar S.
[ May 20, 2005: Message edited by: Chandra Sekhar ]
[ May 20, 2005: Message edited by: Chandra Sekhar ]