Presentation is loading. Please wait.

Presentation is loading. Please wait.

Patterns An Easier Way to Think About Common Software Designs This presentation is licensed under a Creative Commons License.

Similar presentations


Presentation on theme: "Patterns An Easier Way to Think About Common Software Designs This presentation is licensed under a Creative Commons License."— Presentation transcript:

1 Patterns An Easier Way to Think About Common Software Designs This presentation is licensed under a Creative Commons License.

2 Our First Pattern This presentation is licensed under a Creative Commons License.

3 Carburetor The thing between the air filter and the intake manifold that mixes fuel and air and regulates the flow of the air/fuel mixture. This presentation is licensed under a Creative Commons License.

4 Carburetor Holley Street/Strip 750 CFM Four Barrel Carb This presentation is licensed under a Creative Commons License.

5 The Carburetor Pattern Carburetor This presentation is licensed under a Creative Commons License.

6 The Facade Pattern The class between the client and the backend classes that hides the complexity of the backend classes and presents a simplified interface for the client. This presentation is licensed under a Creative Commons License.

7 The Facade Pattern apollo.soa.util.resources.jms.JMSHandler This presentation is licensed under a Creative Commons License.

8 The Facade Pattern JMS Facade This presentation is licensed under a Creative Commons License.

9 Patterns are Platform Independent Since you're not thinking about implementation details, patterns are independent of any particular platform or programming language. This presentation is licensed under a Creative Commons License.

10 The Bumper Pattern This presentation is licensed under a Creative Commons License.

11 The Bumper Pattern The bumper pattern is platform independent. This presentation is licensed under a Creative Commons License.

12 Patterns Simplify Communication Patterns make it easier to think about, design, and talk about software. This presentation is licensed under a Creative Commons License.

13 The Collection Pattern Intent How do you model a one to many relationship? Solution 1. Make a Collection Object 2. Usually encapsulates a linked list or queue 3. May be ordered or unordered Consequences * Usually used to implement uni-directional relationships * Most common form of Relationship Object This presentation is licensed under a Creative Commons License.

14 The Collection Pattern Two “Car Trunk” Implementations of The Collection Pattern This presentation is licensed under a Creative Commons License.

15 The Facade Pattern Intent Encapsulate a subsystem using a high-level interface, simplifying subsystem usage and hiding structural details. Solution 1. Clients communicate with subsystem objects by calling methods in Facade 2. Clients never (or as seldom as possible) directly accessing objects in subsystem -- any such access weakens the encapsulation 3. Subsystem objects usually retain no knowledge of client 4. Subsystem objects do not normally maintain any reference to Facade This presentation is licensed under a Creative Commons License.

16 The Facade Pattern The “Give Me Money” and “Start the Car” implementations of the facade pattern. This presentation is licensed under a Creative Commons License.

17 The Observer Pattern Intent Define relationship between a group of objects such that whenever one object is updated all others are notified automatically. Applicability * Changes to one object in a group requires changes to the others in the group * The number of objects in the group may vary * Loose coupling is desired between the objects in the group This presentation is licensed under a Creative Commons License.

18 The Observer Pattern The “Security Guard” implementation of the observer pattern. This presentation is licensed under a Creative Commons License.

19 The Pattern Pattern Intent (Why would I use this pattern?) Applicability (When or where would I use this pattern?) Consequences (What happens if I use this pattern?) This presentation is licensed under a Creative Commons License.

20 The Pattern Pattern Intent (Why would I use this pattern?) This presentation is licensed under a Creative Commons License.

21 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. This presentation is licensed under a Creative Commons License.

22 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability (When or where would I use this pattern?) This presentation is licensed under a Creative Commons License.

23 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. This presentation is licensed under a Creative Commons License.

24 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. This presentation is licensed under a Creative Commons License.

25 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. This presentation is licensed under a Creative Commons License.

26 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences (What happens if I use this pattern?) This presentation is licensed under a Creative Commons License.

27 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences * The design is independent of any particular platform or technology. This presentation is licensed under a Creative Commons License.

28 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences * The design is independent of any particular platform or technology. * The design can remain constant while the implementation changes. This presentation is licensed under a Creative Commons License.

29 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences * The design is independent of any particular platform or technology. * The design can remain constant while the implementation changes. * System design more closely reflects the intended purpose of the system. This presentation is licensed under a Creative Commons License.

30 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences * The design is independent of any particular platform or technology. * The design can remain constant while the implementation changes. * System design more closely reflects the intended purpose of the system. * Spend less time explaining the design of individual components. This presentation is licensed under a Creative Commons License.

31 The Pattern Pattern Intent Represent common designs in an abstract, platform independent way, to facilitate talking and thinking about design without having to know all the details. Applicability * One or more humans want to think about or discuss a design idea for a system. * Abstract representation is desired to separate the design from the implementation details. * Short hand notation is desired to reduce communications overhead. Consequences * The design is independent of any particular platform or technology. * The design can remain constant while the implementation changes. * System design more closely reflects the intended purpose of the system. * Spend less time explaining the design of individual components. * Spend more time refining the collection of components that make up the system. This presentation is licensed under a Creative Commons License.

32 Patterns in The Wild This presentation is licensed under a Creative Commons License.

33 Address DialogAddressAddress SaverAddress Save Request Click Save Event Get Street Get City Get State Get Zip Construct Invoke Service Call SOA Get ID Save Address Process

34 Address DialogAddressAddress SaverAddress Save Request Click Save Event Get Street Get City Get State Get Zip Construct Invoke Service Call Set Street Change Event Set City Change Event Set State Change Event Set Zip Change Event SOA Get ID Save Address Process

35 > Address Dialog > Address > Address Saver > Address Save Request Click Save Event Get Street Get City Get State Get Zip Construct Invoke Service Call Set Street Change Event Set City Change Event Set State Change Event Set Zip Change Event SOA Get ID Save Address Process

36 ViewModelControllerRequest Click Save Event Construct Invoke Service Call Set Data Change Event SOA Get Data Save Process

37 ViewModelControllerRequest Click Save Event Construct Invoke Service Call Set Data Change Event SOA Get Data Save Process UI

38 Request Click Save Construct Invoke Service Call SOA Save Process

39 UIRequest Click Save Construct Invoke Service Call SOA Save Process

40 UI Chain of Responsibility Request Database Facade Click Save Construct Invoke Service Call Save Process SOA JMS Facade Prod Database JMS Database Live Save Attempt Write Attempt Failover Queue

41 UI Chain of Responsibility Request Database Facade Click Save Construct Invoke Service Call Save Process SOA JMS Facade Prod Database JMS Database Live Save Attempt Write Attempt Failover Queue Address DialogAddressAddress SaverAddress Save Request Click Save Event Get Street Get City Get State Get Zip Construct Invoke Service Call Set Street Change Event Set City Change Event Set State Change Event Set Zip Change Event SOA Get ID Save Address Process Without Patterns - Lots of Detail - Narrow Scope With Patterns - Little Detail - Broad Scope

42 Thank You Copyright 2003, 2006 Robert Bushman This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.


Download ppt "Patterns An Easier Way to Think About Common Software Designs This presentation is licensed under a Creative Commons License."

Similar presentations


Ads by Google