SlideShare a Scribd company logo
1 of 30
1
Nadeesha Thilakarathne
Content
• Definitions of Design Patterns
• Model-View-Controller
• Design Pattern Types
• Singleton Design Pattern
2
Definitions of Design Patterns
• “Design patterns are recurring solutions to design problems you see
over & over” [smaltalk Companion]
• “Design patterns constitute a set of rules describing how to
accomplish certain tasks in the realm of software development “
[Pree,1994]
• “Design patterns focus more on reuse of recurring architectural
design themes, while frameworks focus on detailed design &
implementation”[Coplien & Schmid ,1995]
3
Definitions of Design Patterns
• “A pattern addresses a recurring design problem that arise in
specific design situations & presents a solution to it” [Buschmann et
al.,1996]
• “Patterns identify & specify abstractions that are above the level of
single classes and instances, or of components.”[Gammar et
al.,1993]
4
Model-View-Controller
• The Model-View-Controller (MVC) pattern is one of the earliest and
one of the most successful design patterns. It was developed by
Trygve Reenskaug in 1979.
Controller
Data Model
View
5
Model-View-Controller
• Data Model : Contains the computation part of the program
• View : Which presents the user interface
• Controller : Which interacts between the user & the view
6
Model-View-Controller
• Employee Object as a Model
• EmployeeView a Class which display Employee Information as a View
• EmployeeControl a Class which controls the data flow into model
object and updates the view whenever data changes - Controller.
7
Model-View-Controller Interaction
• It helps to separate the application’s concerns
EmployeeController
EmployeeModel
EmployeeView
Sees Uses
ManipulateUpdate
8
Data Model
• Data ,methods for accessing and modifying state
• A model stores data that is retrieved according to commands from
the controller and displayed in the view
9
Data Model
Object of this class can use to hold
the data & methods
10
View
• When model changed view must update
• A view generates an output presentation to the user based on
changes in the model
11
View
Present Information in Console Window
12
Controller
• Translate user actions into operations on the model. Act as a
separator between Model & View.
• A controller can send commands to the
• Model to update the model's state (e.g., editing a document)
• Associated view to change the view's presentation of the model (e.g., by
scrolling through a document).
13
Controller
14
Test Class
15
Design Pattern Types
• Creational Patterns
• Structural Patterns
• Behavioral Patterns
16
Creational Patterns
• Deals with object creation
• Control the object creation
• Trying to create objects in a manner suitable to the situation
17
Creational Patterns
1. Abstract Factory
2. Builder
3. Factory Method
4. Object Pool
5. Prototype
6. Singleton
18
Singleton Pattern
• Define a class that has only one instance(class must ensure that only
single instance should be created)
• Provides a global point of access to it(single object can be used by all
other classes)
“Is a class of which there may be no more than one instance. It provides single global
point of access to that instance”
19
Singleton Pattern – When to Use
• When it’s important to have only one instance of a class
• Only a print spooler
• One window manager
• One point of access to database engine
• Among several serial ports only one instance of COM1
• Centralized management of internal or external resources and they
provide a global point of access to themselves
• Singleton pattern is mostly used in multi-threaded and database
applications.
20
Forms of Singleton Pattern
Singleton Pattern
Early Instantiation
(Load Time instance
creation)
Lazy Instantiation
(Create instance
when required)
21
Singleton Pattern - Advantages
• Reuse single instance – save memory
22
Singleton Pattern – UML
<<public class >>
23
Singleton Pattern – Class
• Static member
• Store the instance of the class
• Get memory only once as it is static
• Private constructor
• Prevent creating instances outside the class
• Static factory method (“Static factory method is simply a static method that returns an instance of a class.“)
• Provides the global point of access to the Singleton object
• Returns the instance to the caller.
24
Singleton Pattern – Early Instantiation
• Create the instance of the class at the time of class loading
25
Singleton Pattern – lazy Instantiation
• Create the instance of the class in synchronized method or
synchronized block
• Instance of the class is created when required
26
Singleton Pattern – lazy Instantiation
27
Conclusion
• MVC Pattern stands for Model-View-Controller Pattern. This pattern
is used to separate application's concerns.
• Singleton Pattern Is a class of which there may be no more than one
instance. It provides single global point of access to that instance
28
References
• https://sourcemaking.com/design_patterns/creational_patterns
• http://www.oodesign.com/singleton-pattern.html#early-singleton
• http://www.javatpoint.com/core-java-design-patterns
• Java Design Patterns – James W.Cooper
29
30

More Related Content

Similar to Design Patterns Explained: MVC, Singleton and More

Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptxSachin Patidar
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & PatternsInocentshuja Ahmad
 
Sitecore MVC (User Group Conference, May 23rd 2014)
Sitecore MVC (User Group Conference, May 23rd 2014)Sitecore MVC (User Group Conference, May 23rd 2014)
Sitecore MVC (User Group Conference, May 23rd 2014)Ruud van Falier
 
E-Commerce Applications Development
E-Commerce Applications Development E-Commerce Applications Development
E-Commerce Applications Development Muhammad Sajid
 
Architecture of Object Oriented Software Engineering
Architecture of Object Oriented Software EngineeringArchitecture of Object Oriented Software Engineering
Architecture of Object Oriented Software EngineeringSandesh Jonchhe
 
Desing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDesing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDareen Alhiyari
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
I gotta dependency on dependency injection
I gotta dependency on dependency injectionI gotta dependency on dependency injection
I gotta dependency on dependency injectionmhenroid
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternTalentica Software
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2Julie Iskander
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxanguraju1
 
Prototype design patterns
Prototype design patternsPrototype design patterns
Prototype design patternsThaichor Seng
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introductionFajar Baskoro
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 

