aspose file tools*
The moose likes Servlets and the fly likes Online Shopping Cart :Can Anybody help? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Online Shopping Cart :Can Anybody help?" Watch "Online Shopping Cart :Can Anybody help?" New topic
Author

Online Shopping Cart :Can Anybody help?

Debanjana Dasgupta
Ranch Hand

Joined: Aug 11, 2000
Posts: 101
Hi
I want to make an online shopping cart.
Can anybody give me some ideas about how to go about it?
Thanks
Debanjana


Thanks<br /> <br />Debanjana<br /> <br />SCJP2<br />SCEA
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
It depends a little on what technology you want to use. I seem to recall a fairly useful JSP shopping cart tutorial on the web somewhere (maybe here or here, but keep looking)
[This message has been edited by Frank Carver (edited November 07, 2000).]


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Debanjana Dasgupta
Ranch Hand

Joined: Aug 11, 2000
Posts: 101
Hi Frank,
Thanks for the links.Actually regarding the ttechmologies, that is what I am confused about .I am quite new to servlet technology and is on my self study.
I was thinking of servlets and html.
Is that possible or Do I HAVE to use JSP and Beans.
I do not have very good idea on these technologies.
Can you please enlighten me
Thanks
Debanjana
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Good question.
You don't need JSP or Beans to do this sort of stuff. To be portable to all browsers you have to use a simple subset of HTML as your user interface. You can generate this however you like - using print statements in your servlet code, using a HTML builder tool like ECS, using some sort of templating mechanism like WebMacro or Velocity, using page-compilation techniques like JSP, or even generating XML and pasing it through an XSL stylesheet. The bottom line with all these methods, though, is that you produce some sort of dynamically generated HTML based on the items you have stored in your "cart".
As for how you store the items in the cart; you can keep them in a database managed by your code doing "SELECT" and "UPDATE" statements through JDBC, you can keep them in memory and hope the servlet stays alive, you can use your own custom file format, you can use Enterprise Java Beans to store the data in a database automatically or many other possibilities.
Some people use JSP and Beans because they work fairly well together, and they are favoured by Sun. Others swear by templating systems or independent persistent storage layers. Essentially you have to make up your own mind which you want to use.
If you are just learning, just pick some combination of technologies and try to make it work. If you are producing a commercial e-commerce product, you need to look a lot harder at the differences between the technologies, and decide how much flexibility, scalability, maintainability, ease of deployment, separation of tasks etc. the various solutions provide in your situation.
Debanjana Dasgupta
Ranch Hand

Joined: Aug 11, 2000
Posts: 101
Hi Frank
Thanks again
I think since I am in the learning stage I will go ahead with simple html user interface .
after I complete this, i will use JSP and Beans.
I will follow one of your suggested methods for storing the items, probably JDBC.
I think I can make it work.
Thanks again
Debanjana
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Online Shopping Cart :Can Anybody help?