4. Adding chatting into the app
It was maybe the trickiest parts in building the application and got by far the most period of time. We initially tried integrating numerous pre-built chat solutions nevertheless they all right back discharged. They wound up getting means lengthier to customize the libraries than we had planning by the termination of they, we’d a half working answer which was very badly authored and hard to uphold.
We ended up needing to scrap about 2a€“3 times of perform and decided to implement our very own custom option rather. The good news is, it wasna€™t that hard with Rails.
This type of shows why even though Ia€™ve put a great many other web frameworks earlier, I always pick myself personally coming back again Rails. When rail operates, it truly does work great. As long as youa€™re carrying out items in the envisioned meeting, ita€?s my opinion that ita€™s the fastest method of getting one thing up and running since there is apparently a Gem for primarily every little thing.
I discovered one for chatting on Github also known as a€?acts-as-messageablea€? plus it was as simple as incorporating two lines into the individual activerecord model. It besides enables the consumer objects to transmit and get information and protects creating the conversation unit. The only issue is that ita€™s maybe not undoubtedly a live talk system as it calls for regular polling in place of a publish / subscription paradigm that notifies the UI to immediately refresh.