|
1 | 1 | # ☕ Java Design Patterns |
2 | 2 |
|
3 | | -## About |
| 3 | +## Abstract Factory |
4 | 4 |
|
5 | | -This application is a simple Java Console Application that aims to implement design pattern examples to a Programmin Language Class. A set of design patterns will be developed |
6 | | -each week, and they are divided in different [branches](https://github.com/LBeghini/Java-Design-Patterns/branches). |
| 5 | +Abstract Factory is a pattern that provide an interafce to create objects that have a common theme without specifying their concrete classes. |
7 | 6 |
|
8 | | -The main branch is just a template for every other branch. |
| 7 | +For example, let's say we have a store that makes on demand mobiles: |
| 8 | +- chair |
| 9 | +- couch |
9 | 10 |
|
10 | | -Also, to make it easier to download the source code, [releases](https://github.com/LBeghini/Java-Design-Patterns/releases) are created related to the task of the week, giving a snapshot of the code for that specific implementation. |
| 11 | +There's two types of mobiles: |
| 12 | +- wooden |
| 13 | +- fabric |
11 | 14 |
|
12 | | -## Implemented design patterns |
13 | | - |
14 | | -### Behavioural patterns |
15 | | - |
16 | | -- [x] [Chain of responsibility](https://github.com/LBeghini/Java-Design-Patterns/tree/4-chain-of-responsibility) |
17 | | -- [x] [Command](https://github.com/LBeghini/Java-Design-Patterns/tree/6-command) |
18 | | -- [x] [Interpreter](https://github.com/LBeghini/Java-Design-Patterns/tree/9-interpreter) |
19 | | -- [x] [Iterator](https://github.com/LBeghini/Java-Design-Patterns/tree/4-iterator) |
20 | | -- [x] [Mediator](https://github.com/LBeghini/Java-Design-Patterns/tree/9-mediator) |
21 | | -- [x] [Memento](https://github.com/LBeghini/Java-Design-Patterns/tree/5-memento) |
22 | | -- [x] [Observer](https://github.com/LBeghini/Java-Design-Patterns/tree/5-observer) |
23 | | -- [x] [State](https://github.com/LBeghini/Java-Design-Patterns/tree/3-state) |
24 | | -- [x] [Strategy](https://github.com/LBeghini/Java-Design-Patterns/tree/6-strategy) |
25 | | -- [x] [Template method](https://github.com/LBeghini/Java-Design-Patterns/tree/4-template-method) |
26 | | -- [x] [Visitor](https://github.com/LBeghini/Java-Design-Patterns/tree/11-visitor) |
27 | | - |
28 | | -### Creational patterns |
29 | | - |
30 | | -- [ ] Abstract factory |
31 | | -- [x] [Builder](https://github.com/LBeghini/Java-Design-Patterns/tree/1-builder) |
32 | | -- [x] [Factory method](https://github.com/LBeghini/Java-Design-Patterns/tree/2-factory-method) |
33 | | -- [x] [Prototype](https://github.com/LBeghini/Java-Design-Patterns/tree/2-prototype) |
34 | | -- [x] [Singleton](https://github.com/LBeghini/Java-Design-Patterns/tree/1-singleton) |
35 | | - |
36 | | -### Structural patterns |
37 | | - |
38 | | -- [x] [Adapter](https://github.com/LBeghini/Java-Design-Patterns/tree/7-adapter) |
39 | | -- [x] [Bridge](https://github.com/LBeghini/Java-Design-Patterns/tree/7-bridge) |
40 | | -- [x] [Composite](https://github.com/LBeghini/Java-Design-Patterns/tree/8-composite) |
41 | | -- [x] [Decorator](https://github.com/LBeghini/Java-Design-Patterns/tree/11-decorator) |
42 | | -- [x] [Facade](https://github.com/LBeghini/Java-Design-Patterns/tree/8-facade) |
43 | | -- [x] [Flyweight](https://github.com/LBeghini/Java-Design-Patterns/tree/10-flyweight) |
44 | | -- [x] [Proxy](https://github.com/LBeghini/Java-Design-Patterns/tree/10-proxy) |
45 | | - |
46 | | - |
47 | | -## Technologies |
48 | | - |
49 | | -- Java |
50 | | -- JUnit |
51 | | -- Maven |
52 | | - |
53 | | -## Requirements |
54 | | - |
55 | | -To run and edit the project, be sure to have installed in your computer the following softwares: |
56 | | -- A code editor |
57 | | - |
58 | | -After that, you'll need to clone this repo: |
59 | | - |
60 | | -```bash |
61 | | -git clone https://github.com/LBeghini/Java-Design-Patterns.git |
62 | | -``` |
63 | | - |
64 | | -## Change branch |
65 | | - |
66 | | -To change to a different branch, run the command: |
67 | | - |
68 | | -```bash |
69 | | -git checkout name-of-the-branch |
70 | | -``` |
71 | | - |
72 | | -The branch names have the pattern: |
73 | | - |
74 | | -```bash |
75 | | -{number-of-the-week}-{pattern-name} |
76 | | -``` |
77 | | - |
78 | | -> `number-of-the-week` corresponds to the week asked to be implemented certain pattern |
79 | | -
|
80 | | -## Testing |
81 | | - |
82 | | -This project has no aim to run any of the implemented classes, as the goal is the code itself. However, the classes will be tested to visualize the behaviour and implementation |
83 | | -of the patterns. |
84 | | - |
85 | | -You can run the tests using the maven wrapper: |
86 | | - |
87 | | -```bash |
88 | | -./mvnw test |
89 | | -``` |
90 | | - |
91 | | -## :balance_scale: License |
92 | | - |
93 | | -[MIT License](https://github.com/LBeghini/Java-Design-Patterns/blob/main/LICENSE) |
| 15 | +The store can be specialized on selling wooden mobiles or fabric mobiles, and depending on the specialty it will require a specific factory. |
0 commit comments