Jump to content

Architecture Question


Terro

Recommended Posts

I have a quick question I would love to get some feedback on. I'm working on a fairly simple shopping cart which uses prototype 1.5 and need to decided on a data storage system. Because my clients site will only have a handful of items I have decided to not use mysql in this application. My question to you is if this is a good architecture or should I alter is some with your expert advice.Unique ID in the ADD to cart button (or OnDrop since it's drag and drop) would be used by the Ajax.Request & response.XML to fetch a specific itemID and it's children from a XML file. This data would be used to populate the cart with the ItemID's information such as cost , shipping description and title.....ect. I'm pretty new to Ajax and need a good system to store my item information in thats not MySql based. I heard of JSON but have never used it before so I am trying to do it with XML which is proving to be pretty tough.This is the site I'm working on, it's still in development but you can have a visual feel of what I'm going for. The items are drag and drop. http://www.sheava.com/sheava2/template5.htmThank you ahead of time for your advice.

Link to comment
Share on other sites

Any time you are working on selling products online, it's probably best to use a server-side solution for that. The reason I say this is that if you store the data for a particular product in an XML file and then build a shopping cart solely on the client-side, someone who is less than honest can modify the request so that the shopping cart is full of $100 items with $1 prices.While you don't necessarily need a database to do this, I would still recommend that the prices come from the server rather than client-side through javascript and that when the form is submitted (i.e. checkout), the prices are validated against the server using PHP, ASP.NET, etc.I apologize if what I've said above is something that you already know. :)As for processing an XML file, the only way I've had consistent success was to use the XML DOM. The tutorial here has been invaluable to me: http://www.w3schools.com/dom/default.asp.P.S. Nice effect with the drag and drop!

Link to comment
Share on other sites

Any time you are working on selling products online, it's probably best to use a server-side solution for that. The reason I say this is that if you store the data for a particular product in an XML file and then build a shopping cart solely on the client-side, someone who is less than honest can modify the request so that the shopping cart is full of $100 items with $1 prices.
Thank you so much for the link, it something I was looking for. As the security reasons go, I was led to believe that sessions are stored on the server and not on the clients-side. This changes everything, lol. I need to do more research.Edit: I just went over my first post and realized that I didn't mention that the cart would be session based and not use cookies.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...