Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cauadesa/pizzeriawithpatterns-deoo3
Pizzeria project easily implementing Proxy, Composite, Factory and Singleton.
https://github.com/cauadesa/pizzeriawithpatterns-deoo3
composite-pattern design-patterns factory-pattern java proxy-pattern
Last synced: about 2 months ago
JSON representation
Pizzeria project easily implementing Proxy, Composite, Factory and Singleton.
- Host: GitHub
- URL: https://github.com/cauadesa/pizzeriawithpatterns-deoo3
- Owner: CauaDeSa
- Created: 2024-08-01T17:53:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T21:30:28.000Z (5 months ago)
- Last Synced: 2024-08-02T23:02:35.474Z (5 months ago)
- Topics: composite-pattern, design-patterns, factory-pattern, java, proxy-pattern
- Language: Java
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pizzeria With Patterns Project
Simple pizzeria design system, where two types of users interact (Customers placing orders and Administrators managing orders).
The system has access levels through the Pattern Proxy, where the administrators' credentials are required to perform most of the functions (except creation of new administrators).Also using the Composite design pattern, through which it becomes possible to nest orders. Drinks as simple objects and Pizzas being composed of flavors.
Additionally, it has a simple implementation of the Factory design pattern, used for the creation of Administrators and Customers users.
## Classes Diagram
(Link to higher quality image)
[Classes diagram link](https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=PizzeriaWithPattern.drawio#R%3Cmxfile%3E%3Cdiagram%20id%3D%22C5RBs43oDa-KdzZeNtuy%22%20name%3D%22Page-1%22%3E7V1bU9vIEv41VCUPpjS669EYSNiTLCyQvTxtCUuAN7JFbBEgv%2F5IskaWplsXX0Yam9na2sWyLdvT3%2FR0f3070kbT109z9%2Bnxa%2Bj5wZGqeK9H2umRqmqmqsf%2FS668La%2BoqqMurzzMJ97yGllduJn88rOLSnb1eeL5i9ILozAMoslT%2BeI4nM38cVS65s7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VTGtmwsKtPtLA9L9qyo1gnZnm9OjTa3TY3eUogyc7NBsQvceEShnngerTU6yUaBx8no8uvV5c3F7RlEUxBMnhYpO%2FzoPiUXx0H47FWo8wJGmBj8ves5nnGExOBdXyeaylEDr%2BqJ8mAiEqHGBlwRdkL17jauDWnaq%2BvLv%2F%2FhJoA74nn3CiYAolia4%2FM8AhUmRQCjoDoXAOQvz4ej28trfiKI94DljjER3Ommoeg8RaAbwAohDpwp2bUUnBbDNDo40EoHVuF0m4VpdK18usEAG9OQn%2FfJRnPvm1PmnJ1k%2FiLzohy1hCWd7Ra0%2FA3Z21YggXdiW2nlmUL0TssfCe607mE70JjUT%2FqV%2BZ61DiQBkmYw%2FtTPvu0hDCrUmPFhau9zCp0WkfMe1Qo%2B1qN3vZKjtVGx7CQVF1ErKqNWzE3VCmvxqR1pFbWpvk%2Btff26Wih%2BOA8TRmf18njnP34NPT95xf8B%3C%2Fdiagram%3E%3C%2Fmxfile%3E)
![PizzeriaWithPattern](https://github.com/user-attachments/assets/6b391f09-bd0b-4d1f-979b-9d1e570f291d)
## Used Patterns
The requirements of this project were the use of one or more structural design patterns.
### Composite
For the main product of the system, Composite were used in Order object manipulation, providing a commom interface between the enum class PizzaFlavor and the composed Pizza object. With composite we only call the method GetFlavor and it returns the detailed object.
### Proxy
In this project, proxy were used at Administrator login service call, intermediating AdmService, "AdmServiceProxy" saves the last successful login (applying cache) and send to other service calls untill method logout.
### Factory
Factory were used to create User instances, Administrator and Customer, just exploring the pattern and providing the system a better reutilization and management in the future.