https://github.com/anyulled/laboratory-information-system
Laboratory information system
https://github.com/anyulled/laboratory-information-system
java-8 visitor-pattern
Last synced: 3 days ago
JSON representation
Laboratory information system
- Host: GitHub
- URL: https://github.com/anyulled/laboratory-information-system
- Owner: anyulled
- Created: 2019-04-29T07:16:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2026-04-22T08:08:17.000Z (5 days ago)
- Last Synced: 2026-04-22T10:12:56.772Z (5 days ago)
- Topics: java-8, visitor-pattern
- Language: Java
- Size: 425 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solution proposal
## High level refactoring strategy
In order to avoid touching the core to extend the core functionality, a `Visitor` interface should be implemented and it associated method.
Thus, any class implementing the before-mentioned interface to add functionality and maintain a loose coupling between them.
Later on, any new functionality to the core can be extended by creating new classes implementing the visitor pattern. A whole set of behaviors could be added by creating a single class, making it easy to maintain.
### Proposed project structure
An ordinary java app structure is used.
* Model/domain classes are located at `model` package
* A `service` package contains an interface and its possible implementations.
* A `legacy` package contains legacy code to be extended, but not touched.
### Design patterns used
* **Visitor pattern:** the visitor pattern is a behavioral design pattern by the Gang of Four with the intention of extending the current functionality without (barely) touching the code.
* **Builder pattern:** the builder pattern is a creational design pattern supporting the selective creation of complex objects in a simple way.
* **Singleton pattern:** one of the most famous design patterns, is used to maintain a single object throughout the app.
### UML Diagram
