We taught 2GIS for a computer to search in natural language. So, as many have become accustomed to do on 2gis.ru. For example, “ eat on the Arbat ” or “ cinema in Sviblovo ”.
To suggest popular words and phrases, we aggregate user search queries and upload compact information to an offline index. Thus, the search and prompter do not need access to the Internet.
The previous version did not support dynamic changes. The desire to add a new type of data - any information about the city - was constantly limited by the additional terms of development. The new 2GIS was originally designed so that such changes could be made without the release of the new version.
We abandoned relational databases in favor of an object-oriented database. Previously, to get information about an object, you had to make selekt from a variety of tables. This logic, written on the pros, was embedded in the application. In the current version, we are completely gone from the typing of objects. The object at the time of rendering is selected from the data that is in JSON.
Now the chain “I want to show such data in an object” → “object mapping” does without programmers who wrote this logic. There are only product managers who say that they want to add, and the layout designers, who display this information according to a template.
In the new architecture of a single core. There is no UI logic in the kernel, only service. It deals only with general functions and is separate from presentation. For example, the kernel provides access to the database and update data. This also includes a 3D map. It is wrapped in the kernel and displayed on all platforms in exactly the same way.
In the UI-part left only a certain frontend. It shows the data in the way it is specific to a particular platform.
In the new 2GIS for desktops, we are 100% re-using the code from 2gis.ru. This is absolutely the same “Online”, which we have been developing for two years now, and which has been working “in battle” since last November.
In 2GIS for desktops, not just a similar UI, but a UI that will evolve simultaneously: fresh features and an updated design will appear almost simultaneously in the web version on the site, and on all 2GIS platforms for computers. Imagine a browser in which without the Internet, but with a cool three-dimensional map, 2gis.ru works - this is the new desktop 2GIS.
From a technological point of view, the “off-line browser with a 3D map”, which is Qt WebKit, has a number of features. For example, there is no built-in server. This means that our UI should work completely on the user's machine. On the other hand, for search engines, our UI should be able to work fully on the server if we are talking about the online version. These two polar requirements are covered by the js-framework Slot specially developed by us. The features include modular architecture. It easily replaces a two-dimensional map online with a three-dimensional map on a computer.
Of the other solutions that we had to develop specifically for the UI, I would like to mention the Makeup library, a tool for comparing with the design and rapid regression of the layout of the modules. Thanks to this, the visual stability of the application was brought to a new level.
Earlier, once a month, a window popped up, where we were offered to download a shell separately, and separately - the base of the city. In the full version of the new 2GIS, this happens in the background and is much faster: the files are loaded and updated in parallel. We have tried to make this process as inconspicuous as possible. Something similar in Google Chrome - once installed, and after that always the latest version.
Source: https://habr.com/ru/post/244179/
All Articles