Giter Club home page Giter Club logo

python-design-patterns's Introduction

Learning python design patterns

2. 싱글톤 디자인 패턴

3. 팩토리 패턴

팩토리 메소드 추상 팩토리 메소드
객체 생성에 필요한 메소드가 사용자에게 노출된다 관련된 객체 집단을 생성하기 위해 한 개 이상의 팩토리 메소드가 필요하다
어떤 객체를 생성할지 결정하는 상속과 서브 클래스가 필요하다 다른 클래스 객체를 생성하기 위해 컴포지션을 사용한다
한 개의 객체를 생성하는 팩토리 메소드를 사용한다 관련된 객체 집단을 생성한다

4. 퍼사드의 다양성

5. 프록시 패턴 - 객체 접근 제어

  • 프록시 디자인 패턴
  • 프록시 패턴 사용 사례
  • 프록시 패턴의 장점
    • 무거운 객체 특히 자주 사용되는 객체를 캐싱해 어플리케이션의 성능을 향상 시킨다
    • RealSubject에 대한 접근 요청을 인증한다
    • 원격 프록시는 원격 서버간의 네트워크 연결과 데이터베이스 연결 구현에 적합하며 시스템 모니터링 용도로 사용될 수 있다
  • 퍼사드와 프록시 패턴 비교
프록시 패턴 퍼사드 패턴
실 객체의 대리 객체를 제공해 접근을 제어한다 클래스의 서브시스템에 대한 인터페이스를 제공한다
타겟 객체와 동일한 인터페이스 구조를 가지며 타겟에 대한 참조를 가지고 있다 서브시스템 간의 의존도와 통신을 최소화 한다
클라이언트와 감싸고 있는 객체 사이의 중재자 역할을 한다 퍼사드 객체는 하나의 통합된 간단한 인터페이스를 제공한다

6. 옵서버 패턴

7. 커맨드 패턴 - 요청 패턴화

8. 템플릿 메소드 패턴 - 알고리즘의 캡슐화

9. 모델-뷰 컨트롤러 - 컴파운드 패턴

10. 상태 디자인 패턴

python-design-patterns's People

Contributors

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