Design pattern of software words computer .pptx

muslimpari2503 7 views 10 slides Jun 26, 2024
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Hello this is design presentation that tells us about software desigb


Slide Content

D esign pattern Overview, GOF

Overview Design patterns are reusable solutions to common problems that arise during software design and development. They provide a way to structure your code in a flexible and maintainable manner, often resulting in more efficient and scalable software.

Introduction to GOF What are Gang of Four (GOF) Design Patterns? The Gang of Four Design Patterns is a set of solutions to common problems we encounter in software design and development. They were first introduced in the book  Design Patterns: Elements of Reusable Object-Oriented Software , published in 1994. The book was written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides , who are collectively known as  Gang of Four .

Introduction to GOF Why they’re called Gang of Four? The  Gang of Four  are four smart people who wrote a book about clever ways to solve common problems in computer programming, and they’re called the  Gang of Four  because there were four of them who wrote the book together. Their book has been a big help to many programmers around the world . These patterns categorize into three main groups: Creational Patterns Structural Patterns Behavioral Patterns

Types Creational Patterns : Singleton Pattern : Ensures that a class has only one instance and provides a global point of access to it. Factory Method Pattern : Defines an interface for creating objects, but allows subclasses to alter the type of objects that will be created. 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.

Types Structural Patterns : Adapter Pattern : Allows incompatible interfaces to work together by wrapping an interface around an existing class. Decorator Pattern : Adds new functionality to an object dynamically without altering its structure. Facade Pattern : Provides a unified interface to a set of interfaces in a subsystem, simplifying the usage of complex systems. Composite Pattern : Composes objects into tree structures to represent part-whole hierarchies.

Types Behavioral Patterns : Observer Pattern : Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. Strategy Pattern : Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Chain of Responsibility Pattern : Passes requests along a chain of handlers. Upon receiving a request, each handler decides either to process the request or to pass it to the next handler in the chain.

Types Command Pattern : Encapsulates a request as an object, thereby allowing for parameterization of clients with queues, requests, and operations. Iterator Pattern : Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation. Architectural Patterns : Model-View-Controller (MVC) : Separates an application into three main components: Model (data and business logic), View (user interface), and Controller (handles user input).

Types Model-View- ViewModel (MVVM) : Similar to MVC but specifically designed for modern UI development, where the ViewModel exposes data and commands from the Model to the View. Layered Architecture : Divides an application into layers (e.g., presentation, business logic, data access) where each layer has a specific responsibility and interacts with adjacent layers. These patterns can greatly improve the structure, flexibility, and scalability of your software, but it's important to use them judiciously, as overusing patterns can lead to unnecessary complexity.