Lecture Design Pattern
Lecture Design Pattern
Design Pattern
Objectives
Design pattern concepts
Design pattern classification
Advantage and disadvantage of design pattern
Design Pattern concepts
A 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.
Design Patterns Classification
Design Patterns are categorized mainly into three
categories:
Creational Design Pattern,
Structural Design Pattern, and
Behavioral Design Pattern.
These are differed from each other on the basis of
their level of detail, complexity, and scale of
applicability to the entire system being design.
Creational Patterns
Abstracts the instantiation process: Encapsulates
knowledge about which concrete classes to use and
hides how the instances of these classes are created
and put together
They reduce the dependency and controlling how the
use interaction with our class.
Structural Patterns
Are concerned with how classes and objects are
composed to form larger structures.
Design Patterns mainly responsible for assemble
object and classes into a larger structure making sure
that these structure is flexible and efficient
They are very essential for enhancing readability and
maintainability of the code.
It also ensure that functionalities are properly
separated, encapsulated
Approaches used
A class structural pattern uses inheritance to
compose interfaces or implementation