• 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 implementation

 
Ranch Hand
Posts: 398
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Neil, Welcome on board.
Some very general questions.
1.What does it take to use struts implementation in an existing project? If the project is vast in scope does how much developing effort is involved in the migration? I know you can't give very specific answers to such questions but does it pay off in the long run to implement struts.
2.Does it create any dependencies?
3.What makes you decide a particular project is the best candidate for using the framework?

Thanks,

Vasu
Thanks,
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice questions. I would want to add on to that.
One of the complaints that i often hear is that struts ties us to the web. Guess we have HttpServlet Request/response passed on to us by the controller etc. I wonder how much does that matter in practical situations. I mean are there many applications that are developed for swing and web-ui interface and thereby making struts irrelevant in those cases?
What would be the best framework to choose if there is a strong business case to support swing and web ui?
Does that alternative perform better than struts and at the same time manages to remain generic? But then since its generic would it be able to provide us with HTTP centric features?
thanks.
 
Author
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1.What does it take to use struts implementation in an existing project? If the project is vast in scope does how much developing effort is involved in the migration? I know you can't give very specific answers to such questions but does it pay off in the long run to implement struts.


Struts is one of the easier frameworks to use to slowly migrate an existing web application. It doesn't try to take over the normal request/response behavior of the application. We have a lot of experience slowly migrating existing applications to Struts with greate success.

2.Does it create any dependencies?


It does create workflow dependencies on the framework, but you avoid any dependencies in your database or business rules classes.

3.What makes you decide a particular project is the best candidate for using the framework?


Any project that benefits from Model 2 (which is virtually any project) is a good candidate. Especially if it currenly exists as a messy pile of servlets and/or JSPs. You can migrate it to Struts to clean up the architecture and design.

I mean are there many applications that are developed for swing and web-ui interface and thereby making struts irrelevant in those cases?


At some point, you have to interact with the real world (whether it be web or Swing). However, you can design your applications to take advantage of Model 2 and create database and business rules classes that can be reused in a desktop application. In fact, in the book I advocate writing boundary and entity classes that never import any web api classes.

What would be the best framework to choose if there is a strong business case to support swing and web ui?


Any framework that offers good support for Model 2.

Does that alternative perform better than struts and at the same time manages to remain generic? But then since its generic would it be able to provide us with HTTP centric features?


Tapestry removes the dependence on HTTP facilities and replaces them with its own. Writing Tapestry applications is more like writing desktop applications. However, now you are coupled to Tapestry instead of Web or desktop.
Completely generic yet offers all the features of the underlying platform...hmmmmm. If you find that, please let me know!
 
vasu maj
Ranch Hand
Posts: 398
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response. If I have a project which is in fact a messy pile of servlets ans JSPs, ho wdo I go about the slow migration as you said? Can I implement webwork for the JSPs? Since the JSPs are too lengthy and have become so big that the very size of the files tells us that something needs to be done, is it the right thing to do webwork implementation at the same time we migrate to struts? Our is a typical MVC where everything has gone haywire. We have classes which are thousands of lines long, JSPs following suit. By the way we follow the pattern where single controller servlet acts as the main controller and directs all actions to classes which are called servlets but are in fact dummy java classes.

Thanks,
Vasu
 
Neal Ford
Author
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vasu -

ho wdo I go about the slow migration as you said?


Don't try to tackle all the page at one time. Put the Struts infrastructure in place in the existing web application, and pick one workflow to migrate. Struts peacefully co-exists with any other web applications it shares with. Take one piece of functionality at a time (actions, JSP's, models) and move them over to Struts. Eventually, you'll get the whole thing refactored.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic