Design Pattern - Builder

Bryan Lin
2013/11/15
Agenda
•
•
•
•

Definition
UML diagram
Participants
Sample code in C#
Definition
• Separate the construction of a complex object from its
representation so that the same construction process c...
UML diagram
Participants
• Builder (VehicleBuilder)
o specifies an abstract interface for creating parts of a Product object

• Concre...
Sample code in C#
Sample code in C#
Sample code in C#
Sample code in C#
Sample code in C#
FAQ
References
http://www.dofactory.com/Patterns/PatternBuild
er.aspx
Upcoming SlideShare
Loading in...5
×

Design pattern builder 20131115

241

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
241
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Design pattern builder 20131115

  1. 1. Design Pattern - Builder Bryan Lin 2013/11/15
  2. 2. Agenda • • • • Definition UML diagram Participants Sample code in C#
  3. 3. Definition • Separate the construction of a complex object from its representation so that the same construction process can create different representations
  4. 4. UML diagram
  5. 5. Participants • Builder (VehicleBuilder) o specifies an abstract interface for creating parts of a Product object • ConcreteBuilder (MotorCycleBuilder, CarBuilder, ScooterBuilder) o constructs and assembles parts of the product by implementing the Builder interface o defines and keeps track of the representation it creates o provides an interface for retrieving the product • Director (Shop) o constructs an object using the Builder interface • Product (Vehicle) o represents the complex object under construction. ConcreteBuilder builds the product's internal representation and defines the process by which it's assembled o includes classes that define the constituent parts, including interfaces for assembling the parts into the final result
  6. 6. Sample code in C#
  7. 7. Sample code in C#
  8. 8. Sample code in C#
  9. 9. Sample code in C#
  10. 10. Sample code in C#
  11. 11. FAQ
  12. 12. References http://www.dofactory.com/Patterns/PatternBuild er.aspx
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×