rolae
But to give some context: the author Aaron Patterson is a Ruby and a Rails core team member. The article and headline is clearly targeting the ruby community, where this article has been very well received. I think it's a good title for the intended audience.
The post clarifies in the first section:
> In this post I’d like to present one data point in favor of maintaining a pure Ruby codebase, and then discuss some challenges and downsides of writing native extensions. Finally we’ll look at YJIT optimizations and why they don’t work as well with native code in the mix.
I remember the people from Blogger (google) talking about this problems. People were not very familiar with blog / website builders and users were confused when their blogs got created instantly, like "This is a big deal, me getting an entire website, what happened, what went wrong? It must have aborted the process…"
> Most used 3.5. A few used 4 and those essays also had false info. I don't think they used any browsing plug-ins but it's possible--it was a take-home assignment and not one they did in class.
So I sold food energy at a higher pricepoint than the ore. Often the AI players couldn't afford food / energy anymore and therefore their production collapsed and they did not have enough food to have enough time to change the installations on their plots.
I had to throw in some debouncing and special handling for hidden inputs, as changes to hidden inputs do not trigger a change event on the form.
In the end the markup was very simple and is very reusable (StimulusJS v1):
<div data-controller="iframe-preview" data-iframe-preview-url="<%= preview_path(@letter) %>">
<form data-target="iframe-preview.form">
<textarea name="body">My letter</textarea>
</form>
<iframe data-target="iframe-preview.iframe">
</div>
This is when StimulusJS becomes really nice, when you can compose behavior in your markup with some simple data attributes. I did not think at first that I would need this controller in other places, but a couple of weeks later, I actually needed it, and was able to reuse the controller without modification for another use case.Basically all you to is to call a remote procedure, which you can do by adding a simple `data-reflex="click->Todo#toggle`. In the remote method you change something about the state (for example db, redis). The server rerenders the page and morphs the difference.
If you need more control you can get it by defining which elements to render and to morph.
But more importantly, Rails is still insanely productive to work with. And with gems like stimulus_reflex and matestack you can get reactivity easily without having the complexity of full blown SPAs.
Laravel Livewire https://laravel-livewire.com/
Phoenix LiveView https://github.com/phoenixframework/phoenix_live_view
That's where I see a lot of potential. With Stimulus Reflex I have the convenience and development speed of Rails and I can enhance it with StimulusJS sprinkles and reflexes to create great experiences for the user. The interactivity I get is enough for 90%+ of the webapps out there and the complexity to do it is far less.
It is generally a fascinating series, set in a fictional future, where the program took control of the world. But it is less about that future, but more of a look back on today's world from fictional future.
[1] https://programaudioseries.com/14-more-parrot-than-predator/
The Post-Modern Web: StimulusReflex, or the Renaissance of Simplicity
* Date of incident
* Short description of context
* Primary source, or at least, where the video was found
* Media coverage of incident
* Updates on convictions/official investigations into the incident
* Official statements / responses
* linked videos (videos of the same incident, but with other view-angle)
Otherwise it will just be a collection of outrage, if you don't give real data to put things into context.edit: formatting
This is like saying building a registry/counting murders has no value and brings no insight.
And this has nothing todo with condoning violence of protesters, which is just as wrong as police brutality. The issue is, that police never seems to be held accountable for excessive use of force.
I am a UX person, but often dabbled in Ruby on Rails. Currently for the the first time working on a more serious app and now reading the book refactoring ruby, is very illuminating, going through my code again and rereading makes me see many mistakes and possible improvements.
I recently gravitated back towards Balsamiq, as I helps me think at the right level, and not go too much into detail.
And love their licensing, I bought a license 10 years ago, and got ten years of upgrades. Recently they had their first paid upgrade in ten years, this is just unmatched in commercial software.
Of course you can do similar things as you would do in Intercooler, but it would be explicit in the Javascript part. See this example they give for prefetching dropdown content from the server
<div x-data="{ open: false }">
<button
@mouseenter.once="
fetch('/dropdown-partial.html')
.then(response => response.text())
.then(html => { $refs.dropdown.innerHTML = html })
"
@click="open = true"
>Show Dropdown</button>
<div x-ref="dropdown" x-show="open" @click.away="open = false">
Loading Spinner...
</div>
</div>So it is actually not intended for things more complex than basic interactivity. And what you build with it, should be simple enough you don't need any type system.
For people interested, there is a good episode on FullStackRadio on the topic http://www.fullstackradio.com/132
Alpine.js has the x-data property, to keep state that you can manipulate, in stimulus all state is directly in the DOM. So for example to make a modal with stimulus, you would add a class to show a hidden overlay. In Alpine you would use a x-show property, that reacts to a change in the data of the component.
So the big difference is that alpine has a reactive data context as a first class citizen. In a way it is actually much more similar to AngularJS 1.x than to stimulus, with the idea that it is really intended only to be used to enhance existing html, not to build whole apps with it.
I can also highly recommend the book they sell.