SlideShare una empresa de Scribd logo
1 de 35
FAÇADE 아.꿈.사.    LHS87
What is the Façade? n. (건물의) 정면(front), (길에 접해 있는) 앞면;겉보기, 외관, 허울 -From Naver Dictionary A facade is an object that provides a simplified interface to a larger body of code, such as a class library -From WIKIPEDIA
Structure
Example
Code
What are the good points? make a software library easier to use and understand, since the     facade has convenient methods for common tasks 2.  make code that uses the library more readable, for the same reason 3.reduce dependencies of outside code on the inner workings     of a library, since most code uses the facade, thus allowing more flexibility    in developing the system 4.  wrapa poorly-designed collection of APIs with a single            well-designed API
Thank you
MEDIATOR 아.꿈.사.    LHS87
What is the Mediator? n. 중재인, 조정자, 매개자 -From Naver Dictionary Communicationbetween  object is encapsulatedwith a mediator object. Objects no longer communicate directly with each other, but instead communicate through the mediator. -From WIKIPEDIA
Terran Mediator 가스 내놔 일꾼내놔 배틀크루져 줘 자원 내놔 병사가 될 사람을 줘 전쟁 나갈 병사를 줘 식량좀 줘
Structure
Example
Code
Code
What are the good point? reduces the dependencies between communicating objects thereby lowering the coupling
Thank you
SINGLETON 아.꿈.사.    LHS87
What is the Singleton? n. 하나씩 일어나는 일[것], 홀로인 것, 독자(獨子) -From Naver Dictionary In software engineering the singleton pattern is a design pattern that is used to restrict instantiation of  a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems  that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects (say, five). -From WIKIPEDIA
Structure
Code
Combination
Thank you
MONOSTATE 아.꿈.사.    LHS87
What is the Monostate? mono- 《연결형》 「단일의; 단분자의;【화학】 1원자를 함유한」의 뜻(opp. poly-) -From Naver Dictionary The monostateenforces the behavior of  a singleton without the structure of the monostate. 그녀의 별명들… 1.깝탱 2.백설기 3.탱 4.탱구 5.꼬꼬마리더태연 6.때때 7.젤리 Symbolic link
Simple Code
What are the good points? 1. 투명성, 사용자가 이 객체가 MONOSTATE라는 것을 알 필요가 없다. 2.  파생가능성, 어떤 MONOSTATE의 파생 클래스는 같은 MONOSTATE의 일부 3.다형성, 파생 클래스에서 같은 정적 변수의 집합에 대해 서로 다른 동작 제공 가능
      Singleton                vsMonostate creating a single state  that all of the instances use.  limiting an object to  a single instance of that object can't be instantiated via  normal mechanisms. a different semantic  to object instantiation  but retains the same syntax. developers always know when they're dealing with a singleton  Classes derived singleton classes are not singletons by default all classes derived from a monostate  are monostates.
Thank you
NULL OBJECT 아.꿈.사.    LHS87
What is the Null object? provides intelligent do nothing behavior, hiding the details from its collaborators.
Structure
Code
What are the good points? makes client code simple. Clients can treat real collaborators     and null collaborators uniformly. Clients normally don't know (and shouldn't care) whether they're dealing with a real or a null collaborator. makes the do nothing code in the null object easy to reuse. Multiple  clients which all need their collaborators to do nothing will  all do nothing the same way. If the do nothing behavior needs to be modified, the code can be changed in one place. Thereafter, all clients will continue to use the same do nothing behavior, which is now the modified do nothing behavior.
Thank you

Más contenido relacionado

La actualidad más candente (6)

Cyclic Neural Networks
Cyclic Neural NetworksCyclic Neural Networks
Cyclic Neural Networks
 
Java day2016 "Reinventing design patterns with java 8"
Java day2016 "Reinventing design patterns with java 8"Java day2016 "Reinventing design patterns with java 8"
Java day2016 "Reinventing design patterns with java 8"
 
Tensorflow
TensorflowTensorflow
Tensorflow
 
the Concept of Object-Oriented Programming
the Concept of Object-Oriented Programmingthe Concept of Object-Oriented Programming
the Concept of Object-Oriented Programming
 
Mediator Pattern
Mediator PatternMediator Pattern
Mediator Pattern
 
Java design patterns
Java design patternsJava design patterns
Java design patterns
 

Destacado

Destacado (8)

Design pattern - Facade Pattern
Design pattern - Facade PatternDesign pattern - Facade Pattern
Design pattern - Facade Pattern
 
