|
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> |
21 | 19 | - <a href="#faq">Frequently Asked Questions</a> |
22 | | - - <a href="#how-to-contribute">How to contribute</a> |
23 | | - - <a href="#versioning">Versioning</a> |
24 | 20 | - <a href="#credits">Credits</a> |
25 | 21 | - <a href="#license">License</a> |
26 | 22 |
|
@@ -97,98 +93,6 @@ blocked waiting for available object from the pool. This is not the case with |
97 | 93 | Flyweight. |
98 | 94 |
|
99 | 95 |
|
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 | 96 | # <a name="credits">Credits</a> [↑](#top) |
193 | 97 |
|
194 | 98 | * [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612) |
|
0 commit comments