• 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

J2EE Shopping Cart System

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am developing a shopping cart system for educational purposes and in need of some help. The Application should be web-enabled, distributed and object-based. The system must comply with some requirements. The tiers should be tied together very loosely, which means, that it should be possible to change the data- or presentation layer without to much effort. The presentation layer should not be implemented with JSPs in favor of XML-technologies. I am in the phase of design, so some use cases from analysis exist. Suggestions concerning the architecure are very appreciated.
As far as I know a MVC Pattern could be best choice. Thinking of a controller servlet as application entry point, where should I maintain the shopping cart. Should I use HttpSessions or statefuls Session Beans, or both?
Should I use a XML Framework for presentation, e.g. coocon2?
What job can XML do for me as interface between the tiers?
Can I use containermanaged persistence even if I have SQL statements that result in sums an aggregations?
Thanks in advance for some hints
Rudolf
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Should I use HttpSessions or statefuls Session Beans, or both?
You'll almost certainly need HttpSessions, just to keep the context. A List or Vector of JavaBeans (NOT EJBs!) is usually adequate for a shopping cart - each bean would typically contain a product code (SKU) and quantity or something like that. Save the EJBs for the catalog lookup.
> Should I use a XML Framework for presentation, e.g. coocon2?
I think XML for presentation is a bit overhyped, myself. I prefer to save it for data transport. It's extra overhead when you're just converting the XML to html anyway.
> What job can XML do for me as interface between the tiers?
In this particular case, no benefit I can see.
> Can I use containermanaged persistence even if I have SQL statements that result in sums an aggregations?
Not easily, since the sum is a one-way item and unless you have read-only EJBs (which aren't really explicitly supported in EJB 1.x), you'll have a great deal of difficulty explaining to the container how to persist the result field.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the blueprint pet shop can give some information.
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can reuse some of the code from the Blueprint's petstore demo program. I am quite sure that source code is available freely from www.javasoft.com/j2ee/ site.
Faisal
 
reply
    Bookmark Topic Watch Topic
  • New Topic