MarianGP / TourPlaner-SWEI

JavaFx
0 stars 0 forks source link

SWE - Tour Planner

https://github.com/MarianGP/TourPlaner-SWEI

App Architecture

This desktop application is developed based on the GUI frameworks JavaFX. A user creates (bike-, hike-, running-, etc) tours in advance and manages the logs and statistical data of accomplished tours. The tours, logs and directions are stored in a postreSQL database. The tour information is collected from the MapQuest API and the map images are stored locally on a file-system.

This application is divided into 3 layers (view, business and data access layers). The application configuration (application.properties file in the config package) determines which classes from the BL and DAL will be instantiated. More details below.

1) View Layer

This layer manages the GUI and the user interaction
Views: 3 dialogs (add/edit Tour, add/edit TourLog, exportReport) and a toursView for displaying Tour and Log List.

1) View:

2) Controller:

2) Business Layer

3) Data Access Layer - DAL

Architectural, UX, library decisions

Implemented design pattern

1) Singleton:

2) Visitor Pattern:

3) Abstract Factory:

4) Observer Pattern:

Unit testing decisions

I started creating unit test from the DAL to ensure before testing higher layers that the basic functionality was achieved and focusing afterwards in only the logic of the method not the others related to it. Some tests can not be considered as unit test because they test for example that the API is working properly. JUnit allows to determine the order of execution of the test which allows for example to create a Tour, then search a term from this specific Tour and to delete it at the end. Usually test are executed in a "random" order. This option made the test development easier and more efficient.

Total test: 34

Unique feature

Displays the steps/direction of each tour in the Step Tab of the GUI. The maneuvers are to be found in the steps objects of the API response and stored into TourDirection objects. The creation of the viewList slows down when needing to access in each loop to the online images. That's the reason why the most frequent ones were stored locally. The ones which are not stored locally are loaded from online url.

Time spent

100 hrs