6
6
7
7
[ ![ 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 )
8
8
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 " >
10
10
<img alt="Coverity Scan Build Status"
11
11
src="https://scan.coverity.com/projects/5634/badge.svg"/>
12
12
</a >
13
13
14
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
15
<a name =" top " />
18
16
19
17
# <a name =" toc " >Table of Contents</a >
20
18
- <a href =" #introduction " >Introduction</a >
19
+ - <a href =" #contribute " >How to contribute</a >
21
20
- <a href =" #faq " >Frequently Asked Questions</a >
22
- - <a href =" #how-to-contribute " >How to contribute</a >
23
- - <a href =" #versioning " >Versioning</a >
24
21
- <a href =" #credits " >Credits</a >
25
22
- <a href =" #license " >License</a >
26
23
27
24
28
- ## <a name =" introduction " >Introduction</a >
25
+ # <a name =" introduction " >Introduction</a > [ &# 8593 ; ] ( #top )
29
26
30
27
Design patterns are formalized best practices that the programmer can use to
31
28
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
38
35
are familiar with the patterns.
39
36
40
37
38
+ # <a name =" contribute " >How to contribute</a > [ ↑ ; ] ( #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
+
41
43
# <a name =" faq " >Frequently asked questions</a > [ ↑ ; ] ( #top )
42
44
43
45
** <a id =" Q1 " >Q: What is the difference between State and Strategy patterns?</a >**
@@ -97,120 +99,18 @@ blocked waiting for available object from the pool. This is not the case with
97
99
Flyweight.
98
100
99
101
100
-
101
- # <a name =" how-to-contribute " >How to contribute</a > [ ↑ ; ] ( #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
- 
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 > [ ↑ ; ] ( #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
-
192
102
# <a name =" credits " >Credits</a > [ ↑ ; ] ( #top )
193
103
194
104
* [ Design Patterns: Elements of Reusable Object-Oriented Software] ( http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612 )
195
105
* [ Effective Java (2nd Edition)] ( http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683 )
196
106
* [ Java Generics and Collections] ( http://www.amazon.com/Java-Generics-Collections-Maurice-Naftalin/dp/0596527756/ )
197
107
* [ Let's Modify the Objects-First Approach into Design-Patterns-First] ( http://edu.pecinovsky.cz/papers/2006_ITiCSE_Design_Patterns_First.pdf )
198
108
* [ Pattern Languages of Program Design] ( http://www.amazon.com/Pattern-Languages-Program-Design-Coplien/dp/0201607344/ref=sr_1_1 )
199
- * [ Martin Fowler - Event Aggregator] ( http://martinfowler.com/eaaDev/EventAggregator.html )
200
- * [ TutorialsPoint - Intercepting Filter] ( http://www.tutorialspoint.com/design_pattern/intercepting_filter_pattern.htm )
201
109
* [ Presentation Tier Patterns] ( http://www.javagyan.com/tutorials/corej2eepatterns/presentation-tier-patterns )
202
110
* [ Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions] ( http://www.amazon.com/Functional-Programming-Java-Harnessing-Expressions/dp/1937785467/ref=sr_1_1 )
203
- * [ Martin Fowler - Service Layer] ( http://martinfowler.com/eaaCatalog/serviceLayer.html )
204
- * [ Martin Fowler - Specifications] ( http://martinfowler.com/apsupp/spec.pdf )
205
- * [ Martin Fowler - Tolerant Reader] ( http://martinfowler.com/bliki/TolerantReader.html )
206
- * [ Trygve Reenskaug - Model-view-controller] ( http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller )
207
- * [ Flux - Application architecture for building user interfaces] ( http://facebook.github.io/flux/ )
208
- * [ Richard Pawson - Naked Objects] ( http://downloads.nakedobjects.net/resources/Pawson%20thesis.pdf )
209
111
* [ Patterns of Enterprise Application Architecture] ( http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420 )
210
112
* [ Spring Data] ( http://www.amazon.com/Spring-Data-Mark-Pollack/dp/1449323952/ref=sr_1_1 )
211
113
* [ J2EE Design Patterns] ( http://www.amazon.com/J2EE-Design-Patterns-William-Crawford/dp/0596004273/ref=sr_1_2 )
212
- * [ Marco Castigliego - Step Builder] ( http://rdafbn.blogspot.co.uk/2012/07/step-builder-pattern_28.html )
213
- * [ Douglas C. Schmidt and Charles D. Cranor - Half Sync/Half Async] ( http://www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf )
214
114
* [ Pattern Oriented Software Architecture Vol I-V] ( http://www.amazon.com/Pattern-Oriented-Software-Architecture-Volume-Patterns/dp/0471958697 )
215
115
216
116
0 commit comments