SlideShare a Scribd company logo
CMP-3110 ~ E-Commerce Applications Development
Lecture 02
Planning Our Framework
Framework
• Definition
• a basic structure underlying a system, concept, or text.
• In general, a framework is a real or conceptual structure intended to serve as
a support or guide for the building of something that expands the structure
into something useful.
Patterns
• Definition
• a design pattern is a general repeatable solution to a commonly occurring
problem in software design.
• A design pattern isn't a finished design that can be transformed directly into
code
• Uses of Design Patterns
• speed up the development process
• providing tested, proven development paradigms
Patterns
Which patterns will be used?
• Model-View-Controller (MVC)
• Registry
• Singleton
Model-View-Controller (MVC)
• Model
• Represents an object. It can also have logic to update controller if its data
changes.
• View
• Represents the visualization of the data that model contains.
• Controller
• Acts on both model and view. It controls the data flow into model object and
updates the view whenever data changes. It keeps view and model separate.
Model-View-Controller (MVC)
Model-View-Controller (MVC)
Model-View-Controller (MVC)
Reference: Software Engineering by Ian Summerville – 9th edition
Registry
• Provides a means to store a collection of objects within our
framework (Container of objects for reuse).
• Each set of controllers and models we create need to perform some
shared tasks, including:
• Querying the database
• Checking if the user is logged in, and if so, getting certain user data
• Sending data to the views to be generated (template management)
• Sending e-mails, for instance to confirm a purchase with the customer
• Interacting with the server's filesystem, for instance to upload photographs of
products
Registry
Singleton
• Restrict an object to one instance only
• However, we will use it to ensure we have only one instance of our
registry available in the framework at any point of time.
File/Folder Structure
Building a Framework
Pattern Implementation: MVC
Pattern Implementation: Registry
• Needs
• It needs to have a method to create certain objects and store them with a key.
• It needs another method, which when passed with a key as a parameter,
returns the object in question.
• working
• Processing the incoming URL, so our “index.php” file can route the request
correctly
• Building URLs based on a series of parameters, a query string, and the
URLdisplay/generation method we use
• Pagination
Pattern Implementation: Registry
• The code in the book makes up the basics of our registry, with two
arrays:
• One for objects
• One for settings
Pattern Implementation: Singleton
• The singleton pattern is very easy to implement, as it requires only a
few minor changes to a standard PHP class, to ensure that it is only
ever instantiated once.
• Needs
• A private constructor is used to prevent the direct creation of objects from
the class.
• The expensive process is performed within the private constructor.
• The only way to create an instance from the class is by using a static method
that creates the object only if it wasn't already created.
Routing requests

More Related Content

PDF
Asp 1-mvc introduction
Fajar Baskoro
 
PDF
Asp 1a-aspnetmvc
Fajar Baskoro
 
PDF
Aspnetmvc 1
Fajar Baskoro
 
PPTX
Getting started with MVC 5 and Visual Studio 2013
Thomas Robbins
 
PPTX
MVC + ORM (with project implementation)
Prateek Chauhan
 
PPTX
Spring Web Presentation 123143242341234234
horiadobrin
 
PPTX
MVC architecture by Mohd.Awais on 18th Aug, 2017
Innovation Studio
 
PPTX
Architectural Design & Patterns
Inocentshuja Ahmad
 
Asp 1-mvc introduction
Fajar Baskoro
 
Asp 1a-aspnetmvc
Fajar Baskoro
 
Aspnetmvc 1
Fajar Baskoro
 
Getting started with MVC 5 and Visual Studio 2013
Thomas Robbins
 
MVC + ORM (with project implementation)
Prateek Chauhan
 
Spring Web Presentation 123143242341234234
horiadobrin
 
MVC architecture by Mohd.Awais on 18th Aug, 2017
Innovation Studio
 
Architectural Design & Patterns
Inocentshuja Ahmad
 

Similar to E-Commerce Applications Development (20)

PPTX
MVC Framework
Ashton Feller
 
PPTX
ASP.NET Core Demos Part 2
Erik Noren
 
PPTX
Mvc
Furqan Ashraf
 
PPT
Ember.js: Jump Start
Viacheslav Bukach
 
PPTX
Show Some Spine!
Geoff Gerrietts
 
PPTX
Mvc4
Muhammad Younis
 
PPTX
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
PPTX
Laravel session 1
Ashish Kumar
 
PPT
Web engineering - MVC
Nosheen Qamar
 
PPTX
Module2
Hoàng Lê
 
PPT
Code igniter overview
umesh patil
 
PPTX
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
PPTX
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
PPTX
Using MVC with Kentico 8
Thomas Robbins
 
PPTX
BackboneJS
Artemii Kravtsov
 
PDF
WebDev Crash Course
Cesar Martinez
 
PDF
Mastering asp.net mvc - Dot Net Tricks
Gaurav Singh
 
PPTX
Sitecore mvc
pratik satikunvar
 
PPTX
AngularJS
Yogesh L
 
PPTX
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
MVC Framework
Ashton Feller
 
ASP.NET Core Demos Part 2
Erik Noren
 
Ember.js: Jump Start
Viacheslav Bukach
 
