• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does Frameworks Addresses all the issues related to Web Application development

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic