X Tutup
Skip to content

Commit 5ce932c

Browse files
MarkusMarkus
authored andcommitted
Work on iluwatar#213
- properly categorize all patterns - remove pattern list from readme - minor fixes to readme - removed "introduction" because its not a pattern and an error i committed some time ago
1 parent 9691a37 commit 5ce932c

File tree

58 files changed

+129
-265
lines changed

Some content is hidden

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

58 files changed

+129
-265
lines changed

README.md

Lines changed: 17 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Design pattern samples in Java.
1+
<!-- the line below needs to be an empty line C: (its because kramdown isnt
2+
that smart and dearly wants an empty line before a heading to be able to
3+
display it as such, e.g. website) -->
4+
5+
# Design pattern samples in Java
26

37
[![Join the chat at https://gitter.im/iluwatar/java-design-patterns](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
48

@@ -7,24 +11,19 @@
711
src="https://scan.coverity.com/projects/5634/badge.svg"/>
812
</a>
913

10-
<a name="top"/>
14+
15+
#### Browse and view all of the patterns on our Website: [iluwatar.github.io/java-design-patterns/](https://iluwatar.github.io/java-design-patterns/)
16+
17+
<a name="top"/>
18+
19+
# <a name="toc">Table of Contents</a>
1120
- <a href="#introduction">Introduction</a>
12-
- <a href="#list-of-design-patterns">List of Design Patterns</a>
13-
- <a href="#creational-patterns">Creational Patterns</a>
14-
- <a href="#structural-patterns">Structural Patterns</a>
15-
- <a href="#behavioral-patterns">Behavioral Patterns</a>
16-
- <a href="#concurrency-patterns">Concurrency Patterns</a>
17-
- <a href="#presentation-tier-patterns">Presentation Tier Patterns</a>
18-
- <a href="#business-tier-patterns">Business Tier Patterns</a>
19-
- <a href="#architectural-patterns">Architectural Patterns</a>
20-
- <a href="#integration-patterns">Integration Patterns</a>
21-
- <a href="#idioms">Idioms</a>
2221
- <a href="#faq">Frequently Asked Questions</a>
2322
- <a href="#how-to-contribute">How to contribute</a>
2423
- <a href="#versioning">Versioning</a>
2524
- <a href="#credits">Credits</a>
2625
- <a href="#license">License</a>
27-
26+
2827

2928
## <a name="introduction">Introduction</a>
3029

@@ -38,119 +37,6 @@ Reusing design patterns helps to prevent subtle issues that can cause major
3837
problems, and it also improves code readability for coders and architects who
3938
are familiar with the patterns.
4039

41-
## <a name="list-of-design-patterns">List of Design Patterns</a> [&#8593;](#top)
42-
43-
### <a name="creational-patterns">Creational Patterns</a> [&#8593;](#top)
44-
45-
Creational design patterns abstract the instantiation process. They help make a
46-
system independent of how its objects are created, composed, and represented.
47-
48-
* [Abstract Factory](#abstract-factory)
49-
* [Builder](#builder)
50-
* [Factory Method](#factory-method)
51-
* [Prototype](#prototype)
52-
* [Property](#property)
53-
* [Singleton](#singleton)
54-
* [Step Builder](#step-builder)
55-
* [Multiton](#multiton)
56-
* [Object Pool](#object-pool)
57-
58-
### <a name="structural-patterns">Structural Patterns</a> [&#8593;](#top)
59-
60-
Structural patterns are concerned with how classes and objects are composed to
61-
form larger structures.
62-
63-
* [Adapter](#adapter)
64-
* [Bridge](#bridge)
65-
* [Composite](#composite)
66-
* [Decorator](#decorator)
67-
* [Facade](#facade)
68-
* [Flyweight](#flyweight)
69-
* [Proxy](#proxy)
70-
* [Service Locator](#service-locator)
71-
* [Servant](#servant)
72-
* [Event Aggregator](#event-aggregator)
73-
74-
### <a name="behavioral-patterns">Behavioral Patterns</a> [&#8593;](#top)
75-
76-
Behavioral patterns are concerned with algorithms and the assignment of
77-
responsibilities between objects.
78-
79-
* [Chain of responsibility](#chain-of-responsibility)
80-
* [Command](#command)
81-
* [Interpreter](#interpreter)
82-
* [Iterator](#iterator)
83-
* [Mediator](#mediator)
84-
* [Memento](#memento)
85-
* [Observer](#observer)
86-
* [State](#state)
87-
* [Strategy](#strategy)
88-
* [Template method](#template-method)
89-
* [Visitor](#visitor)
90-
* [Null Object](#null-object)
91-
* [Intercepting Filter](#intercepting-filter)
92-
* [Specification](#specification)
93-
* [Dependency Injection](#dependency-injection)
94-
95-
### <a name="concurrency-patterns">Concurrency Patterns</a> [&#8593;](#top)
96-
97-
Concurrency patterns are those types of design patterns that deal with the
98-
multi-threaded programming paradigm.
99-
100-
* [Double Checked Locking](#double-checked-locking)
101-
* [Thread Pool](#thread-pool)
102-
* [Async Method Invocation](#async-method-invocation)
103-
* [Half-Sync/Half-Async](#half-sync-half-async)
104-
105-
### <a name="presentation-tier-patterns">Presentation Tier Patterns</a> [&#8593;](#top)
106-
107-
Presentation Tier patterns are the top-most level of the application, this is
108-
concerned with translating tasks and results to something the user can
109-
understand.
110-
111-
* [Model-View-Controller](#model-view-controller)
112-
* [Model-View-Presenter](#model-view-presenter)
113-
* [Flux](#flux)
114-
* [Front Controller](#front-controller)
115-
116-
### <a name="business-tier-patterns">Business Tier Patterns</a> [&#8593;](#top)
117-
118-
* [Business Delegate](#business-delegate)
119-
120-
### <a name="architectural-patterns">Architectural Patterns</a> [&#8593;](#top)
121-
122-
An architectural pattern is a general, reusable solution to a commonly occurring
123-
problem in software architecture within a given context.
124-
125-
* [Data Access Object](#dao)
126-
* [Service Layer](#service-layer)
127-
* [Naked Objects](#naked-objects)
128-
* [Repository](#repository)
129-
130-
### <a name="integration-patterns">Integration Patterns</a> [&#8593;](#top)
131-
132-
Integration patterns are concerned with how software applications communicate
133-
and exchange data.
134-
135-
* [Tolerant Reader](#tolerant-reader)
136-
137-
### <a name="idioms">Idioms</a> [&#8593;](#top)
138-
139-
A programming idiom is a means of expressing a recurring construct in one or
140-
more programming languages. Generally speaking, a programming idiom is an
141-
expression of a simple task, algorithm, or data structure that is not a built-in
142-
feature in the programming language being used, or, conversely, the use of an
143-
unusual or notable feature that is built into a programming language. What
144-
distinguishes idioms from patterns is generally the size, the idioms tend to be
145-
something small while the patterns are larger.
146-
147-
* [Execute Around](#execute-around)
148-
* [Poison Pill](#poison-pill)
149-
* [Callback](#callback)
150-
* [Lazy Loading](#lazy-loading)
151-
* [Double Dispatch](#double-dispatch)
152-
* [Resource Acquisition Is Initialization](#resource-acquisition-is-initialization)
153-
* [Private Class Data](#private-class-data)
15440

15541
# <a name="faq">Frequently asked questions</a> [&#8593;](#top)
15642

@@ -225,16 +111,16 @@ Flyweight.
225111
* src (the source code of the pattern)
226112
* index.md (the description of the pattern)
227113
* pom.xml (the maven pom.xml)
228-
3. Implement the code changes in your fork. Remember to add sufficient comments
114+
4. Implement the code changes in your fork. Remember to add sufficient comments
229115
documenting the implementation. Reference the issue id e.g. #52 in your
230116
commit messages.
231-
4. Format the code according to [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
117+
5. Format the code according to [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
232118
* [Eclipse configuration](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml)
233119
* [IntelliJ configuration](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)
234-
5. Create a simple class diagram from your example code and put it inside of the etc folder.
235-
6. Add description of the pattern in index.md and link to the class diagram.
120+
6. Create a simple class diagram from your example code and put it inside of the etc folder.
121+
7. Add description of the pattern in index.md and link to the class diagram.
236122
(Attention, all internal links must be relative to the pattern subdirectory, else the links dont link properly on the website)
237-
7. Create a pull request.
123+
8. Create a pull request.
238124

239125
**Structure of the index.md file**
240126

abstract-factory/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ layout: pattern
33
title: Abstract Factory
44
folder: abstract-factory
55
permalink: /patterns/abstract-factory/
6-
categories:
7-
- pattern_cat
8-
- creational
9-
tags: pattern_tag
6+
categories: Creational
7+
tags: Java
108
---
119

1210
**Intent:** Provide an interface for creating families of related or dependent

adapter/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Adapter
44
folder: adapter
55
permalink: /patterns/adapter/
6-
categories: structural
7-
tags: pattern_tag
6+
categories: Structural
7+
tags: Java
88
---
99

1010
**Intent:** Convert the interface of a class into another interface the clients

async-method-invocation/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Async Method Invocation
44
folder: async-method-invocation
55
permalink: /patterns/async-method-invocation/
6-
categories: concurrency
7-
tags: pattern_tag
6+
categories: Concurrency
7+
tags: Java
88
---
99

1010
**Intent:** Asynchronous method invocation is pattern where the calling thread

bridge/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Bridge
44
folder: bridge
55
permalink: /patterns/bridge/
6-
categories: structural
7-
tags: pattern_tag
6+
categories: Structural
7+
tags: Java
88
---
99

1010
**Intent:** Decouple an abstraction from its implementation so that the two can

builder/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Builder
44
folder: builder
55
permalink: /patterns/builder/
6-
categories: creational
7-
tags: pattern_tag
6+
categories: Creational
7+
tags: Java
88
---
99

1010
**Intent:** Separate the construction of a complex object from its

business-delegate/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Business Delegate
44
folder: business-delegate
55
permalink: /patterns/business-delegate/
6-
categories: business_tier
7-
tags: pattern_tag
6+
categories: Business Tier
7+
tags: Java
88
---
99

1010
**Intent:** The Business Delegate pattern adds an abstraction layer between

callback/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Callback
44
folder: callback
55
permalink: /patterns/callback/
6-
categories: pattern_cat
7-
tags: pattern_tag
6+
categories: Other
7+
tags: Java
88
---
99

1010
**Intent:** Callback is a piece of executable code that is passed as an

chain-of-responsibility/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Chain of responsibility
44
folder: chain-of-responsibility
55
permalink: /patterns/chain-of-responsibility/
6-
categories: behavioral
7-
tags: pattern_tag
6+
categories: Behavioral
7+
tags: Java
88
---
99

1010
**Intent:** Avoid coupling the sender of a request to its receiver by giving

command/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: pattern
33
title: Command
44
folder: command
55
permalink: /patterns/command/
6-
categories: behavioral
7-
tags: pattern_tag
6+
categories: Behavioral
7+
tags: Java
88
---
99

1010
**Intent:** Encapsulate a request as an object, thereby letting you

0 commit comments

Comments
 (0)
X Tutup