Software Design Patterns for Effective Development

design patterns n.w
1 / 8
Embed
Share

Explore the world of design patterns, elegant solutions to common software design problems, introduced in the book "Design Patterns: Elements of Reusable Object-Oriented Software" by the Gang of Four. Learn about the categories of design patterns, their benefits, and delve into specific patterns like the Memento Pattern and State Pattern with practical examples.

  • Design Patterns
  • Software Development
  • Gang of Four
  • Memento Pattern
  • State Pattern

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Design Patterns

  2. Design Patterns: introduction They are elegant solutions To well known problems in software design specify the way classes should be structured and should talk to one another were introduced in the book titled Design Patterns: Elements of Reusable Object-Oriented Software By the Gang of Four (GoF)

  3. Design Patterns: categories Design patterns can be categorized as Creational concerned with how to create objects Structural deals with the relationship between classes Behavioral defines the way objects should interact with one another

  4. Design Patterns: benefits Benefits They enable you to discuss projects at an abstract level They make it possible to Create reusable, maintainable and extensible code They make it easier to switch to new development frameworks

  5. Memento Pattern: introduction It: is an example of a behavioral design pattern used to implement undo mechanisms To help restore an object to a previous state Case study: Equip an editor with an undo mechanism

  6. Memento Pattern: solution Memento EditorState Originator content: String Editor content: String createState() restore(state) History states: List Caretaker push(state) pop()

  7. State Pattern: introduction It: is an example of a behavioral design pattern allows an object to alter its behavior depending on its current state Case study: Enable a Canvas to support multiple tools

  8. State Pattern: solution State Tool Context Canvas mouseDown() mouseUp() currentTool: Tool mouseDown() mouseUp() SelectionTool BrushTool Concrete StateB Concrete StateA mouseDown() mouseUp() mouseDown() mouseUp()

Related


More Related Content