Firebase is really powerful tool, it enables you to create observer patterns in a declarative way and without any boilerplate code. And recently, I have a great opportunity to migrate existing project to the Firebase and I want to share with you how it happens on practice. This topic is quite a wide so I tried to divide it to several parts from simpler to more complicated.
Let’s dive into the simpler part.

A lot of credit was given recently to new Protocol-Oriented Programming, however, I would like to show my own example and to share the experience.

One fine day I got an amusing task the aim of which was to implement the feature like changing view appearance. It can be shape, shadows or something else, everything depends on design requirements. In my particular case, it had to look like this.

Once I got a very unusual task for me. Along with finding the reasonable solution, I worried about the feasibility of it, since I couldn’t resolve this with a cut and dried scenario. So what exactly did I have to do?