. Plab – Tirgul 12 Design Patterns. Design Patterns u The De-Facto Book on Design Patterns:
Design patterns
-
Upload
oksana-demediuk -
Category
Technology
-
view
443 -
download
3
description
Transcript of Design patterns
![Page 1: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/1.jpg)
Design PatternsOksana Demediuk
![Page 2: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/2.jpg)
Design pattern is a general reusable solution to a commonly occurring problem in software design.
A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
What is Design Pattern
![Page 3: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/3.jpg)
To design a new software system quickly and efficiently.
To understand a existing software system.
Why Design Patterns
![Page 4: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/4.jpg)
Creational Design pattern– Object creation.
Structural design patterns– Relationship between entities.
Behavioral design patterns– Communication between objects.
Types of Design Pattern
![Page 5: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/5.jpg)
Periodic Table of Patterns
![Page 6: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/6.jpg)
Ensure a class has only one instance, and provide a global point of access to it.
Encapsulated “just-in-time initialization” or “initialization on first use”.
Type : Creational pattern.
Singleton Design Pattern
![Page 7: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/7.jpg)
The strategy pattern (also known as the policy
pattern) is a particular software design pattern,
whereby algorithms can be selected at runtime.
Type : Behavioral pattern.
Strategy Design pattern
![Page 8: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/8.jpg)
A facade is an object that provides a simplified interface to a larger body of code, such as a class library.
Type: Structural Design Pattern.
Facade pattern
![Page 9: Design patterns](https://reader034.fdocuments.net/reader034/viewer/2022051609/547c20eab4af9fb2188b469e/html5/thumbnails/9.jpg)
Speed up the development process by providing tested, proven development paradigms.
Help to prevent subtle issues that can cause major problems, code readability.
Provide general solutions, documented in a format that doesn't require specifics tied to a particular problem.
Allow developers to communicate using well-known, well understood names for software interactions.
A standard solution to a common programming problem enable large scale reuse of software
Design patterns advantages