Show Some Spine!
Geoff Gerrietts
 
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
Laravel session 1
Ashish Kumar
 
Web engineering - MVC
Nosheen Qamar
 
Module2
Hoàng Lê
 
Code igniter overview
umesh patil
 
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
Using MVC with Kentico 8
Thomas Robbins
 
BackboneJS
Artemii Kravtsov
 
WebDev Crash Course
Cesar Martinez
 
Mastering asp.net mvc - Dot Net Tricks
Gaurav Singh
 
Sitecore mvc
pratik satikunvar
 
AngularJS
Yogesh L
 
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
Ad

More from Muhammad Sajid (20)

PPTX
eCommerce App Lecture
Muhammad Sajid
 
PPTX
Characteristics of enterprise application software
Muhammad Sajid
 
PPTX
The Checkout and Order Process
Muhammad Sajid
 
PPTX
The Shopping Basket
Muhammad Sajid
 
PPTX
Enhancing the User Experience
Muhammad Sajid
 
PPTX
Products and Categories
Muhammad Sajid
 
PPTX
E-Commerce Applications Development
Muhammad Sajid
 
PPTX
Data Transfer between Activities & Databases
Muhammad Sajid
 
PPTX
Data Transfer between Activities & Databases
Muhammad Sajid
 
PPTX
Data Transfer between Activities & Databases
Muhammad Sajid
 
PDF
Mobile Application Development
Muhammad Sajid
 
PDF
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
PDF
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
PDF
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
PDF
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
PPTX
Your first Android App
Muhammad Sajid
 
PPTX
Group Aided Decision making revised
Muhammad Sajid
 
PDF
Pakistan Studies notes
Muhammad Sajid
 
PDF
Components of Computing Game
Muhammad Sajid
 
PDF
Design Elements of Computing Game
Muhammad Sajid
 
eCommerce App Lecture
Muhammad Sajid
 
Characteristics of enterprise application software
Muhammad Sajid
 
The Checkout and Order Process
Muhammad Sajid
 
The Shopping Basket
Muhammad Sajid
 
Enhancing the User Experience
Muhammad Sajid
 
Products and Categories
Muhammad Sajid
 
E-Commerce Applications Development
Muhammad Sajid
 
Data Transfer between Activities & Databases
Muhammad Sajid
 
Data Transfer between Activities & Databases
Muhammad Sajid
 
Data Transfer between Activities & Databases
Muhammad Sajid
 
Mobile Application Development
Muhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
Muhammad Sajid
 
Your first Android App
Muhammad Sajid
 
Group Aided Decision making revised
Muhammad Sajid
 
Pakistan Studies notes
Muhammad Sajid
 
Components of Computing Game
Muhammad Sajid
 
Design Elements of Computing Game
Muhammad Sajid
 
Ad

Recently uploaded (20)

PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 

E-Commerce Applications Development

  • 1. CMP-3110 ~ E-Commerce Applications Development Lecture 02 Planning Our Framework
  • 2. Framework • Definition • a basic structure underlying a system, concept, or text. • In general, a framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful.
  • 3. Patterns • Definition • a design pattern is a general repeatable solution to a commonly occurring problem in software design. • A design pattern isn't a finished design that can be transformed directly into code • Uses of Design Patterns • speed up the development process • providing tested, proven development paradigms
  • 4. Patterns Which patterns will be used? • Model-View-Controller (MVC) • Registry • Singleton
  • 5. Model-View-Controller (MVC) • Model • Represents an object. It can also have logic to update controller if its data changes. • View • Represents the visualization of the data that model contains. • Controller • Acts on both model and view. It controls the data flow into model object and updates the view whenever data changes. It keeps view and model separate.
  • 8. Model-View-Controller (MVC) Reference: Software Engineering by Ian Summerville – 9th edition
  • 9. Registry • Provides a means to store a collection of objects within our framework (Container of objects for reuse). • Each set of controllers and models we create need to perform some shared tasks, including: • Querying the database • Checking if the user is logged in, and if so, getting certain user data • Sending data to the views to be generated (template management) • Sending e-mails, for instance to confirm a purchase with the customer • Interacting with the server's filesystem, for instance to upload photographs of products
  • 11. Singleton • Restrict an object to one instance only • However, we will use it to ensure we have only one instance of our registry available in the framework at any point of time.
  • 15. Pattern Implementation: Registry • Needs • It needs to have a method to create certain objects and store them with a key. • It needs another method, which when passed with a key as a parameter, returns the object in question. • working • Processing the incoming URL, so our “index.php” file can route the request correctly • Building URLs based on a series of parameters, a query string, and the URLdisplay/generation method we use • Pagination
  • 16. Pattern Implementation: Registry • The code in the book makes up the basics of our registry, with two arrays: • One for objects • One for settings
  • 17. Pattern Implementation: Singleton • The singleton pattern is very easy to implement, as it requires only a few minor changes to a standard PHP class, to ensure that it is only ever instantiated once. • Needs • A private constructor is used to prevent the direct creation of objects from the class. • The expensive process is performed within the private constructor. • The only way to create an instance from the class is by using a static method that creates the object only if it wasn't already created.