Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 best pracrice

 
yajun wen
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many projects integrate Struts, Spring, Hibernate, JSF, etc. together. What is the best practice using struts 2? Do we need so many frameworks together?
 
Don Brown
author
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there is not need to use what you don't want. I'd suggest starting small and then add other libraries or frameworks as needed, particularly if you are not familiar with them. That said, Struts 2 has plugins that integrate with a number of frameworks you mention.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integration of different frameworks together is usually done because each framework is intended for a specific task. Hibernate for example is great for DB access, since it maps your DB tables to the object domain, so you don't have to go into the usual JDBC hassle. It also hides DB implementation and vendor specific SQL from the developer. Spring is great for wiring multi-tier applications, and it integrates with different frameworks to make your development easier, and make you concentrate on your business logic. It supports and eases up AOP, and lots of other features. Velocity is great for templating, while tiles and site mesh are great for creating web views. We cannot have a framework that will give us all of these stuff just to not integrate different projects together. Even spring itself, having so many features, it's divided into modules that you can use separately, and some are even separate sub projects.

To sum it up, you'll always have to have several projects integrated together to make the most benefit.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Don Brown:
No, there is not need to use what you don't want. I'd suggest starting small and then add other libraries or frameworks as needed, particularly if you are not familiar with them. That said, Struts 2 has plugins that integrate with a number of frameworks you mention.


Seems that we have a small disagreement here. Anyway, I don't say that you HAVE to use everything, but for large projects to increase productivity, struts or struts 2 alone is not enough. My previous post was mainly answering the question "We did that with struts 1, now with struts 2, can we ditch all this?". My answer was obviously no. If you did that with struts 1, then do it with struts 2
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic