Code Monkey home page Code Monkey logo

oop_study's Introduction

OOP_study

  1. ducks - strategy design pattern - defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
  2. weather - observer pattern - defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
  3. beverage - the decorator pattern - attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
  4. Pizza(factory_method_and_abstract_factory(method createPizza in PizzaStore)) - factory method pattern - defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
  5. Pizza(factory_method_and_abstract_factory(ingridient factories)) - abstract factory pattern - provides an interface for creating families of related or dependent objects without specifying their concrete classes. !Main difference - factory method creates 1 object, while abstract factory can create a family of object using composition!
  6. Randomizer - singleton pattern - ensures a class has only one instance, and provides a global point of access to it.
  7. remote_control - the command pattern - encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
  8. Adapter - The Adapter Pattern - converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. (как вариант еще наследоваться от 2+ классов)
  9. Hometheatre - 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.
  10. Tempalte - Template Method Pattern - defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure.
  11. The Iterator Pattern provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation

Head First Design Patterns book

oop_study's People

Contributors

jarozin 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.