Skip to content

Commit 3d642cd

Browse files
committed
Use headings instead of bold text in index.md iluwatar#238
1 parent b6beffe commit 3d642cd

File tree

66 files changed

+373
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+373
-233
lines changed

abstract-factory/index.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,27 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Also known as:** Kit
13+
## Also known as
14+
Kit
1415

15-
**Intent:** Provide an interface for creating families of related or dependent
16+
## Intent
17+
Provide an interface for creating families of related or dependent
1618
objects without specifying their concrete classes.
1719

1820
![alt text](./etc/abstract-factory_1.png "Abstract Factory")
1921

20-
**Applicability:** Use the Abstract Factory pattern when
22+
## Applicability
23+
Use the Abstract Factory pattern when
2124

2225
* a system should be independent of how its products are created, composed and represented
2326
* a system should be configured with one of multiple families of products
2427
* a family of related product objects is designed to be used together, and you need to enforce this constraint
2528
* you want to provide a class library of products, and you want to reveal just their interfaces, not their implementations
2629

27-
**Real world examples:**
30+
## Real world examples
2831

2932
* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html)
3033

31-
**Credits**
34+
## Credits
3235

3336
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

adapter/index.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,27 @@ tags:
1010
- Difficulty-Beginner
1111
---
1212

13-
**Also known as:** Wrapper
13+
## Also known as
14+
Wrapper
1415

15-
**Intent:** Convert the interface of a class into another interface the clients
16+
## Intent
17+
Convert the interface of a class into another interface the clients
1618
expect. Adapter lets classes work together that couldn't otherwise because of
1719
incompatible interfaces.
1820

1921
![alt text](./etc/adapter.png "Adapter")
2022

21-
**Applicability:** Use the Adapter pattern when
23+
## Applicability
24+
Use the Adapter pattern when
2225

2326
* you want to use an existing class, and its interface does not match the one you need
2427
* you want to create a reusable class that cooperates with unrelated or unforeseen classes, that is, classes that don't necessarily have compatible interfaces
2528
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
2629

27-
**Real world examples:**
30+
## Real world examples
2831

2932
* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29)
3033

31-
**Credits**
34+
## Credits
3235

3336
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

async-method-invocation/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ tags:
1010
- Functional
1111
---
1212

13-
**Intent:** Asynchronous method invocation is pattern where the calling thread
13+
## Intent
14+
Asynchronous method invocation is pattern where the calling thread
1415
is not blocked while waiting results of tasks. The pattern provides parallel
1516
processing of multiple independent tasks and retrieving the results via
1617
callbacks or waiting until everything is done.
1718

1819
![alt text](./etc/async-method-invocation.png "Async Method Invocation")
1920

20-
**Applicability:** Use async method invocation pattern when
21+
## Applicability
22+
Use async method invocation pattern when
2123

2224
* you have multiple independent tasks that can run in parallel
2325
* you need to improve the performance of a group of sequential tasks
2426
* you have limited amount of processing capacity or long running tasks and the
2527
caller should not wait the tasks to be ready
2628

27-
**Real world examples:**
29+
## Real world examples
2830

