You are on page 1of 13

Planning an e-Commerce

Framework – Part - I
By: Muhammad Zeeshan Ali

1
Framework
•  A framework/software framework provides a standard
way to build and deploy applications.
• A software framework is a universal, reusable software
environment that provides particular functionality as part
of a larger software platform to facilitate development
of software applications, products and solutions.
• Examples: Ajax Framework / JavaScript Framework, Web
Framework, Oracle Application Development Framework.

2
Why a framework?
• Instead of looking to create an e-commerce system,
designed to perform all types of e-commerce tasks, we
will create a framework.
• This will make it easy to extend the needs of any e-
commerce project with minimal effort.

3
Designing a Framework
• The exact needs of a project vary from project to project,
so we will ensure it has some fundamental features,
which we can then extend to whatever we need.
• The following features will be the minimum that we will
have our framework capable of doing:
– Displaying and managing products
– Displaying and managing categories of products
– Embedding products, listings, and categories into other aspects
of a website or web application
4
Designing a Framework …
– Searching for products
– Filtering the product list based on the customers' preferences,
such as brand, or other properties
– Providing wish lists, that is, lists of products that users wish to
purchase at some point, or would like someone to purchase for
them
– Generating recommendations based on previous purchases
– Sending e-mail notifications when certain products are in stock
– Publishing ratings and reviews of products
– Providing a shopping basket to store products and quantities of
the products a customer wishes to purchase 5
Designing a Framework …
– Calculating shipping cost
– Tax cost calculations
– Managing discount codes
– Managing gift certificates
– Providing referral discounts
– Processing payments
– Allowing customers to manage their account
– Allowing us and other administrators to manage the store

6
Patterns
• There are a number of design and architectural patterns
that were designed to help provide some general, good
practices and solutions to common problems within
software design.
• There are a few patterns of particular interest to us, as we
are looking to develop a framework:
– Model-View-Controller (MVC)
– Registry
– Singleton
7
Model View Controller
(MVC)

8
PHP & MVC
• The model view controller pattern is the most used
pattern for today’s world web applications
• It has been used for the first time in Smalltalk and then
adopted and popularized by Java
• At present there are more than a dozen PHP web
frameworks based on MVC pattern

9
PHP & MVC …
• The model is responsible to manage the data.
• The view (presentation) is responsible to display the
data provided by the model in a specific format
• The controller handles the model and view layers to
work together

10
PHP & MVC …

11
PHP & MVC …

12
PHP & MVC …

13

You might also like