‘Iacta alea est’
Penned on 18th January 2016
The title could just as well refer to any good solution to the problem I shall unwrap in this post, but I believe Elm does a pretty good job of it, if not the best. The reasons for that I have explored elsewhere, so it need not detain us here, but suffice to say it contains the right ingredients in the right combination at the right time.
The last of these is perhaps most relevant because the question in the title could be suffixed with ‘now’, why do we need Elm now, and not, say, at some point in the distant past or future? As always, by looking at the past we will understand the present, and by looking in the past with intelligence we will discern the future through which we can inform our present.
We have all, I am sure, had the harrowing experience when the man in the ice-cream van hands us a delicious soft ice with so many sprinkles that some of them start falling off. The horror! You desperately start attacking the scoop to avert the avalanche, but to no avail, there will always be those that escape your grasp. And true to our nature, our parents looked on despairingly as our initial delight turned into the deep despondency of desiring the small bits that had escaped us instead of being more than content in the large delicacy that we had in our hand—now slowly melting onto our hands as the tears welled up.
And so the story went on, we solved the state problem with models and AJAX but the view became problematic. So we went to two-way bindings (Knockout, Rivet) to better manage handling view updates. This didn’t perform very well so we tried dirty-tracking (Angular), using observers (Ember) and pushed for
The orthogonal, but no less instrumental, enterprise of stitching all these pieces together effectively gave birth to the framework ecosystem itself; from the confusion about how best React should fit application parts together to the more all-in-one approaches with first-class support for build and CLI tools in Ember and Angular. These last also defined plugin semantics for deep framework integration and easy code re-use.
Now we have come so far it begs the question of the Emperor’s Old Clothes—he’s wandering around with so many clothes and associated paraphernalia that the crowd are left wondering why on earth it is all necessary. Our approach to maintainability is founded on our predilection to add more things to aid with maintainability when adding the things themselves actually increase the burden.
Elm seems to have hit the nail on the head with respect to the application of known solutions to old problems onto new problems, or, at least, onto old problems in a new environment.
—Thursday 14th January 2021.