Facade Pattern
Facade PatternFacade Pattern
Facade Pattern
 
Glass in buildings
Glass in buildingsGlass in buildings
Glass in buildings
 
The World's Most Fascinating Building Facades Today
The World's Most Fascinating Building Facades TodayThe World's Most Fascinating Building Facades Today
The World's Most Fascinating Building Facades Today
 
Advanced Building Materials
Advanced Building MaterialsAdvanced Building Materials
Advanced Building Materials
 
Curtain Wall Systems
Curtain Wall SystemsCurtain Wall Systems
Curtain Wall Systems
 
Facade - presentation
Facade - presentationFacade - presentation
Facade - presentation
 
Structural glazing
Structural glazingStructural glazing
Structural glazing
 

Similar a Five pattern(facade mediator_singleton_monostate_null)

The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
guestebd714
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
achraf_ing
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
Jessica Deakin
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
Bharath Choudhary
 

Similar a Five pattern(facade mediator_singleton_monostate_null) (20)

01. design pattern
01. design pattern01. design pattern
01. design pattern
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Java_Interview Qns
Java_Interview QnsJava_Interview Qns
Java_Interview Qns
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Ooad 2
Ooad 2Ooad 2
Ooad 2
 
Ooad
OoadOoad
Ooad
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
Mac/iOS Design Patterns
Mac/iOS Design PatternsMac/iOS Design Patterns
Mac/iOS Design Patterns
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Design pattern 1
Design pattern 1Design pattern 1
Design pattern 1
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Five pattern(facade mediator_singleton_monostate_null)

  • 2. What is the Façade? n. (건물의) 정면(front), (길에 접해 있는) 앞면;겉보기, 외관, 허울 -From Naver Dictionary A facade is an object that provides a simplified interface to a larger body of code, such as a class library -From WIKIPEDIA
  • 6. What are the good points? make a software library easier to use and understand, since the facade has convenient methods for common tasks 2. make code that uses the library more readable, for the same reason 3.reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system 4. wrapa poorly-designed collection of APIs with a single well-designed API
  • 9. What is the Mediator? n. 중재인, 조정자, 매개자 -From Naver Dictionary Communicationbetween object is encapsulatedwith a mediator object. Objects no longer communicate directly with each other, but instead communicate through the mediator. -From WIKIPEDIA
  • 10. Terran Mediator 가스 내놔 일꾼내놔 배틀크루져 줘 자원 내놔 병사가 될 사람을 줘 전쟁 나갈 병사를 줘 식량좀 줘
  • 13. Code
  • 14. Code
  • 15. What are the good point? reduces the dependencies between communicating objects thereby lowering the coupling
  • 18. What is the Singleton? n. 하나씩 일어나는 일[것], 홀로인 것, 독자(獨子) -From Naver Dictionary In software engineering the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects (say, five). -From WIKIPEDIA
  • 20. Code
  • 24. What is the Monostate? mono- 《연결형》 「단일의; 단분자의;【화학】 1원자를 함유한」의 뜻(opp. poly-) -From Naver Dictionary The monostateenforces the behavior of a singleton without the structure of the monostate. 그녀의 별명들… 1.깝탱 2.백설기 3.탱 4.탱구 5.꼬꼬마리더태연 6.때때 7.젤리 Symbolic link
  • 26. What are the good points? 1. 투명성, 사용자가 이 객체가 MONOSTATE라는 것을 알 필요가 없다. 2. 파생가능성, 어떤 MONOSTATE의 파생 클래스는 같은 MONOSTATE의 일부 3.다형성, 파생 클래스에서 같은 정적 변수의 집합에 대해 서로 다른 동작 제공 가능
  • 27. Singleton vsMonostate creating a single state that all of the instances use. limiting an object to a single instance of that object can't be instantiated via normal mechanisms. a different semantic to object instantiation but retains the same syntax. developers always know when they're dealing with a singleton Classes derived singleton classes are not singletons by default all classes derived from a monostate are monostates.
  • 30. What is the Null object? provides intelligent do nothing behavior, hiding the details from its collaborators.
  • 32. Code
  • 33.
  • 34. What are the good points? makes client code simple. Clients can treat real collaborators and null collaborators uniformly. Clients normally don't know (and shouldn't care) whether they're dealing with a real or a null collaborator. makes the do nothing code in the null object easy to reuse. Multiple clients which all need their collaborators to do nothing will all do nothing the same way. If the do nothing behavior needs to be modified, the code can be changed in one place. Thereafter, all clients will continue to use the same do nothing behavior, which is now the modified do nothing behavior.