Why I decided to use Meteor & React instead of Rails

Well, … my first post in english, that’s truly difficult for french people as we are well known to be bad at learning foreign languages.

Anyway, a few months ago I began to work on a web app for a call center, that is supposed to manage the medical appointments of their clients (medicals practices). I first used Ruby on Rails in its last iteration (5) really interested in the new ActionCable that allows you to use websockets out of the box. And it did the job. But painful.

Even if the work of DHH and the contributors is awesome (I’m not as good programmer from far to be critical), I had quickly a lot of javascript lines to update all the elements of the interface. I know it’s a recurrent issue when building SPA, and I already tried famous frontend frameworks (Ember, Angular, etc.). My point is they add likewise a lot of complexity so I decided to stay in the Rails way of doing things that’s forces me to keep things simple.

But few years ago, I had the opportunity to work with Meteor with a lot of pleasure. It was lacking some features at this time, but the feeling to « breathing life » to the project very quickly reminded me the first hours with Rails. Therefore I decided to try it again on a weekend on its 1.2 version with React as frontend library. And I rewrote all the code in about 6 hours with, and it’s the most important, a better result.

Don’t misunderstand me, I’m not saying this techno is better than an other (when you are a good programmer you make good code anyway) but the association between Meteor and React works like a charm, Meteor as the conductor and React as first violin.

Pete Hunt’s words in « thinking in React » from the official documentation (https://facebook.github.io/react/docs/thinking-in-react.html) perfectly make sense : you build the application with (almost) the same approach you design it in your head. The one way communication between parents and childs components is a great idea and delivers a code easy to debug and very understandable.

In conclusion, I have to admit that’s something good could emerge from Facebook ;-) (i’m not a big fan of the service) and I’m planning to take a look at GraphQL to see if it’s really convenient or just add complexity over the complexity. I applaud as well the job made by the MDG team who has made Meteor a really competitive framework now. Just hope they could keep in mind the kind of magic Meteor has at the beginning just as Rails does.