Skip to content

Commit bb50ca1

Browse files
committed
update README add categories of desgin pattern
1 parent bbf84e6 commit bb50ca1

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

README.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,34 @@
77

88
## <a name="list-of-design-patterns">List of Design Patterns</a>
99

10-
* [Abstract Factory](#abstract-factory)
11-
* [Builder](#builder)
12-
* [Factory Method](#factory-method)
13-
* [Prototype](#prototype)
14-
* [Singleton](#singleton)
15-
* [Adapter](#adapter)
16-
* [Bridge](#bridge)
17-
* [Composite](#composite)
18-
* [Decorator](#decorator)
19-
* [Facade](#facade)
20-
* [Flyweight](#flyweight)
21-
* [Proxy](#proxy)
22-
* [Chain of responsibility](#chain-of-responsibility)
23-
* [Command](#command)
24-
* [Interpreter](#interpreter)
25-
* [Iterator](#iterator)
26-
* [Mediator](#mediator)
27-
* [Memento](#memento)
10+
* Creational Patterns
11+
* [Abstract Factory](#abstract-factory)
12+
* [Builder](#builder)
13+
* [Factory Method](#factory-method)
14+
* [Prototype](#prototype)
15+
* [Singleton](#singleton)
16+
* Structural Patterns
17+
* [Adapter](#adapter)
18+
* [Bridge](#bridge)
19+
* [Composite](#composite)
20+
* [Decorator](#decorator)
21+
* [Facade](#facade)
22+
* [Flyweight](#flyweight)
23+
* [Proxy](#proxy)
24+
* Behavioral Patterns
25+
* [Chain of responsibility](#chain-of-responsibility)
26+
* [Command](#command)
27+
* [Interpreter](#interpreter)
28+
* [Iterator](#iterator)
29+
* [Mediator](#mediator)
30+
* [Memento](#memento)
31+
* [Observer](#observer)
32+
* [State](#state)
33+
* [Strategy](#strategy)
34+
* [Template method](#template-method)
35+
* [Visitor](#visitor)
36+
2837
* [Model-View-Presenter](#model-view-presenter)
29-
* [Observer](#observer)
30-
* [State](#state)
31-
* [Strategy](#strategy)
32-
* [Template method](#template-method)
33-
* [Visitor](#visitor)
3438
* [Double Checked Locking](#double-checked-locking)
3539

3640
## <a name="abstract-factory">Abstract Factory</a> [&#8593;](#list-of-design-patterns)
@@ -238,14 +242,6 @@
238242
* a snapshot of an object's state must be saved so that it can be restored to that state later, and
239243
* a direct interface to obtaining the state would expose implementation details and break the object's encapsulation
240244

241-
## <a name="model-view-presenter">Model-View-Presenter</a> [&#8593;](#list-of-design-patterns)
242-
**Intent:** Apply a "Separation of Concerns" principle in a way that allows developers to build and test user interfaces.
243-
244-
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/model-view-presenter/etc/model-view-presenter_1.png "Model-View-Presenter")
245-
246-
**Applicability:** Use the Model-View-Presenter in any of the following situations
247-
* when you want to improve the "Separation of Concerns" principle in presentation logic
248-
* when a user interface development and testing is necessary.
249245

250246
## <a name="observer">Observer</a> [&#8593;](#list-of-design-patterns)
251247
**Intent:** Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
@@ -303,6 +299,15 @@
303299
* many distinct and unrelated operations need to be performed on objects in an object structure, and you want to avoid "polluting" their classes with these operations. Visitor lets you keep related operations together by defining them in one class. When the object structure is shared by many applications, use Visitor to put operations in just those applications that need them
304300
* the classes defining the object structure rarely change, but you often want to define new operations over the structure. Changing the object structure classes requires redefining the interface to all visitors, which is potentially costly. If the object structure classes change often, then it's probably better to define the operations in those classes
305301

302+
## <a name="model-view-presenter">Model-View-Presenter</a> [&#8593;](#list-of-design-patterns)
303+
**Intent:** Apply a "Separation of Concerns" principle in a way that allows developers to build and test user interfaces.
304+
305+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/model-view-presenter/etc/model-view-presenter_1.png "Model-View-Presenter")
306+
307+
**Applicability:** Use the Model-View-Presenter in any of the following situations
308+
* when you want to improve the "Separation of Concerns" principle in presentation logic
309+
* when a user interface development and testing is necessary.
310+
306311
## <a name="double-checked-locking">Double Checked Locking</a> [&#8593;](#list-of-design-patterns)
307312
**Intent:** Reduce the overhead of acquiring a lock by first testing the locking criterion (the "lock hint") without actually acquiring the lock. Only if the locking criterion check indicates that locking is required does the actual locking logic proceed.
308313

0 commit comments

Comments
 (0)