Ruoyu111 / AdapterAndFacadePatterns

Head First Design Patterns - Chapter 7 - The Adapter and Facade Patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Adapter Pattern

Converts the interface of a class into another interface the clients expect. Adapter Lets class work together that couldn't otherwise because of incompatible interfaces.

The Facade Pattern

Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.

OO Principles

  • Encapsulate what varies.
  • Favor composition over inheritance.
  • Program to interfaces, not implementations.
  • Strive for loosely coupled designs between objects that interact.
  • Classes should be open for extension but closed for modification.
  • Depend on abstractions. Do not depend on concrete classes.
  • Talk only to your immediate friends.

About

Head First Design Patterns - Chapter 7 - The Adapter and Facade Patterns


Languages

Language:Java 99.4%Language:HTML 0.6%