Skip to content

Commit ed82081

Browse files
committed
Merge branch 'master' into message-channel
2 parents 4fc4409 + 4135179 commit ed82081

File tree

72 files changed

+328
-165
lines changed

Some content is hidden

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

72 files changed

+328
-165
lines changed

README.md

Lines changed: 8 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,23 @@
66

77
[![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)
88

9-
![Build status](https://travis-ci.org/iluwatar/java-design-patterns.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/iluwatar/java-design-patterns/badge.svg?branch=master)](https://coveralls.io/r/iluwatar/java-design-patterns?branch=master) <a href="https://scan.coverity.com/projects/5634">
9+
[![Build status](https://travis-ci.org/iluwatar/java-design-patterns.svg?branch=master)](https://travis-ci.org/iluwatar/java-design-patterns) [![Coverage Status](https://coveralls.io/repos/iluwatar/java-design-patterns/badge.svg?branch=master)](https://coveralls.io/r/iluwatar/java-design-patterns?branch=master) <a href="https://scan.coverity.com/projects/5634">
1010
<img alt="Coverity Scan Build Status"
1111
src="https://scan.coverity.com/projects/5634/badge.svg"/>
1212
</a>
1313

1414

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-
1715
<a name="top"/>
1816

1917
# <a name="toc">Table of Contents</a>
2018
- <a href="#introduction">Introduction</a>
19+
- <a href="#contribute">How to contribute</a>
2120
- <a href="#faq">Frequently Asked Questions</a>
22-
- <a href="#how-to-contribute">How to contribute</a>
23-
- <a href="#versioning">Versioning</a>
2421
- <a href="#credits">Credits</a>
2522
- <a href="#license">License</a>
2623

2724

28-
## <a name="introduction">Introduction</a>
25+
# <a name="introduction">Introduction</a> [&#8593;](#top)
2926

3027
Design patterns are formalized best practices that the programmer can use to
3128
solve common problems when designing an application or system.
@@ -38,6 +35,11 @@ problems, and it also improves code readability for coders and architects who
3835
are familiar with the patterns.
3936

4037

38+
# <a name="contribute">How to contribute</a> [&#8593;](#top)
39+
40+
If you are willing to contribute to the project you will find the relevant information in our [developer wiki](https://github.com/iluwatar/java-design-patterns/wiki).
41+
42+
4143
# <a name="faq">Frequently asked questions</a> [&#8593;](#top)
4244

4345
**<a id="Q1">Q: What is the difference between State and Strategy patterns?</a>**
@@ -97,98 +99,6 @@ blocked waiting for available object from the pool. This is not the case with
9799
Flyweight.
98100

99101

100-
101-
# <a name="how-to-contribute">How to contribute</a> [&#8593;](#top)
102-
103-
**To work on a new pattern** you need to do the following steps:
104-
105-
1. If there is no issue for the new pattern yet, raise new issue. Comment on
106-
the issue that you are working on it so that others don't start work on the
107-
same thing.
108-
2. Fork the repository.
109-
3. Create a new folder for the pattern. The rough structure of the new folder would be as follows:
110-
* etc (every resource related to the pattern, like diagrams)
111-
* src (the source code of the pattern)
112-
* index.md (the description of the pattern)
113-
* pom.xml (the maven pom.xml)
114-
4. Implement the code changes in your fork. Remember to add sufficient comments
115-
documenting the implementation. Reference the issue id e.g. #52 in your
116-
commit messages.
117-
5. Format the code according to [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
118-
* [Eclipse configuration](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml)
119-
* [IntelliJ configuration](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)
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.
122-
(Attention, all internal links must be relative to the pattern subdirectory, else the links dont link properly on the website)
123-
8. Create a pull request.
124-
125-
**Structure of the index.md file**
126-
127-
```markdown
128-
--- # this is so called 'Yaml Front Matter', read up on it here: http://jekyllrb.com/docs/frontmatter/
129-
layout: pattern # layout must allways be pattern
130-
title: Best Pattern Ever # the properly formatted title
131-
folder: best-pattern-ever # the folder name in which this pattern lies
132-
permalink: /patterns/best-pattern-ever/ # the permalink to the pattern, to keep this uniform please stick to /patterns/FOLDER/
133-
134-
# both categories and tags are Yaml Lists
135-
# you can either just pick one or write a list with '-'s
136-
# usable categories and tags are listed here: https://github.com/iluwatar/java-design-patterns/blob/gh-pages/_config.yml
137-
categories: creational # categories of the pattern
138-
tags: # tags of the pattern
139-
- best
140-
- ever
141-
- awesome
142-
---
143-
144-
**Intent:** Makes your code awesome
145-
146-
![alt text](./etc/best_pattern.png "Best Pattern Ever")
147-
148-
**Applicability:** Use the Best Pattern Ever pattern when
149-
150-
* you want to be the best
151-
* you need to ...
152-
153-
**Real world examples:**
154-
155-
* [Nowhere](http://no.where.com)
156-
```
157-
158-
**To add a new category or tag** you need to edit the _config.yml file of the gh-pages branch.
159-
In there you should find 2 yaml lists with the respective names 'category-list' and 'tag-list'
160-
161-
**To work on one of the non-pattern issues** you need to do the following steps:
162-
163-
1. Check that the issue has "help wanted" badge
164-
2. Comment on the issue that you are working on it
165-
3. Fork the repository.
166-
4. Implement the code changes in your fork. Remember to add sufficient comments
167-
documenting the implementation. Reference the issue id e.g. #52 in your
168-
commit messages.
169-
5. Create a pull request.
170-
171-
**For creating/editing UML diagrams** you need [ObjectAid UML Explorer for Eclipse](http://www.objectaid.com/home).
172-
173-
**For inspiration** check out the following sources:
174-
175-
* there is a good list of design patterns at [Wikipedia](http://en.wikipedia.org/wiki/Software_design_pattern)
176-
* Martin Fowler's [Catalog of Patterns of Enterprise Application Architecture](http://martinfowler.com/eaaCatalog/)
177-
* [pattern language for microservices](http://microservices.io/patterns/index.html)
178-
* Microsoft's [Cloud Design Patterns](http://download.microsoft.com/download/B/B/6/BB69622C-AB5D-4D5F-9A12-B81B952C1169/CloudDesignPatternsBook-PDF.pdf)
179-
180-
**Links to patterns applied in real world applications** are welcome. The links
181-
should be added to the corresponding section of the `index.md`.
182-
183-
184-
# <a name="versioning">Versioning</a> [&#8593;](#top)
185-
186-
Java-design-patterns project uses [semantic versioning](http://semver.org/)
187-
scheme. However, version numbers in this project do not signify binary releases
188-
(since we don't make any) but rather milestones achieved on the roadmap. In
189-
other words, version numbers are used only for project planning sake.
190-
191-
192102
# <a name="credits">Credits</a> [&#8593;](#top)
193103

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

abstract-factory/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>abstract-factory</artifactId>
1111
<dependencies>

adapter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>adapter</artifactId>
1111
<dependencies>

async-method-invocation/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>async-method-invocation</artifactId>
1111
<dependencies>

bridge/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>bridge</artifactId>
1111
<dependencies>

builder/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>builder</artifactId>
1111
<dependencies>

business-delegate/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.iluwatar</groupId>
88
<artifactId>java-design-patterns</artifactId>
9-
<version>1.5.0</version>
9+
<version>1.6.0</version>
1010
</parent>
1111
<artifactId>business-delegate</artifactId>
1212
<dependencies>

callback/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>callback</artifactId>
1111
<dependencies>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: pattern
33
title: Chain of responsibility
4-
folder: chain-of-responsibility
5-
permalink: /patterns/chain-of-responsibility/
4+
folder: chain
5+
permalink: /patterns/chain/
66
categories: Behavioral
77
tags: Java
88
---
@@ -11,7 +11,7 @@ tags: Java
1111
more than one object a chance to handle the request. Chain the receiving
1212
objects and pass the request along the chain until an object handles it.
1313

14-
![alt text](./chain/etc/chain_1.png "Chain of Responsibility")
14+
![alt text](./etc/chain_1.png "Chain of Responsibility")
1515

1616
**Applicability:** Use Chain of Responsibility when
1717

chain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.iluwatar</groupId>
77
<artifactId>java-design-patterns</artifactId>
8-
<version>1.5.0</version>
8+
<version>1.6.0</version>
99
</parent>
1010
<artifactId>chain</artifactId>
1111
<dependencies>

0 commit comments

Comments
 (0)