• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Pet Store 1.3 vs. Struts  RSS feed

 
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just started looking at Struts a couple of weeks ago and I really liked the way it was designed. It'll take me a little while to use it to it's fullest, but it seems logical and extensible.
That being said...
I started studying for the SCEA, so I thought I'd check out the Blueprints and the newest Pet Store (version 1.3).
Has anyone spent the time to understand what they are doing with their templates, TemplateServlet and the rest of the WAF?
One of the aims of partitioning these apps was to allow people with different skill sets to do what they do best and allow for parallel development.
How will web designers with little java knowledge fare with this stuff. They can't preview the pages until they run them on the server through the TemplateServlet. It seems to me they need to be way too involved in the "guts" of the app and are forced to coordinate interact too much with the components and deployment xml (screendefinitions.xml, etc.).
To be honest I haven't spent a huge amount of time looking at the Pet Store 1.3 version, but initially it seems sort of convoluted. Also, maybe I don't see all the things they are trying to achieve all in one app?
I'm still forming my final option as I do more research, but I wanted to start a discussion thread to get the insight of others.
I look forward to hearing what other people think.
Regards,
Byron
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow?
I thought this topic would generate lots of discussion. I was expects lots of differing oppinions and insights.
Is the issue that most people haven't looked at the newest Pet Store (for J2EE 1.3)?
Byron
 
Sheriff
Posts: 12738
210
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the issue is that the book giveaway is over :roll:
I personally haven't looked into the Pet Store demo much. However, the application was written as a sort of "reference implementation" for J2EE applications using standard J2EE classes and APIS and the J2EE Blueprints design patterns.
I personally think that parallel development is, for the most part, a --what's the term?-- pipe dream(?) for most organizations. There needs to be very good communication between the different people involved if you really want to do partitioned development the way you describe. Maybe I've seen too many less-than-ideal projects and have become too cynical but I just don't believe that there are that many organizations out there with the kind of discipline and organization to pull it off. In the projects I have seen so far, it is best if the developer is the one who does everything (except maybe do the initial HTML mockups).
My $0.02
Junilu
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Byron,
I haven't looked the 1.3 example but I can't imagine it being much different from the 1.2 example. Yes my Part II for SCEA has been pending for a while too.
here's my take on what Sun is trying to acheive.
It is trying to demonstrate all the features of J2EE with one example. They have loaded it with as many design patterns as they could in one example. Whether that's a good choice or not is debatable.
Instead of trying to study it as one example what may help is if you look at it as several different examples. What they want is for you to lear and explore JSP's and then come back and see how they have done it with the Pet Store. Same thing with Servelts etc.
For the Architect exam,from what I have seen in the newsgroups try and stick to the PetStore example. That seems to be a 'safe' choice.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don t know if it will help but
petstore includes *.zargo file which can be opened by argouml uml program. you can see uml case diagrams through argouml. Or you can just
look petstore\src\waf\uml\waf.gif
It is application of Model view controller logic.
Apache struts and taglib is alternative but using also model view controller logic
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,
I don't know. It seems to me that not only are they trying to demonstrate patterns, but I get the feeling that they are holding this up as a set of "best practices". The only petstore versions I've looked have been (1) the version covered in the book "Designing Enterprise Applications with Java 2 Platform, Enterprise Edition" and the (2)latest 1.3 version. The GUI generation methods they use between the two version I've looked at vary substantially. The biggest change being the concept of templates and the waf framework they use to build the gui. It just doesn't seem as elegant or intuitive as the struts approach to ActionForms, Actions, custom tagibs, etc. configured via the strutsconfig.xml.
Thanks for your input! I appreciate it!
Byron
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think "best practices" is quite they way that they would word it. They offer it as a possible scheme to demonstrate MVC. Here is their description:

The JavaTM Pet Store Demo is a sample application from the Java Enterprise BluePrints program at Java Software, Sun Microsystems. It demonstrates how to use the capabilities of the JavaTM 2 Platform, Enterprise Edition ("J2EETM") 1.3 platform to develop flexible, scalable, cross-platform enterprise applications.
The Java Pet Store Demo comes with full source code and documentation, which illustrate the typical design decisions and tradeoffs a developer makes when building an enterprise application. The demo shows how to use JavaServer PagesTM ("JSPTM"), JavaTM Servlet, Enterprise JavaBeansTM ("EJBTM"), and JavaTM Message Service ("JMS") technologies. It also uses new technologies in the J2EE 1.3 platform, which you can experiment with and learn how to use in your own enterprise solutions.
With real, working code illustrating the Java BluePrints guidelines, the Java Pet Store Demo reduces the learning curve of the J2EE 1.3 platform, enabling you to deliver complete end-to-end solutions with faster time-to-market.

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Byron,
The whole concept of the blue prints is to give beginners mainly (and seasoned vets) some ideas on how to design a robust enterprise web app. I don't necessarily like all of their design decisions, but it gives you some good ideas that you can expand on. I think that is the whole point of it (I could be talking out of my a@$ here ). They do bring up some nice patterns in the project that I've tried to use.
I haven't studied the whole application, but from what I have seen, it's pretty good. I like the Front Controller pattern, but I agree with you that it is too difficult in how they applied it. I personally like WebWork. It's the same idea as Struts, but far more flexible and easy to learn. The lead developer is a brilliant guy and a big player in the Open Source J2EE community.
/rick
[ March 20, 2002: Message edited by: rick salsa ]
[ March 20, 2002: Message edited by: rick salsa ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!