• 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

migrating from struts to tapestry

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I was wondering if in the book the author talks about how to switch from struts to tapestry.
 
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, throw away your Struts application and rewrite it in Tapestry

It's tricky, because they are so different (component-based vs. operation-based). Tapestry includes a JSP tag library to allow you to mix-and-match between a Struts/Servlets/JSP application and a Tapestry application.

In my opinion, you will reap such great productivity savings by doing a large-scale switch over right off the bat that it's worth it ... but I realize you won't convince your management to take that kind of risk.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now there's a good idea for a book.

My knowledge of Tapestry is minimal at best but from what I've seen, you'd have quite a few things to migrate.

1. JSPs --> HTML templates
2. struts-config.xml + actions --> application specification (?), IRequestCycle (?)
3. actionforms --> page specifications (?)
4. tiles-defs.xml --> (?)
5. validator.xml --> (?)
6. JSP tags/page elements --> Components
7. ActionServlet --> IEngine (?)

I'm sure that there are enough differences in the architecture of the two frameworks that there would not be a one-to-one match of parts. It seems to me that the greatest hurdle to overcome though, would be the change in paradigm.
 
Junilu Lacar
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Howard Lewis Ship:
Yes, throw away your Struts application and rewrite it in Tapestry



If you have a well-layered application where there is a clear separation of concerns between the M-V-C parts, wouldn't it be possible to at least reuse the Model parts of the Struts app?
 
Emman lopez
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mr. Howard Lewis Ship for your feedback, I wish would be that easy to just throw everything and have a fresh start with tapestry, my boss believes in things that increment productivity in a short time.
In your experience how deep you think is the learning curve when it comes to tapestry? you think is easier than learning struts?
 
Emman lopez
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
like Junilu Lacar said:

If you have a well-layered application where there is a clear separation of concerns between the M-V-C parts, wouldn't it be possible to at least reuse the Model parts of the Struts app?
--------------------



I was thinking if you have for instance struts - spring - hibernate, you could switch from hibernate to JDO, is it possible to be able to switch from struts to tapestry ?
 
Howard Lewis Ship
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've always been mystified by the "steep learning curve of Tapestry". To me, Tapestry operates simply and logically and its Struts and Servlets that are confusing.

Many people become confused when they think that Tapestry is Struts++ when, in fact, its an entirely different beast. They have to unlearn the bad practices forced upon them by Struts.

I've done a lot of work in Struts and it is so painful, compared to Tapestry! When I create a link on a page and then spend ten minutes writing an Action, perhaps an ActionForm (to collect query parameters) update struts-config.xml, etc. In Tapestry, I write a listener method and I'm done.

Back to the question: yes, your backend code should be completely reusable. Tapestry doesn't care about the backend, it just needs to be connected up to objects with properties.
reply
    Bookmark Topic Watch Topic
  • New Topic