Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ebet2
- ## Summary
- Ebet2 is a web application which allows you to make safe bets to matches.
- Current features:
- 1. Create leagues and add matches to them.
- 2. Make, update, delete bets to matches.
- 3. Automatically updates users score when match result is set.
- Planned features:
- 1. Create user module to register users.
- 2. Add source to automatically download matches info from external source.
- 3. Try to remove spring ;)
- 4. Few implementations detail
- ## Frameworks and libraries
- * spring boot, data
- * vavr
- * lombok
- Postgesql as database
- ## Architecture details
- Application is divided into independents modules. All module are hidden by package-scope
- and provides facade with operation which other modules can use. When a module requires
- some other module, he must use his facade. If needed module take care
- of IO (database, endpoints) by their own, doesn't inform word e.g. which database is using.
- Each domain part of modules is written in pure java. I'm trying to remove dependencies to
- infrastructure using e.g. repository pattern. This approach allows me to provide different
- implementation in configuration class. For example: during test I use 'in memory' version
- of all modules, without IO, so I don't have to use Mockito to mock database because I
- provide HashMap-based repository implementation. This is generally faster.
- Big advantage of this kind of separation is possibility to take some module and turn them into
- micro-service (I heard that it's fashionable).
- **Modules:**
- * League
- Provides operation to create, delete etc. operation on leagues and matches.
- * Bet
- Provides possibilities to make, update etc. bets to matches.
- * Results
- Handle with calculating users score in each league.
- ## Spring
- I try to avoid using spring 'magic'. Why? To find another way to build application then @Component and @Autowired.
- Currently I use spring to put together modules as beans but I believe I could use ratpack and jooq as well.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement