Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CSVConverter 0.1.0
Description
Web based application accepting via a form comma separated file
with the following columns: date, category, employee name, employee address, expense description, pre-tax amount, tax name, and tax amount.
After upload, application processes the file, stores data in in-memory relational database
and displays a table of the total expenses amount per-month represented by the uploaded file.
The following assumptions are taken:
i. Columns will always be in that order.
ii. There will always be data in each column.
iii. There will always be a header line.
Notes:
The application allows parallel processing of the files.
The data stored in the in-memory database is discarded after the application terminates.
The records in the uploaded files are not uniquely identified and are not de-duplicated in the database. This may cause accumulation of the monthly expenses returned by the application when multiple uploads of the same or overlapping data are performed.
The previously uploaded copies of the files are cleaned up when application starts.
Build and run instructions
To build the application you will need
JDK 1.8 or later.
Maven 3.0+.
To build the application execute:
mvn clean install
To create a stand alone application package run:
mvn package
(the build JAR file will be located in the target directory.)
Both commands must be executed from the root application directory where pom.xml file resides.
To run the application you must have
Java 1.8 or later.
The application requires write access to the local directory.
To run with Maven execute:
mvn spring-boot:run
from the root application directory.
Alternatively to run the pre-packaged JAR file execute:
java -jar /csvconverter-0.1.0.jar
No preliminary steps are necessary to run the application.
Once launched it can be access with you web browser (tested with Firefox and Safari) under the following URI:
http://localhost:8080
The application can be terminated from the command line by sending SIGTERM signal with CTRL+C.
Implementation notes
I have completed the application within couple of nights and enjoyed every step of its development. I was particularly happy to put hands on Spring Batch projects - something I was planning to do for a while bug have not had a good reason to do it. I believe with Spring Batch and Spring Boot we can quickly build well structured applications separating different concerns and leveraging best OO practices.
My TODOs for the next version would include improved error handling, better Unit Test coverage and separation of data between different
web session contexts.