📜 ⬆️ ⬇️

NaviGuild your own navigator

History of creation


I myself come from a small town. After moving to Minsk, adaptation began. If the route home - work - home did not cause problems, then the possibility of travel to an unfamiliar point caused discomfort. Yes, I'm talking about public transport. Now for any large city there are navigators, but what if the city is small? It is unlikely that someone will write programs for all cities, and does it make sense? In essence, all we need is:



It so happened that the specifics of my past work forced me to travel around the cities and each time the idea to write a universal program only got stronger. Now the idea has turned into a project.
')

Description


The initial idea of ​​the program is to bring people together to create a common information base. Functionality of the program:



Work with the program


Schematically, the life cycle of the program I provided in the following figure.

image

When you first start the program, it lacks any data. The data consists of two parts:


At startup, we need to specify where we want to get the data from (Step 1). Further, after the data will be specified, the following occurs. We convert the schedule file to an object, get the path to the map file and write it to the database (Step 2). The base is Realm .

After recording the base, we are thrown into the main window. Where it is checked whether the database model is created. If the model is created, we are waiting for changes in the model (Step 4), no - we create a model (Step 3). The data model is designed as a singleton . When changing in the model, we save the updates to the database (Step 5). At the subsequent launch, we check whether the model is created and select the stage.

This is how it looks
Stage 1

Stage 3

Main window

Map

Ps I am pleased to answer all your questions or help with the creation of the schedule.

Source: https://habr.com/ru/post/244087/


All Articles