Update calculator for Ciferblat

11/30/17

Development of a new version of the calculator for calculation on the client side

Frontend
Ciferblat

Task

The task of this project was to improve the already available calculator. The original version had a lot of code that loaded the entire site and spent a lot of time processing elementary requests. Also, the big problem was the question of "lack of flexibility" for making improvements.

Features

For convenience, the price data is stored in a spreadsheet format. Later they are displayed on the page, processed by the script in a form more acceptable to the client.

Preparation

By the time the calculator update started, there were 3 different types of table levels: one row, two and several tables. Tables were different and almost everyone was a crutch solution. Therefore, first of all we abstracted and started with the development of logic, completely leaving the original version.

Process on papper
Process on papper

Decision

A new data-collection logic was developed, based on the tabular data format and data attributes, in which the auxiliary parameters are stored.

After loading the data into the scope of the script, it reads all the data into the object, all parameters into the array by the parameter (to output the options to the user).

Test
Тest

The additional data that is in the data attributes is the triggers for the distribution in the tables.

Result

The development and implementation of this universal solution significantly increased the speed of loading the page and made it easier to work.

Evidence of improvement was the data obtained with the help of the utility from Google - PageSpeed Insights. We determined that the evaluation indicators grew by 4-7 percent in the PC and mobile version.

pagesspeed
Pagesspeed
Members

Arsenii