Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Shopping Cart  RSS feed

 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks in advance.

Regards,
Vivek
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by a "dummy" shopping cart?
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
vivek
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if you want to start small, I would begin by picking a product and deciding on what information you will need to keep.

For instance you'll need a primary key (I'd recommend using a surrogate), a product id, title, price, weight, height, width, depth, quantity in stock, description, etc.

If I were you, I would begin with the product. Get a database started and think about just making a catalog of your items. After that, you can move to the next step regarding a shopping cart.
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jason,
I actually found the following link on the MSDN website

http://msdn.microsoft.com/vstudio/images/express/sql/dataschema/model3.gif

Do you think I should start working with these database tables?

Anyways, Cheers mate, I think I can start working on something.
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chad Foor
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Good luck,
Chad
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chad Foor:
Look into what EJBs buy you...


In my opinion, EJBs would buy nothing at this point except needless complications and obfuscation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!