Hi Guys, I would like to make a dummy shopping cart. Do you guys know any helpful tutorial to let me get a headstart. My basic worry is database design and how to think of modules and objects involved.
I meant a shopping cart which incorporates everything except the actual credit card authentication. I just wondered If I could get a headstart by having the architecture of the project so I could implement every concept that I have learnt so far such as sessions, listeners, filters, custom tags, jstl etc. I really dont know where to start. If someone could help me, Id be very glad.
Making a simple shopping cart application, if that's truly what you need, isn't too difficult but takes quite some time to produce properly. Employing a design pattern, like MVC, for your application is essential in my opinion.
Before you do anything, I would spend a little time thinking about your scope and just how big this application needs to be. What I mean by that is... do you want a simple product catalog and be able to add items to a cart? Or do you also want users to register accounts, be able to log in, view past purchases, etc.? Will items ever go on sale? Is inventory going to be maintained?
Working out the logistics of your application is important before you get too deep. As well, it will help you figure out what you need to look for in terms of tutorials and other resources as you go along.
Originally posted by Jason Kwok: do you want a simple product catalog and be able to add items to a cart? Or do you also want users to register accounts, be able to log in, view past purchases, etc.? Will items ever go on sale? Is inventory going to be maintained?
Thanks mate! I think that helps! but could you please let me know what modules I can separate my application into. What tables do I make in the database? I have trouble getting the project kicked off. I would want to start the project with minimal modules and try and expand the scope later.
Well I can tell that that example is for books, and as such, if books are your chosen product than it should be sufficient for a good portion of the functionality.
However, make sure you get a clear picture of what you want out of this application. If you're not intending on allowing customers to log in or create accounts, place orders, or make a payment... then several of those tables are unneccesary.
Look into what EJBs buy you, especially if you're talking about communicating to a database. Shopping cart (in the sense you mean it) sounds a lot like a combination of a session + persistence bean. Have JBoss or some other J2EE server run the bean(s) and have your JSP/Servlet be the front-end client that calls the EJB Object. Any EJB server provides you with a number of utilities up front like security, authentication, persistence, session tracking, etc.
A very painless setup is a combination of JBoss 4.0.5GA (The most stable and modern release out there) + Tomcat 5.5.9.
When you're using the 'model' in an MVC pattern, this could be nothing more than an interface to an Enterprise Object, which is what I think you're looking for.