aspose file tools*
The moose likes Other Application Frameworks and the fly likes Does Frameworks Addresses all the issues related to Web Application development Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Does Frameworks Addresses all the issues related to Web Application development" Watch "Does Frameworks Addresses all the issues related to Web Application development" New topic
Author

Does Frameworks Addresses all the issues related to Web Application development

Chandra Sekhar
Ranch Hand

Joined: Sep 26, 2003
Posts: 90
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 ]

"Luck is when opportunity meets preparation"
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
I think its a bit like comparing apple with oranges.
Struts is a framework specifically and only for web layer (as far as I know).
Spring is a framework for all kinds of different layers needed in an app like database access, business logic and web. It even provides support for web-alternative client technologies like RichClient project.
And Spring has classes for struts-support, also. In many aspects spring behaves like a "meta-framework". It provides interfaces and classes, which are specifically targeted at integrating other frameworks in spring.

IOC in my view is especially usefull to drastically reduce lines of codes for inter layer communications.

The focus of struts and spring is very different and so it does not make much sense to compare both.
Spring has its own webframework, so you might compare this with struts.
So spring (the whole thing) - struts comparision might be not comparing apple with orange, but apple-tree with apple (which does not make much sense either).

Axel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does Frameworks Addresses all the issues related to Web Application development
 
Similar Threads
Entity EJB Inheritance
no clue wat it is!!!
Programming Jakarta Struts - Release Announcement - O'Reilly
should be easy.
Spring, in Spring-Struts-Hibernate application