GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaScript-Design-Patterns/GoF/classic/Structural/Facade at master · irynaO/JavaScript-Design-Patterns

Expand file tree

/

Facade

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

Facade

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
CoffeeScript
CoffeeScript
 
 
ECMAScript
ECMAScript
 
 
TypeScript
TypeScript
 
 
Facade.dia
Facade.dia
 
 
Facade.png
Facade.png
 
 
README.md
README.md
 
 

README.md

Outline

Synopsis

I love my pets but, due to Alzheimer's disease, I often forget how to feed them. Any help would be appreciated.

Problem

The more pets you have, the more difficult it will be to remember the menu for each animal. Complexity can grow quite fast, which is not ideal in terms of code (re)usability. We should keep it simple, stupid (KISS).

Solution

Facade is often used to hide the underlying complexity of a system. To implement this design pattern, we can:

  • Create an abstract representation of an Animal (abstract class or interface)
  • Create concrete implementations of this abstraction (Dog & Rabbit)
  • Create a "class" that will make it easy to use the concrete implementations (HowToFeedAnimals)

Facade (classic)

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.