Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1 VS Struts 2

 
vipul bondugula
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

Strus1 Vs Struts 2

The above URL tells about struts 1 vs struts 2.

First difference i did not get...

It is given "Struts 1 requires Action classes to extend an abstract base class. A common problem in Struts 1 is programming to abstract classes instead of interfaces"

I never coded by extending abstract classes. ActionServlet , Action, ActionForm etc are not abstract classes.. why did the person mention abstract classes , i don't get it.

Do any of ranchers have any explanation for this.

Thanks BVR.
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vipul bondugula wrote:
Do any of ranchers have any explanation for this.


I can't explain why they used the term "abstract". Suffice to say, Struts 1 requires an action class to extend Action. Struts 2 allows one to use any POJO.
 
vipul bondugula
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Joe.

In the apache site also they did mention the same. They simply don't use the term abstract. There must be some explanation..

why do they mislead us...

Thanks
BVR.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO Struts 1.2 is class driven but the framework should be an interface driven(according to the proper design) so that we can extend some other classes

Struts 2.0 is interface driven we can write without using interface or with interface or with a class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic