Tutorials
Resources
Forum
Interview
Jobs
Projects
Offshore Development
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Talk to Us
|
My Profile
Sign In
Register
AdSense Revenue
Gifts
Active Members
Today
Vidhya
(85)
Shanthi M
(85)
D.Jeya kumar(J...
(79)
Last 7 Days
UltimateRengan
(721)
Athira Appukut...
(589)
D.Jeya kumar(J...
(490)
more...
Design Pattern - Builder Pattern
Posted Date: 04 Jul 2008 Resource Type:
Articles
Category:
General
Posted By:
Jessie
Member Level:
Gold
Rating:
Points
: 10
Builder Pattern:
================
In this article I have explained Builder Pattern with a simple example.
Defenition:
===========
Seperation the construction of a complex object from its representation so that the same construction process can create different representation.
In simple words input to the Builder is different and the output from the Builder is different but the process is same.
Non Software Example:
=====================
Consider Vending Machine. We can say it as a Director. It has a Builder to prepare coffee or tea. If we opt for Tea we will get Tea and if we opt for Coffee we will get coffee but the preparation is same[adding powder and hot water]. But the input in coffee/tea preparation is different[coffee powder or Tea powder] and the output is also different[Tea or Coffee]
In software Terms
=================
An appropriate ConcreteBuilder[coffee/tea Builder] is constructed and associated with a Director[Vending Machine]. The Director traverses and object graph and passes each object[powder and hotwater] to the Builder. The Builder uses each object to build-up a complex Product over time[Coffee or Tea]. When the object graph has been fully traversed, the final Prodcut can be retrieved from the Builder.
In .net XMLBuilder and StringBuilder works on this pattern. Consider StringBuilder. In this, the input is simple strings and output is a complex string and the process is concatenating string using a single variable.
Hope it sheds some light on Builder Pattern and it will help the beginners to get a clear understanding.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Transaction processing
Previous Resource:
3 Tier Architecture in .NET - Sample Application
Return to Discussion Resource Index
Post New Resource
Category:
General
Post resources and
earn money
!
Related Resources
Oracle Database Restoration Operation
What is GUID ? How to generate a GUID ?
Extract Message and Attachment From lotus Notes
Advantage aned disadvantage of CSS
Span versus Div Tag in HTML
dotNet Slackers
BizTalk Adaptors
Web Design
fax server
Contact Us
Privacy Policy
Terms Of Use