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

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Último (20)

Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptxHVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdf
 

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.