Do one thing and do it well

https://quotefancy.com/quote/911448/Steve-Jobs-Do-not-try-to-do-everything-Do-one-thing-well

Our product Yogatree is built using Ruby On Rails. It is a simple mobile optimised Web Application. The application is not a Single Page Application. But some places needed a lot of Javascript.

I prefer to keep the number of technologies to the least. This made sense considering the fact am the only person building it. I didn’t want to add a front-end framework, instead used jQuery. But using it for rendering views made the code too cumbersome.

Stimulus — A modest Javascript Framework

I stumbled upon Stimulus, a Javascript Framework from Basecamp. This allowed me to keep the Server side rendering.

I experimented Stimulus in a few places. Later I moved the existing jQuery code to Stimulus using Boy Scout Rule. I didn’t have to change anything in the application because I introduced Stimulus. It didn’t take my front-end.

Stimulus did one thing well — add behaviour to your Javascript through its controllers. And it also gels well with any other library or framework too because of being modest.