2931
* [FutureTask](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/FutureTask.html), [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) and [ExecutorService](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html) (Java)
3032
* [Task-based Asynchronous Pattern](https://msdn.microsoft.com/en-us/library/hh873175.aspx) (.NET)

bridge/index.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Also known as:** Handle/Body
13+
## Also known as
14+
Handle/Body
1415

15-
**Intent:** Decouple an abstraction from its implementation so that the two can
16+
## Intent
17+
Decouple an abstraction from its implementation so that the two can
1618
vary independently.
1719

18-
1920
![alt text](./etc/bridge.png "Bridge")
2021

21-
**Applicability:** Use the Bridge pattern when
22+
## Applicability
23+
Use the Bridge pattern when
2224

2325
* you want to avoid a permanent binding between an abstraction and its implementation. This might be the case, for example, when the implementation must be selected or switched at run-time.
2426
* both the abstractions and their implementations should be extensible by subclassing. In this case, the Bridge pattern lets you combine the different abstractions and implementations and extend them independently
2527
* changes in the implementation of an abstraction should have no impact on clients; that is, their code should not have to be recompiled.
2628
* you have a proliferation of classes. Such a class hierarchy indicates the need for splitting an object into two parts. Rumbaugh uses the term "nested generalizations" to refer to such class hierarchies
2729
* you want to share an implementation among multiple objects (perhaps using reference counting), and this fact should be hidden from the client. A simple example is Coplien's String class, in which multiple objects can share the same string representation.
2830

29-
**Credits**
31+
## Credits
3032

3133
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

builder/index.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Intent:** Separate the construction of a complex object from its
13+
## Intent
14+
Separate the construction of a complex object from its
1415
representation so that the same construction process can create different
1516
representations.
1617

1718
![alt text](./etc/builder_1.png "Builder")
1819

19-
**Applicability:** Use the Builder pattern when
20+
## Applicability
21+
Use the Builder pattern when
2022

2123
* the algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled
2224
* the construction process must allow different representations for the object that's constructed
2325

24-
**Real world examples:**
26+
## Real world examples
2527

2628
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
2729
* [Apache Camel builders](https://github.com/apache/camel/tree/0e195428ee04531be27a0b659005e3aa8d159d23/camel-core/src/main/java/org/apache/camel/builder)
2830

29-
**Credits**
31+
## Credits
3032

3133
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

business-delegate/index.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ tags:
99
- Difficulty-Intermediate
1010
---
1111

12-
**Intent:** The Business Delegate pattern adds an abstraction layer between
12+
## Intent
13+
The Business Delegate pattern adds an abstraction layer between
1314
presentation and business tiers. By using the pattern we gain loose coupling
1415
between the tiers and encapsulate knowledge about how to locate, connect to,
1516
and interact with the business objects that make up the application.
1617

1718
![alt text](./etc/business-delegate.png "Business Delegate")
1819

19-
**Applicability:** Use the Business Delegate pattern when
20+
## Applicability
21+
Use the Business Delegate pattern when
2022

2123
* you want loose coupling between presentation and business tiers
2224
* you want to orchestrate calls to multiple business services

caching/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ tags:
1010
- Performance
1111
---
1212

13-
**Intent:** To avoid expensive re-acquisition of resources by not releasing
13+
## Intent
14+
To avoid expensive re-acquisition of resources by not releasing
1415
the resources immediately after their use. The resources retain their identity, are kept in some
1516
fast-access storage, and are re-used to avoid having to acquire them again.
1617

1718
![alt text](./etc/caching.png "Caching")
1819

19-
**Applicability:** Use the Caching pattern(s) when
20+
## Applicability
21+
Use the Caching pattern(s) when
2022

2123
* Repetitious acquisition, initialization, and release of the same resource causes unnecessary performance overhead.
2224

23-
**Credits**
25+
## Credits
2426

2527
* [Write-through, write-around, write-back: Cache explained](http://www.computerweekly.com/feature/Write-through-write-around-write-back-Cache-explained)
2628
* [Read-Through, Write-Through, Write-Behind, and Refresh-Ahead Caching](https://docs.oracle.com/cd/E15357_01/coh.360/e15723/cache_rtwtwbra.htm#COHDG5177)

callback/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ tags:
1111
- Idiom
1212
---
1313

14-
**Intent:** Callback is a piece of executable code that is passed as an
14+
## Intent
15+
Callback is a piece of executable code that is passed as an
1516
argument to other code, which is expected to call back (execute) the argument
1617
at some convenient time.
1718

1819
![alt text](./etc/callback.png "Callback")
1920

20-
**Applicability:** Use the Callback pattern when
21+
## Applicability
22+
Use the Callback pattern when
2123

2224
* when some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
2325

24-
**Real world examples:**
26+
## Real world examples
2527

2628
* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped.

chain/index.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,25 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Intent:** Avoid coupling the sender of a request to its receiver by giving
13+
## Intent
14+
Avoid coupling the sender of a request to its receiver by giving
1415
more than one object a chance to handle the request. Chain the receiving
1516
objects and pass the request along the chain until an object handles it.
1617

1718
![alt text](./etc/chain_1.png "Chain of Responsibility")
1819

19-
**Applicability:** Use Chain of Responsibility when
20+
## Applicability
21+
Use Chain of Responsibility when
2022

2123
* more than one object may handle a request, and the handler isn't known a priori. The handler should be ascertained automatically
2224
* you want to issue a request to one of several objects without specifying the receiver explicitly
2325
* the set of objects that can handle a request should be specified dynamically
2426

25-
**Real world examples:**
27+
## Real world examples
2628

2729
* [java.util.logging.Logger#log()](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html#log%28java.util.logging.Level,%20java.lang.String%29)
2830
* [Apache Commons Chain](https://commons.apache.org/proper/commons-chain/index.html)
2931

30-
**Credits**
32+
## Credits
3133

3234
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

command/index.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,35 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Also known as:** Action, Transaction
13+
## Also known as
14+
Action, Transaction
1415

15-
**Intent:** Encapsulate a request as an object, thereby letting you
16+
## Intent
17+
Encapsulate a request as an object, thereby letting you
1618
parameterize clients with different requests, queue or log requests, and
1719
support undoable operations.
1820

1921
![alt text](./etc/command.png "Command")
2022

21-
**Applicability:** Use the Command pattern when you want to
23+
## Applicability
24+
Use the Command pattern when you want to
2225

2326
* parameterize objects by an action to perform. You can express such parameterization in a procedural language with a callback function, that is, a function that's registered somewhere to be called at a later point. Commands are an object-oriented replacement for callbacks.
2427
* specify, queue, and execute requests at different times. A Command object can have a lifetime independent of the original request. If the receiver of a request can be represented in an address space-independent way, then you can transfer a command object for the request to a different process and fulfill the request there
2528
* support undo. The Command's execute operation can store state for reversing its effects in the command itself. The Command interface must have an added Unexecute operation that reverses the effects of a previous call to execute. Executed commands are stored in a history list. Unlimited-level undo and redo is achieved by traversing this list backwards and forwards calling unexecute and execute, respectively
2629
* support logging changes so that they can be reapplied in case of a system crash. By augmenting the Command interface with load and store operations, you can keep a persistent log of changes. Recovering from a crash involves reloading logged commands from disk and re-executing them with the execute operation
2730
* structure a system around high-level operations build on primitive operations. Such a structure is common in information systems that support transactions. A transaction encapsulates a set of changes to data. The Command pattern offers a way to model transactions. Commands have a common interface, letting you invoke all transactions the same way. The pattern also makes it easy to extend the system with new transactions
2831

29-
**Typical Use Case:**
32+
## Typical Use Case
3033

3134
* to keep a history of requests
3235
* implement callback functionality
3336
* implement the undo functionality
3437

35-
**Real world examples:**
38+
## Real world examples
3639

3740
* [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html)
3841

39-
**Credits**
42+
## Credits
4043

4144
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

composite/index.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ tags:
1010
- Difficulty-Intermediate
1111
---
1212

13-
**Intent:** Compose objects into tree structures to represent part-whole
13+
## Intent
14+
Compose objects into tree structures to represent part-whole
1415
hierarchies. Composite lets clients treat individual objects and compositions
1516
of objects uniformly.
1617

1718
![alt text](./etc/composite_1.png "Composite")
1819

19-
**Applicability:** Use the Composite pattern when
20+
## Applicability
21+
Use the Composite pattern when
2022

2123
* you want to represent part-whole hierarchies of objects
2224
* you want clients to be able to ignore the difference between compositions of objects and individual objects. Clients will treat all objects in the composite structure uniformly
2325

24-
**Real world examples:**
26+
## Real world examples
2527

2628
* [java.awt.Container](http://docs.oracle.com/javase/8/docs/api/java/awt/Container.html) and [java.awt.Component](http://docs.oracle.com/javase/8/docs/api/java/awt/Component.html)
2729
* [Apache Wicket](https://github.com/apache/wicket) component tree, see [Component](https://github.com/apache/wicket/blob/91e154702ab1ff3481ef6cbb04c6044814b7e130/wicket-core/src/main/java/org/apache/wicket/Component.java) and [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java)
2830

29-
**Credits**
31+
## Credits
3032

3133
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

dao/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ tags:
99
- Difficulty-Beginner
1010
---
1111

12-
**Intent:** Object provides an abstract interface to some type of database or
12+
## Intent
13+
Object provides an abstract interface to some type of database or
1314
other persistence mechanism.
1415

1516
![alt text](./etc/dao.png "Data Access Object")
1617

17-
**Applicability:** Use the Data Access Object in any of the following situations
18+
## Applicability
19+
Use the Data Access Object in any of the following situations
1820

1921
* when you want to consolidate how the data layer is accessed
2022
* when you want to avoid writing multiple data retrieval/persistence layers
2123

22-
**Credits:**
24+
## Credits
2325

2426
* [J2EE Design Patterns](http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2)

decorator/index.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@ tags:
1010
- Difficulty-Beginner
1111
---
1212

13-
**Also known as:** Wrapper
13+
## Also known as
14+
Wrapper
1415

15-
**Intent:** Attach additional responsibilities to an object dynamically.
16+
## Intent
17+
Attach additional responsibilities to an object dynamically.
1618
Decorators provide a flexible alternative to subclassing for extending
1719
functionality.
1820

1921
![alt text](./etc/decorator_1.png "Decorator")
2022

21-
**Applicability:** Use Decorator
23+
## Applicability
24+
Use Decorator
2225

2326
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
2427
* for responsibilities that can be withdrawn
2528
* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing
2629

27-
**Credits**
30+
## Credits
2831

2932
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)

delegation/index.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ tags:
99
- Difficulty-Beginner
1010
---
1111

12-
**Also known as:** Proxy Pattern
12+
## Also known as
13+
Proxy Pattern
1314

14-
**Intent:** It is a technique where an object expresses certain behavior to the outside but in
15+
## Intent
16+
It is a technique where an object expresses certain behavior to the outside but in
1517
reality delegates responsibility for implementing that behaviour to an associated object.
1618

1719
![alt text](./etc/delegation.png "Delegate")
1820

19-
**Applicability:** Use the Delegate pattern in order to achieve the following
21+
## Applicability
22+
Use the Delegate pattern in order to achieve the following
2023

2124
* Reduce the coupling of methods to their class
2225
* Components that behave identically, but realize that this situation can change in the future.
2326

24-
**Credits**
27+
## Credits
2528

2629
* [Delegate Pattern: Wikipedia ](https://en.wikipedia.org/wiki/Delegation_pattern)
27-
* [Proxy Pattern: Wikipedia ](https://en.wikipedia.org/wiki/Proxy_pattern)
30+
* [Proxy Pattern: Wikipedia ](https://en.wikipedia.org/wiki/Proxy_pattern)

0 commit comments

Comments
 (0)