• 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

Struts 2 in action Book question

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Authors,
1. What are main advantages of struts2 over struts.
2. Why one should migrate / integrate his current running struts to struts2
and what are simple ways to do so.
-
Girish
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main advantages are:
1- Actions are POJOs, so they aren't coupled with any framework or container
2- Actions are not coupled with servlet API, so they are easily unit tested

A full comparison between struts 1.x and struts 2.x is available here. You can also take a look at the migration guide.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main reason I think are:
1. testing methodology
2. that it uses OGNL (Object Graph Notation Language) and valuestack technology
 
Author
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The other folks have already pointed out several of the big improvements found in Struts 2, like POJO actions and decoupling of actions from Servlet API.

I would add that, in general, the entire framework demonstrates a cleaner architecture. Struts 2 is a very good case study in software engineering principles. All of the components in Struts 2 are cleanly separated from each other allowing, among many other things, easy testing of all framework components.

You can customize and add your own versions of all framework components with very little effort. For instance, the UI Component tags that come bundled with Struts 2 can be customized easily and cleanly. If you need the oupput of the bundled form tag to be in a different format or use different styling, you can easily customize the component to do what you need. The same holds true for even core components like the ObjectFactory that instantiates the actions and interceptors. The Spring plugin takes advantage of this to override the core objectfactory with one that looks for spring beans when its trying to come up with a given framework component.

So, I would say that a clean, highly flexible architecture is the hallmark of the new struts
 
reply
    Bookmark Topic Watch Topic
  • New Topic