📜 ⬆️ ⬇️

Hobby projects: chip-in.me - who, to whom and how much



My name is Alexander Kasheverov (@kashesandr), I have been doing web development in DataArt since 2011. I love the web, the “lovable word JS” game, spontaneous forays with friends on nature. And with these attacks, the same problem often arose: when thrown in for 14–15 people, it was difficult to understand who and how much money should later ...

Practicing new technology for myself, I also wrote a small utility whose task is to simplify life in such cases. This is how the tiny site chip-in.me appeared . Everything is very simple: we enter people, their contribution to the total purchase (only with equal shares!), Press the button and get the result - who, to whom and how much should give money, with names and amounts. The result can be shared with friends.


')

Technical details


The choice was made in favor of Polymer. And that's why:


You can read more about Polymer in my article here .

The chip-in.me application is a set of independent components with isolated logic, layout and styles. Technically, there are three different files in a folder for a separate component. The collector assembles all parts into two files: html and js. Further, these files are connected to index.html. Of course, the Polymer library is preloaded into the application.

By the way, Google took care of unit testing and created a handy utility Web Component Tester .

Implementation difficulties




The final application chip-in.me is:




Since its launch (summer 2015), about 800 people have visited the application site. The average time spent by the user on the site is about two minutes.

It was nice to get acquainted with Polymer, and he coped with the task superbly. The Polymer slogan sounds like "There is an element for that" ("There is a component for this"). And he was clearly chosen by chance. Everything is quite simple and simple, even though there are small bugs and blind spots in the library.

The application code can be found here:
https://github.com/DataArt/chip-in-calculator

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


All Articles