SlideShare a Scribd company logo
1 of 18
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

Similar to E-Commerce Applications Development

Similar to E-Commerce Applications Development (20)

ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2
 
Mvc
MvcMvc
Mvc
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 
Show Some Spine!
Show Some Spine!Show Some Spine!
Show Some Spine!
 
Mvc4
Mvc4Mvc4
Mvc4
 
An Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPagesAn Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPages
 
Laravel session 1
Laravel  session 1Laravel  session 1
Laravel session 1
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
 
Module2
Module2Module2
Module2
 
Code igniter overview
Code igniter overviewCode igniter overview
Code igniter overview
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
WebDev Crash Course
WebDev Crash CourseWebDev Crash Course
WebDev Crash Course
 
Mastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net TricksMastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net Tricks
 
Sitecore mvc
Sitecore mvcSitecore mvc
Sitecore mvc
 
AngularJS
AngularJSAngularJS
AngularJS
 
Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 

More from Muhammad Sajid

Characteristics of enterprise application software
Characteristics of enterprise application softwareCharacteristics of enterprise application software
Characteristics of enterprise application softwareMuhammad Sajid
 
The Checkout and Order Process
The Checkout and Order ProcessThe Checkout and Order Process
The Checkout and Order ProcessMuhammad Sajid
 
Enhancing the User Experience
Enhancing the User ExperienceEnhancing the User Experience
Enhancing the User ExperienceMuhammad Sajid
 
Products and Categories
Products and CategoriesProducts and Categories
Products and CategoriesMuhammad Sajid
 
E-Commerce Applications Development
E-Commerce Applications Development E-Commerce Applications Development
E-Commerce Applications Development Muhammad Sajid
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application DevelopmentMuhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMuhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMuhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMuhammad Sajid
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMuhammad Sajid
 
Your first Android App
Your first Android AppYour first Android App
Your first Android AppMuhammad Sajid
 
Group Aided Decision making revised
Group Aided Decision making revisedGroup Aided Decision making revised
Group Aided Decision making revisedMuhammad Sajid
 
Pakistan Studies notes
Pakistan Studies notesPakistan Studies notes
Pakistan Studies notesMuhammad Sajid
 
Components of Computing Game
Components of Computing GameComponents of Computing Game
Components of Computing GameMuhammad Sajid
 
Design Elements of Computing Game
Design Elements  of Computing GameDesign Elements  of Computing Game
Design Elements of Computing GameMuhammad Sajid
 

More from Muhammad Sajid (20)

eCommerce App Lecture
eCommerce App LectureeCommerce App Lecture
eCommerce App Lecture
 
Characteristics of enterprise application software
Characteristics of enterprise application softwareCharacteristics of enterprise application software
Characteristics of enterprise application software
 
The Checkout and Order Process
The Checkout and Order ProcessThe Checkout and Order Process
The Checkout and Order Process
 
The Shopping Basket
The Shopping BasketThe Shopping Basket
The Shopping Basket
 
Enhancing the User Experience
Enhancing the User ExperienceEnhancing the User Experience
Enhancing the User Experience
 
Products and Categories
Products and CategoriesProducts and Categories
Products and Categories
 
E-Commerce Applications Development
E-Commerce Applications Development E-Commerce Applications Development
E-Commerce Applications Development
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENT
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENT
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENT
 
MOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENTMOBILE APPLICATION DEVELOPMENT
MOBILE APPLICATION DEVELOPMENT
 
Your first Android App
Your first Android AppYour first Android App
Your first Android App
 
Group Aided Decision making revised
Group Aided Decision making revisedGroup Aided Decision making revised
Group Aided Decision making revised
 
Pakistan Studies notes
Pakistan Studies notesPakistan Studies notes
Pakistan Studies notes
 
Components of Computing Game
Components of Computing GameComponents of Computing Game
Components of Computing Game
 
Design Elements of Computing Game
Design Elements  of Computing GameDesign Elements  of Computing Game
Design Elements of Computing Game
 

Recently uploaded

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

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.