One thing that we do well

Leena
Leena
Aug 7 · 2 min read

In this world of Microservices, I am building a Monolith app. In this world of React and Vue, am building a server-side rendered app.

However, I need Javascript. I can’t avoid that. I need some parts of the page updated dynamically. I need to show or hide certain parts of the page depending upon user actions.

I don’t want JQuery for the obvious reasons. It is slow.., heavy. Moreover, it can easily create spaghetti code. I don’t want to use React or Angular or Vue because I am not building a Javascript app. I want to use Javascript with least frameworks. Also, no more JSON to DOM circus.


Stimulus JS provides controllers attached to elements (HTML elements) which get triggered on actions (like button click, link click etc. or any std element events). Update DOM or render server-generated HTML during actions.

Stimulus JS Controller
HTML element setting up Stimulus JS controller and action

I’ve been using Stimulus JS for over a year now. It is making me feel smart 😄


Stimulus JS is a classic example of doing one thing well. As Jeff Atwood has written in this post:

The late, great Jack Palance played grizzled cowboy Curly Washburn in the 1991 comedy City Slickers. Curly’s Law is defined in this bit of dialog from the movie:

Curly: Do you know what the secret of life is?

Curly: This. [holds up one finger]

Mitch: Your finger?

Curly: One thing. Just one thing. You stick to that and the rest don’t mean shit.

Mitch: But what is the “one thing?”

Curly: [smiles] That’s what you have to find out.

Yes, we all need to find out what “one thing” we need to do well 🙂.


The same holds good for the code we write, and the product we build. That is the philosophy of simplicity, the secret of life.

Continuous Delivery

Tidbits about Continuous Delivery

Leena

Written by

Leena

CTO/Programmer @ GetYogaTree.com, Bangalore. Pragmatic & Passionate Programmer, Continuous Delivery Evangelist. continuousdelivery.in

Continuous Delivery

Tidbits about Continuous Delivery

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade