Skip to content

Commit aee0134

Browse files
committed
added prototype design pattern
1 parent 0b778ac commit aee0134

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builder/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Builder Design Pattern
22

3-
The Builder Pattermn is a creation pattern whos intent is to separate the construction of a complex object from its representation so that you can use the same construction process to create different representations.
3+
The Builder Pattern is a creational pattern whose intent is to separate the construction of a complex object from its representation so that you can use the same construction process to create different representations.
44

55
The Builder Pattern tries to solve,
66
- How can a class create different representations of a complex object?
77
- How can a class that includes creating a complex object be simplified?
88

9-
The Builder and Factory patterns are very simiar in the fact they both instatiate new objects at run time. The difference is when the process of creating the object is more complex, so rather than the Factory returning a new instance of `ObjectA`, it could call the builders director construct method `ObjectA.construct()`. Both return an Object.
9+
The Builder and Factory patterns are very simiar in the fact they both instantiate new objects at run time. The difference is when the process of creating the object is more complex, so rather than the Factory returning a new instance of `ObjectA`, it could call the builders director construct method `ObjectA.construct()`. Both return an Object.
1010

1111
Parts of the Builder Pattern
1212
1. **Product** - The Product being built
1313
2. **Concrete Builder** - Build the concrete product. Implements the IBuilder interface
14-
3. **Builder Inteface** - The Interface which the Concrete builder should implement
15-
4. **Director** - Has a construct method which when called creates a custom type of product
14+
3. **Builder Interface** - The Interface which the Concrete builder should implement
15+
4. **Director** - Has a construct method which when called creates a customised product
1616

1717
![Builder Pattern Overiew](builder.png)
1818

0 commit comments

Comments
 (0)