0% found this document useful (0 votes)
24 views

Lecture Design Pattern

This document discusses design patterns in software engineering. It defines design patterns as reusable solutions to common programming problems. Patterns are categorized into creational, structural, and behavioral types based on their purpose. Creational patterns handle object creation, structural patterns compose classes and objects, and behavioral patterns address communication between objects. The document outlines advantages of patterns like improved architecture and code transparency, and disadvantages such as complexity when combining multiple patterns. Overall, design patterns provide best practices for software design based on past experiences.

Uploaded by

Jooo lo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Lecture Design Pattern

This document discusses design patterns in software engineering. It defines design patterns as reusable solutions to common programming problems. Patterns are categorized into creational, structural, and behavioral types based on their purpose. Creational patterns handle object creation, structural patterns compose classes and objects, and behavioral patterns address communication between objects. The document outlines advantages of patterns like improved architecture and code transparency, and disadvantages such as complexity when combining multiple patterns. Overall, design patterns provide best practices for software design based on past experiences.

Uploaded by

Jooo lo
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Software Engineering

Module Code : ITM 09103

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

An object structural pattern describes ways to


compose objects to realise new functionality
Behavioral Patterns
Behavioral design patterns are concerned with
algorithms and the assignment of responsibilities
between objects.
Generally we can say Behavior Design Patterns are
responsible for how one class communicates with
others
Qualities of a Pattern
Encapsulation and abstraction
Encapsulates a well-defined problem and its solution in a
particular domain
Provides crisp, clear boundaries to crystallize the problem
and solution spaces
Openness and variability
is open for extension and parameterization by other
patterns
is able to solve larger problems in concert with other
patterns
Qualities of a Pattern cont..
Generativity and composability
applying a pattern once provides a context for further
applications
Equilibrium
realizes a balance among its forces and constraints
realizes an invariant, heuristics, or a policy which minimizes
conflict within the solution space
Advantage of design pattern:
They provide the solutions that help to define the
system architecture.
They capture the software engineering experiences.
They provide transparency to the design of an
application.
Drawbacks of Patterns
Patterns do not lead to direct code reuse.
Design patterns don’t guarantee an absolute solution
to a problem. They provide clarity to the system
architecture and the possibility of building a better
system
Composition of different patterns can be very
complex.
Teams may suffer from pattern overload.
Drawbacks of Patterns cont..
Patterns are validated by experience and discussion
rather than by automated testing.
Integrating patterns into a software development
process is a human intensive activity.
Conclusion
It is advised to use the design patterns during the
analysis and requirement phase of SDLC(Software
Development Life Cycle).
Design patterns ease the analysis and requirement
phase of SDLC by providing information based on
prior hands-on experiences

You might also like