• 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

General questions for Ted

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
I am in the design phase of my first big project using Struts and I was just curious what is your general approach to design with Struts in mind?
The approach I have been taking so far is sort of "outside-in", i.e. design the views, build the ActionForms, then handle the Actions. Have you found a strategy like this to be useful?
I realize it can be very application specific but I was hoping maybe you could share some best practices based on your experience.
Thanks in advance,
Eric
 
Author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After getting together the top-level requirements, I generally start with a HTML click-through. At this point, it's a familiar medium for everyone and can be the simplest way to express what needs to be done.
It's then pretty easy to setup the ActionForms using the HTML click-through like a requirements document. Once you have the ActionForms, it's easy to migrate to a dynamic click-through using JSP or Velocity templates. Instead of Actions, you can use the forward property to send control out to the presentation page. At this point, you can also start validating data.
After that, it's a matter of inserting Actions that bring the click-through to life. Here, I may start with stub or mock actions that return the same static data from the click-through. This way I can test how the presentation pages will act when passed data from the controller.
Finally, when I run out other things to do, I break down and hook it up to the persistance layer.
So, yeah, what you're doing =:0)
This is the same general process covered in section 3.4 of the book.
HTH, Ted.
 
Eric Fletcher
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ted, I really appreciate the reply.
E
 
reply
    Bookmark Topic Watch Topic
  • New Topic