Giter Site home page Giter Site logo

design-patterns-abstract-factory's Introduction

Abstract Factory Design Pattern

It would be helpful to familiarize yourself with the Factory Design Pattern before tackling this project.

Much like the Factory Design Pattern, the Abstract Factory Design Pattern is a way of obtaining concrete classes, without the need for defining them as a such. It allows for flexibility in making changes.

The difference is that the factory, itself if abstract, instead of just the resulting objects returned by the factory.

In this project's example, we're using colors to define if we would like to generate "Light" or "Dark" versions. We don't care how the colors are generated and we don't want to receive a copy of them. Instead, we're going to allow our factory to generate the color and hold the information, for when we need it later.

You will see how the factory inherits from an abstract class and implements a way to interrogate it for the current color.

Please feel free to make changes that correct errors

design-patterns-abstract-factory's People

Contributors

dstorrence avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.