filmov
tv
Creational Software Design Patterns in 45 minutes (Software Design Patterns Tutorial)

Показать описание
Chain of Responsibility Design Pattern:
→ It falls under behavioral design pattern.
→ It passes the request between multiple objects.
→ Avoid coupling the sender of a request to its receiver by giving more than one receiver object a chance to handle the request.
→ Chain the receiving objects and pass the request along with the chain until an object handles it.
→ It creates a chain of receiver objects for a request.
→ Each receiver contains a reference to another receiver. If one receiver cannot handle the request then it will pass to the next receiver.
(One receiver handles a request in the chain) or (One or more receivers in the chain handles a request).
Interpreter Design Pattern:
→ It falls under behavioral design pattern.
→ It provides a way to evaluate language grammar or expression.
→ It is useful for developing domain-specific languages or notations.
→ It defines the ability to define a language’s grammar.
→ Java compiler that interprets Java source code into byte-code.
→ Defines a grammatical representation for a language and an interpreter to interpret the grammar.
→ Widely used in compilers that are implemented with an Object Oriented languages.
Itearator Design Pattern:
→ It falls under behavioral design pattern.
→ It accesses the elements of a collection object in a sequential manner without any need to know its underlying representation.
→ The collection can be a List, Set, Array and it can be anything.
→ In OOPs, Iterator pattern is a design pattern in which an iterator is used to traverse a container and access the container’s elements.
→ Abstract the details of traversing the collections. Example: Different types of collections in an application such as an array, linked list, and etc. We can just traverse and iterate the elements without knowing the actual implementation.
Memento Design Pattern:
→ It falls under the behavioral design pattern
→ It restores an object to its previous state. Example: “undo” or “rollback”.
→ Basic object that is stored in different states.
→ Caretaker: Holds an ArrayList that contains all previous versions of the Memento. It can store and retrieve stored Mementos.
Null Object Design Pattern:
→ It falls under behavioral design pattern.
→ Replace “null” check.
→ Traditional method: null check for every value which has some limitations in code flow. If we follow “null object design pattern” then we can over that hurdle.
→ The default behavior for objects which has “null” or “nothing.
→ The null object class is the default implementation.
→ It would very useful if we want some special flow for something which has nothing or null value.
Example: Spam classification.
*******************************************************
Important Playlists:
Important Links:
*******************************************************
Subscribe my YouTube channels:
*******************************************************
*******************************************************
#softwaredesignpatterns #programmingline #rakesh
→ It falls under behavioral design pattern.
→ It passes the request between multiple objects.
→ Avoid coupling the sender of a request to its receiver by giving more than one receiver object a chance to handle the request.
→ Chain the receiving objects and pass the request along with the chain until an object handles it.
→ It creates a chain of receiver objects for a request.
→ Each receiver contains a reference to another receiver. If one receiver cannot handle the request then it will pass to the next receiver.
(One receiver handles a request in the chain) or (One or more receivers in the chain handles a request).
Interpreter Design Pattern:
→ It falls under behavioral design pattern.
→ It provides a way to evaluate language grammar or expression.
→ It is useful for developing domain-specific languages or notations.
→ It defines the ability to define a language’s grammar.
→ Java compiler that interprets Java source code into byte-code.
→ Defines a grammatical representation for a language and an interpreter to interpret the grammar.
→ Widely used in compilers that are implemented with an Object Oriented languages.
Itearator Design Pattern:
→ It falls under behavioral design pattern.
→ It accesses the elements of a collection object in a sequential manner without any need to know its underlying representation.
→ The collection can be a List, Set, Array and it can be anything.
→ In OOPs, Iterator pattern is a design pattern in which an iterator is used to traverse a container and access the container’s elements.
→ Abstract the details of traversing the collections. Example: Different types of collections in an application such as an array, linked list, and etc. We can just traverse and iterate the elements without knowing the actual implementation.
Memento Design Pattern:
→ It falls under the behavioral design pattern
→ It restores an object to its previous state. Example: “undo” or “rollback”.
→ Basic object that is stored in different states.
→ Caretaker: Holds an ArrayList that contains all previous versions of the Memento. It can store and retrieve stored Mementos.
Null Object Design Pattern:
→ It falls under behavioral design pattern.
→ Replace “null” check.
→ Traditional method: null check for every value which has some limitations in code flow. If we follow “null object design pattern” then we can over that hurdle.
→ The default behavior for objects which has “null” or “nothing.
→ The null object class is the default implementation.
→ It would very useful if we want some special flow for something which has nothing or null value.
Example: Spam classification.
*******************************************************
Important Playlists:
Important Links:
*******************************************************
Subscribe my YouTube channels:
*******************************************************
*******************************************************
#softwaredesignpatterns #programmingline #rakesh