0% found this document useful (0 votes)
25 views5 pages

ISE Slide 11

Uploaded by

Amna Mushtaq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

ISE Slide 11

Uploaded by

Amna Mushtaq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Introduction to Software Engineering

Slide no 11 (week 11)


Design Patterns
Design patterns are general solutions to recurring problems that developers
encounter during software design and development. They provide a way to
structure and organize code to create more maintainable, flexible, and
efficient software systems.
Creational Design Patterns
Creational design patterns deal with object creation mechanisms, trying to
create objects in a manner that suits the situation. There are five main
creational design patterns:
Singleton Pattern: Ensures a class has only one instance while providing a
global point of access to this instance.
Factory Method Pattern: Defines an interface for creating objects, but
allows subclasses to decide which class to instantiate.
Abstract Factory Pattern: Provides an interface for creating families of
related or dependent objects without specifying their concrete classes.
Builder Pattern: Separates the construction of a complex object from its
representation, allowing the same construction process to create different
representations.
Prototype Pattern: Specifies the kinds of objects to create using a
prototypical instance, making copies of the prototype to create new objects.
Structural Design Patterns
Structural design patterns focus on composition of classes or objects to form
larger structures. There are seven main structural design patterns:
Adapter Pattern: Converts the interface of a class into another interface
that clients expect, enabling incompatible classes to work together.
Bridge Pattern: Decouples an abstraction from its implementation, allowing
both to evolve independently.
Composite Pattern: Composes objects into tree structures to represent
part-whole hierarchies. Clients can treat individual objects and compositions
uniformly.
Decorator Pattern: Dynamically adds responsibilities to objects without
altering their code, providing a flexible alternative to subclassing.
Facade Pattern: Provides a unified interface to a set of interfaces in a
subsystem, simplifying complex interactions.
Flyweight Pattern: Shares objects to reduce memory usage, particularly useful
when there are a large number of similar objects.
Proxy Pattern: Provides a surrogate or placeholder for another object to
control access, add functionality, or perform optimizations.
Behavioral Design Patterns
Behavioral design patterns deal with communication between objects to
achieve specific behaviors. There are eleven main behavioral design patterns:
Chain of Responsibility Pattern: Passes a request along a chain of handlers
until it's handled or reaches the end of the chain.
Command Pattern: Turns a request into a stand-alone object, allowing
parameterization of clients with different requests.
Interpreter Pattern: Provides a way to evaluate language grammar or
expressions.
Iterator Pattern: Provides a way to access elements of a collection
sequentially without exposing its underlying representation.
Mediator Pattern: Reduces direct dependencies between objects by
introducing a mediator to coordinate interactions.
Memento Pattern: Captures an object's internal state without exposing its
structure, allowing undo/redo functionality.
Observer Pattern: Defines a dependency between objects so that when one
object changes state, its dependents are notified and updated automatically.
State Pattern: Allows an object to change its behavior when its internal
state changes.
Strategy Pattern: Defines a family of algorithms, encapsulates each one, and
makes them interchangeable.
Template Method Pattern: Defines the structure of an algorithm, allowing
subclasses to provide specific implementations of certain steps.
Visitor Pattern: Separates an algorithm from the object structure it operates
on, allowing new operations to be added without modifying the objects.
Mediator Pattern: Reduces direct dependencies between objects by
introducing a mediator to coordinate interactions.
Memento Pattern: Captures an object's internal state without exposing its
structure, allowing undo/redo functionality.
Observer Pattern: Defines a dependency between objects so that when one
object changes state, its dependents are notified and updated automatically.
State Pattern: Allows an object to change its behavior when its internal
state changes.
Strategy Pattern: Defines a family of algorithms, encapsulates each one, and
makes them interchangeable.
Template Method Pattern: Defines the structure of an algorithm, allowing
subclasses to provide specific implementations of certain steps.
Visitor Pattern: Separates an algorithm from the object structure it operates
on, allowing new operations to be added without modifying the objects.
Implementation Issues and Reusability
During software development, several implementation issues can arise, such
as:
Performance: Balancing speed and memory usage to achieve optimal
performance.
Maintainability: Designing code in a way that is easy to understand, modify,
and extend.
Scalability: Ensuring that the software can handle increased load and
demand.
Testing and Debugging: Implementing proper testing procedures to identify
and fix errors.
Security: Incorporating security measures to protect against vulnerabilities
and breaches.
Reusability is a key principle in software engineering, promoting the creation
of components that can be used across multiple projects. It improves
development efficiency, reduces redundancy, and enhances software quality.
Configuration Management
Configuration management involves tracking and controlling changes to
software, ensuring that the right version of software is being used at all
times. Key concepts include version control, change management, and release
management. Configuration management tools like Git, Subversion, and
Mercurial facilitate collaborative development and maintain a history of
changes, aiding in project management and troubleshooting.

You might also like