- Author : Hugo Loos
- Technologies : Java 8 / Spring 4.x / Slf4j / LogBack / Lombok / JUnit / Mockito
- Compilation : Maven 3.2.1
- Application Type : Executable (JAR packaging)
- Summary : Solve of an URL problem and analysis of bets.
This application contains 2 parts: treatment of data from an Url call and analysis of data in a cvs. It is a n-tiers application focused on the back-end part.
The application is divided in 3 main layers (view, business and persistence) and 2 cross-project layers (model and technical). The use of the IOC design pattern emphasises this decoupling making the architecture more maintainable, more extensible and more scalable. The internalization is fulfilled by the RessourceBundle of the Spring framework.
Being Maven centric, you can compile and package it with mvn clean compile
, mvn clean package
or
mvn clean install
. The package
and install
phase will automatically trigger the unit tests.
Once packaged, the application can be executed in commandline with 'java -jar tasks-1.0.0.jar' The necessary java version to be able to run the application is java 8.
The DI (dependency injection) allows to decouple the different layers (view, business - service and persistence layer} making the code more extensible, maintainable and scalable. Even if several frameworks can fulfill the DI task (CDI / Weld, Guice), I have decided to use the newest version of Spring.
For the logs, Slf4j API and its implementation LogBack have been used. LogBack implements the Slf4j API natively, has a faster implementation (than Log4j for example), ...
Framework with some useful annotations to redefine automatically methods like toString() / hashCode() and equals(), to provide instances of logger of different frameworks and to perform the input parameter validation in order to make the code more readable and more maintainable.
For the unit tests, Spring-test, JUnit 4 and Mockito are the used frameworks.
Spark has been used to simulate the server behavior in the testing part.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.