View RSS Feed

Builder Pattern

Builder Pattern in Java

  1. Builder Pattern - Specific problems and implementation

    by , 03-09-2012 at 08:16 PM
    Builder & the Abstract Factory

    Builder design pattern and the abstract Factory pattern have a lot of similar things. This is the reason why it is necessary to come up with certain different condition b/w situations, when we use one of them. For abstract factory, factory methods are used by the client so that to make its own objects. In case of builder, the builder class gets instructions regarding the way to create object. However in which way the class will be put together depends ...
  2. Builder Pattern - Applicability & Examples

    by , 03-09-2012 at 08:15 PM
    Builder pattern could be used when:
    • Creation algorithms of complexed objects are not dependent upon parts that compose the objects.
    • System allows the representation of many different objects.


    Vehicle Manufacturer

    Consider an example of vehicle manufacture that creates bicycle, a car, a scooter and a motorcycle. In such case, builder would be the Vehicle Builder. Interface is being specified to build any kind of vehicle in the above list by using similar ...
  3. Builder Pattern - Implementation

    by , 03-09-2012 at 08:13 PM
    Factory builder pattern is used by the builder design patter so that to make a decision which concrete class for initiation to build the desired object type.

    In this pattern, the participant classes are:
    • An abstract interface is specified by the builder class to create the product object parts.
    • ConcreteBuilder creates and puts the product parts together by doing the implementation of the builder interface. It also keeps the proper representation track that has been created
    ...
  4. Builder Pattern

    by , 03-09-2012 at 08:12 PM
    Complexity of the objects as well as classes increases along with the complexity of an application. Complex objects basically are manufactured of those parts that are produced by the various other objects which require special attention while building. A proper mechanism is needed by the application to build the complex objects, independent of those that build object. If you are also facing the same problems then try to use the Builder design pattern.

    Such patterns permit the client ...
    Categories
    Builder Pattern
  5. Construction for Your Java Classes with Many Parameters

    by , 11-29-2011 at 02:10 AM
    Traditionally when programmers have to create a constructor that has lots of parameters, some that are required and other that are optional, they often will either build several constructors or use the telescoping constructor pattern. For those of you not aware, the telescoping constructor pattern is where you provide constructors for the class with the required parameters, and then others constructors that cover the other optional parameters. So depending on the number of parameters and whether ...

    Updated 11-30-2011 at 03:06 PM by Design Patterns

    Categories
    Builder Pattern