Similar to Design Patterns Explained: MVC, Singleton and More (20)

Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptx
 
Design Patterns - GOF
Design Patterns - GOFDesign Patterns - GOF
Design Patterns - GOF
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & Patterns
 
Sitecore MVC (User Group Conference, May 23rd 2014)
Sitecore MVC (User Group Conference, May 23rd 2014)Sitecore MVC (User Group Conference, May 23rd 2014)
Sitecore MVC (User Group Conference, May 23rd 2014)
 
E-Commerce Applications Development
E-Commerce Applications Development E-Commerce Applications Development
E-Commerce Applications Development
 
Architecture of Object Oriented Software Engineering
Architecture of Object Oriented Software EngineeringArchitecture of Object Oriented Software Engineering
Architecture of Object Oriented Software Engineering
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
Desing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDesing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim Fawcett
 
Design p atterns
Design p atternsDesign p atterns
Design p atterns
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
I gotta dependency on dependency injection
I gotta dependency on dependency injectionI gotta dependency on dependency injection
I gotta dependency on dependency injection
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design Pattern
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
Real-Time Design Patterns
Real-Time Design PatternsReal-Time Design Patterns
Real-Time Design Patterns
 
Prototype design patterns
Prototype design patternsPrototype design patterns
Prototype design patterns
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 

Recently uploaded

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Design Patterns Explained: MVC, Singleton and More

  • 2. Content • Definitions of Design Patterns • Model-View-Controller • Design Pattern Types • Singleton Design Pattern 2
  • 3. Definitions of Design Patterns • “Design patterns are recurring solutions to design problems you see over & over” [smaltalk Companion] • “Design patterns constitute a set of rules describing how to accomplish certain tasks in the realm of software development “ [Pree,1994] • “Design patterns focus more on reuse of recurring architectural design themes, while frameworks focus on detailed design & implementation”[Coplien & Schmid ,1995] 3
  • 4. Definitions of Design Patterns • “A pattern addresses a recurring design problem that arise in specific design situations & presents a solution to it” [Buschmann et al.,1996] • “Patterns identify & specify abstractions that are above the level of single classes and instances, or of components.”[Gammar et al.,1993] 4
  • 5. Model-View-Controller • The Model-View-Controller (MVC) pattern is one of the earliest and one of the most successful design patterns. It was developed by Trygve Reenskaug in 1979. Controller Data Model View 5
  • 6. Model-View-Controller • Data Model : Contains the computation part of the program • View : Which presents the user interface • Controller : Which interacts between the user & the view 6
  • 7. Model-View-Controller • Employee Object as a Model • EmployeeView a Class which display Employee Information as a View • EmployeeControl a Class which controls the data flow into model object and updates the view whenever data changes - Controller. 7
  • 8. Model-View-Controller Interaction • It helps to separate the application’s concerns EmployeeController EmployeeModel EmployeeView Sees Uses ManipulateUpdate 8
  • 9. Data Model • Data ,methods for accessing and modifying state • A model stores data that is retrieved according to commands from the controller and displayed in the view 9
  • 10. Data Model Object of this class can use to hold the data & methods 10
  • 11. View • When model changed view must update • A view generates an output presentation to the user based on changes in the model 11
  • 12. View Present Information in Console Window 12
  • 13. Controller • Translate user actions into operations on the model. Act as a separator between Model & View. • A controller can send commands to the • Model to update the model's state (e.g., editing a document) • Associated view to change the view's presentation of the model (e.g., by scrolling through a document). 13
  • 16. Design Pattern Types • Creational Patterns • Structural Patterns • Behavioral Patterns 16
  • 17. Creational Patterns • Deals with object creation • Control the object creation • Trying to create objects in a manner suitable to the situation 17
  • 18. Creational Patterns 1. Abstract Factory 2. Builder 3. Factory Method 4. Object Pool 5. Prototype 6. Singleton 18
  • 19. Singleton Pattern • Define a class that has only one instance(class must ensure that only single instance should be created) • Provides a global point of access to it(single object can be used by all other classes) “Is a class of which there may be no more than one instance. It provides single global point of access to that instance” 19
  • 20. Singleton Pattern – When to Use • When it’s important to have only one instance of a class • Only a print spooler • One window manager • One point of access to database engine • Among several serial ports only one instance of COM1 • Centralized management of internal or external resources and they provide a global point of access to themselves • Singleton pattern is mostly used in multi-threaded and database applications. 20
  • 21. Forms of Singleton Pattern Singleton Pattern Early Instantiation (Load Time instance creation) Lazy Instantiation (Create instance when required) 21
  • 22. Singleton Pattern - Advantages • Reuse single instance – save memory 22
  • 23. Singleton Pattern – UML <<public class >> 23
  • 24. Singleton Pattern – Class • Static member • Store the instance of the class • Get memory only once as it is static • Private constructor • Prevent creating instances outside the class • Static factory method (“Static factory method is simply a static method that returns an instance of a class.“) • Provides the global point of access to the Singleton object • Returns the instance to the caller. 24
  • 25. Singleton Pattern – Early Instantiation • Create the instance of the class at the time of class loading 25
  • 26. Singleton Pattern – lazy Instantiation • Create the instance of the class in synchronized method or synchronized block • Instance of the class is created when required 26
  • 27. Singleton Pattern – lazy Instantiation 27
  • 28. Conclusion • MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. • Singleton Pattern Is a class of which there may be no more than one instance. It provides single global point of access to that instance 28
  • 29. References • https://sourcemaking.com/design_patterns/creational_patterns • http://www.oodesign.com/singleton-pattern.html#early-singleton • http://www.javatpoint.com/core-java-design-patterns • Java Design Patterns – James W.Cooper 29
  • 30. 30