So, we’re going to build ooCommerce, an ecommerce solution, an open source one. What pieces are involved? What are the major components of the system? Let’s get this organized using a top down approach.
Every ecommerce system has a few major parts in common. One is the catalog. This is where we can browse and search for the products. Then, we have the shopping cart. This is where we put the products when we want to buy them. We have our checkout, which is the process where we can purchase what is in our shopping cart. And lastly, many systems including ours will have a customer account section, where we can view our past orders and get support. Actually, we are fogetting a major part of the system. The administrative section. This can sometimes be the largest section and will help us organize the catalog, oversee orders, configure the system, and all the other administrative tasks associated with running an ecommerce store. Here are the “main sections.”
We will be storing many of the store’s information in a database. So we will need a database package (when I say package, it might be one class or a group of classes, we can figure out which later). We also want to keep the HTML and style of the site seperate from the code as much as possible so that it can change. This is a very important piece that osCommerce has not done well in. It can be very difficult to reskin osCommerce. So we will have a template package. We want to model an actual store in our code for a simpler and easier to code/understand system. This part will be the model and will be the one to interact with the database. Finally, we need something that takes the pages or actions of our store user, puts together the model information and the templates, and gives it back to our user. This will be our controller. So, we have a model, view, controller system we will be making. It will give us greater flexability. Here are the “MVC sections.”
The MVC (model, view, controller) sections aren’t different from the main sections described above. Rather, they are another way of looking at our system. We will have a customer class (from the model) used in the admin section, the shopping cart section, the order section, and the customer account section. The main sections above indicate the sections of the website, and the MVC sections indicate the different layers of code we will use in the website.
Right now we haven’t gotten to our classes yet. We’ve just been breaking the system up into smaller pieces. These may be organized into folders of classes or they may just be for our own reference.
We have successfully broken down the system one level. We will look at breaking down the system into small parts next time. We are on our way to a successful ecommerce solution.