Design Patterns – Builder


By definition, “Separate the construction of a complex object from its representation so that the same construction process can create different representations.”  There are actually a lot of builder pattern available. I found that very optimize pattern by Joshua Bloch in his book Effective Java 2nd edition. The sample I created is based from the most basic builder design pattern.

Download the source: here

The code basically showcase a simple vehicle builder classes that is used by a shop class to build the actual cars. It seems that the Shop is actually doing the building process yet the only thing it does is that it delegates the responsibility of building the objects in a builder class.

13 thoughts on “Design Patterns – Builder

  1. hey there and thank you for your information
    – I have certainly picked up something new
    from right here. I did however expertise a few technical
    issues using this website, since I experienced to reload
    the web site many times previous to I could get it to load properly.

    I had been wondering if your web hosting is OK? Not
    that I am complaining, but sluggish loading instances times
    will sometimes affect your placement in google and could damage your quality
    score if ads and marketing with Adwords. Anyway I am adding this RSS
    to my email and could look out for much more of your respective fascinating content.
    Make sure you update this again very soon.

  2. Hello there I am so delighted I found your blog, I really
    found you by error, while I was browsing on Digg for something else, Nonetheless I am here now
    and would just like to say thanks for a remarkable post and a all round
    entertaining blog (I also love the theme/design),
    I don’t have time to look over it all at the minute but I have bookmarked it and also added your RSS feeds,
    so when I have time I will be back to read more, Please do keep up the awesome job.

  3. My developer is trying to persuade me to move to .net from PHP.

    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type on a variety
    of websites for about a year and am nervous about switching to another platform.
    I have heard excellent things about blogengine.net.
    Is there a way I can import all my wordpress content
    into it? Any kind of help would be greatly appreciated!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s