This is a project of animal shelter. The main reason to create it is rewriting previous one. Thus, I want to check how much I have learned since that time.
I have described process of creating this app on my blog site. All entries are available in Polish.
- #1 Description of project AnimalShelter
- #2 First steps in backend
- #3 Refactoring and development of the server part
- #4 Creating GUI in Angular
- #5 Stop, think it over and start doing!
- #6 The idea for architecture
- #7 Using CQRS
- #8 Re-implementation
- #9 Architectural dilemmas
- #10 Summary + sending email implementation
- #11 Keep coding
This picture presents project division into Maven modules and their dependencies. I've come up with this idea to have only external model jars in specific module if there is no need for more. AnimalShelter project is based on events and CQRS concept.
I try to have domain module which is technology-agnostic (beside the fact that I use Java to code it). To achieve that I use Maven modules with the same packages. One of them is based on Spring and registers required beans from domain module, just like it is presented on above picture.
Of course there is registered event bus and command bus to handle events and commands. In domain module there are only interfaces, but in Spring module concrete implementations are used.
I've decided to duplicate data about zookeepers being registered in shelter. There are available in administration and notification module. This solution has to solve future problem of making microservices. We will see what this architectural decision will bring.
The next decision in this matter is to share bytes of files between modules than just path to them. For now this is more complicated solution, but in future it will be easier to extract microservices.
I hope this code will bring you some tips about development. Please let me know if you have some ideas how to improve my knowledge sharing or maybe how to make this code better.