Skip to content

steeeee0223/rust-hfdp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Head First Design Pattern

This repo contains a walk through of the book Head First Design Pattern implemented in Rust.

Patterns

Behaviorial Patterns

  • Strategy Patterns (cf. HFDP Ch1)
  • Observer Patterns (cf. HFDP Ch2)
  • Command Patterns (cf. HFDP Ch6)
    • Command 1: Simple Remote Control
    • Command 2: Remote Control (with slots of commands & undo)
    • Command 3: Remote Control (with undo)
    • Command 4: Macro Command - Party Mode Remote Control
  • Template Method Patterns (cf. HFDP Ch 7)
    • Template 1: Beverages (with hook)
    • Template 2: Sorting Ducks (implementing built-in traits)
  • State Patterns (cf. HFDP Ch 10)
    • State 1: Original Gumball Machine
    • State 2: Gumball Machine (with random winning state)
    • State 3: Password manager (in compile time solution)
      • This solution refers to YouTube
      • This solution is unappliable to Gumball Machine
  • Chain of Responsibility (cf. HFDP A3)
  • Interpreter Patterns (cf. HFDP A5)
  • Mediator Patterns (cf. HFDP A6)
  • Memento Patterns (cf. HFDP A7)
  • Visitor Patterns (cf. HFDP A9)

Structural Patterns

  • Decorator Patterns (cf. HFDP Ch3)
  • Adapter Patterns (cf. HFDP Ch7)
    • Adapter 1: Duck & Turkey
    • Adapter 2: TODO Iterator & Enumeration
  • Facade Patterns (cf. HFDP Ch7)
    • Facade 1: Home Theater
  • Iterator Patterns (cf. HFDP Ch9)
    • Iterator 1: Menus (using IntoIter trait)
  • Composite Patterns (cf. HFDP Ch9)
    • Composite 1: Menus with Sub-Menus
    • Composite 2: Menus with Sub-Menus (refactored with enum)
    • Composite 3: TODO Vegetarian Menu (implemented Iterator)
  • Proxy Patterns (cf. HFDP Ch11)
  • Bridge Patterns (cf. HFDP A1)
  • Flyweight Patterns (cf. HFDP A4)

Creational Patterns

  • Factory Patterns (cf. HFDP Ch4)
    • Factory 1: Simple Factory
    • Factory 2: Factory Pattern
    • Factory 3: Abstract Factory
  • Singleton Patterns (cf. HFDP Ch5)
    • Singleton 1: Chocolate boiler
    • Singleton 2: Singleton as generic macro
  • Builder Patterns (cf. HFDP A2)
  • Prototype Patterns (cf. HFDP A8)

Releases

No releases published

Packages

No packages published

Languages