SlideShare uma empresa Scribd logo
1 de 12
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 can
create different representations
UML diagram
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
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

Mais conteúdo relacionado

Destaque (11)

Builder pattern
Builder patternBuilder pattern
Builder pattern
 
Builder pattern
Builder pattern Builder pattern
Builder pattern
 
Design Patterns: Builder pattern (Le monteur)
Design Patterns: Builder pattern (Le monteur)Design Patterns: Builder pattern (Le monteur)
Design Patterns: Builder pattern (Le monteur)
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder
 
Strategy Pattern
Strategy PatternStrategy Pattern
Strategy Pattern
 
Strategy Pattern
Strategy PatternStrategy Pattern
Strategy Pattern
 
Python: Design Patterns
Python: Design PatternsPython: Design Patterns
Python: Design Patterns
 
Python: Common Design Patterns
Python: Common Design PatternsPython: Common Design Patterns
Python: Common Design Patterns
 
Prototype pattern
Prototype patternPrototype pattern
Prototype pattern
 
Strategy Design Pattern
Strategy Design PatternStrategy Design Pattern
Strategy Design Pattern
 
Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)
 

Semelhante a Design pattern builder 20131115

Santhosh resume
Santhosh resumeSanthosh resume
Santhosh resume
santhosh n
 
Revit 2014 api_presentation_slides
Revit 2014 api_presentation_slidesRevit 2014 api_presentation_slides
Revit 2014 api_presentation_slides
ali lemssefer
 
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_VariantsUsing_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
Vladimir Pezel
 

Semelhante a Design pattern builder 20131115 (20)

AngularJS: Service, factory & provider
AngularJS: Service, factory & providerAngularJS: Service, factory & provider
AngularJS: Service, factory & provider
 
Solidworks Presentation
Solidworks PresentationSolidworks Presentation
Solidworks Presentation
 
Santhosh resume
Santhosh resumeSanthosh resume
Santhosh resume
 
Revit 2014 api_presentation_slides
Revit 2014 api_presentation_slidesRevit 2014 api_presentation_slides
Revit 2014 api_presentation_slides
 
Cleaning up Sitecore Controllers
Cleaning up Sitecore ControllersCleaning up Sitecore Controllers
Cleaning up Sitecore Controllers
 
OpenB Core Principles - Code Generation
OpenB Core Principles - Code GenerationOpenB Core Principles - Code Generation
OpenB Core Principles - Code Generation
 
Building a website with angular 2
Building a website with angular 2Building a website with angular 2
Building a website with angular 2
 
Angular IO
Angular IOAngular IO
Angular IO
 
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_VariantsUsing_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
Using_PTC_Windchill_and_Creo_for_Creating_Customer-Driven_Product_Variants
 
Angular Basics.pptx
Angular Basics.pptxAngular Basics.pptx
Angular Basics.pptx
 
Building a website with angular
Building a website with angularBuilding a website with angular
Building a website with angular
 
Visual Studio IDE
Visual Studio IDEVisual Studio IDE
Visual Studio IDE
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Angular 9
Angular 9 Angular 9
Angular 9
 
02 - Angular Structural Elements - 1.pdf
02 - Angular Structural Elements - 1.pdf02 - Angular Structural Elements - 1.pdf
02 - Angular Structural Elements - 1.pdf
 
How to create an Angular builder
How to create an Angular builderHow to create an Angular builder
How to create an Angular builder
 
Should I Be Writing My Own Web Experience Factory Builder? TECH-D13 from IBM ...
Should I Be Writing My Own Web Experience Factory Builder? TECH-D13 from IBM ...Should I Be Writing My Own Web Experience Factory Builder? TECH-D13 from IBM ...
Should I Be Writing My Own Web Experience Factory Builder? TECH-D13 from IBM ...
 
Angular Live training basic to Advance
Angular Live training basic to Advance Angular Live training basic to Advance
Angular Live training basic to Advance
 
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 | Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
 

Mais de LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Design pattern builder 20131115