O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Facade Pattern

7.132 visualizações

Publicada em

Facade Pattern by Alberto Borda, 2nd September 2009

Publicada em: Negócios, Tecnologia

Facade Pattern

  1. 1. Facade Pattern<br />Melbourne Patterns Group<br />Presented by Alberto Borda<br />
  2. 2. Any fool can write code that a computer can understand. Good programmers write code that humans can understand.<br />-Martin Fowler<br />
  3. 3. Structural Patterns<br />Adapter<br />Bridge<br />Composite<br />Decorator<br />Facade<br />Flyweight<br />Proxy<br />
  4. 4. Intent<br />Encapsulation hides the details of the implementation of an object.<br />Object-Oriented Analysis and Design, Booch<br />
  5. 5. Intent<br />Steering System<br />Brake System<br />Throttle System<br />Facade shows how to make a single object represent an entire subsystem.<br />
  6. 6. Intent<br />Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.<br />Design Patterns: Elements of Reusable Object-Oriented Software, Gamma et al<br />
  7. 7. Motivation<br />Client<br />classes<br />FACADE<br />Subsystem<br />classes<br />
  8. 8. Applicability<br />Provide a simple interface to a subsystem. There are many dependencies between clients and the implementation classes of an abstraction.<br />Layer your subsystems.<br />
  9. 9. Participants<br />Facade<br />Delegate requests to appropriate subsystem objects.<br />Subsystem classes<br />Implement subsystem functionality.<br />Handle work assigned by the facade.<br />
  10. 10. Consequences<br />Shields clients from subsystem components.<br /> Promotes weak coupling between the subsystems and its clients.<br />It’s does not prevent applications from using subsystem classes if they need to.<br />
  11. 11. Implementation<br />Reducing client-subsystem coupling.<br />Public versus private subsystem classes.<br />
  12. 12. Facade Demo<br />Example on IronPython<br />
  13. 13. Remote Facade Demo<br />Example on C# with WCF<br />
  14. 14. Questions & Answers<br />
  15. 15. Bibliography<br />Design Patterns: Elements of Reusable Object-Oriented Software, Gamma et al<br />Object-Oriented Analysis and Design with Applications, 2nd edition, Grady Booch<br />