What is HotWire?
Hotwire helps developers build awesome web-applications without losing their hair and worrying about their marriage.
Components of hotwire?
There are majorly 3 components of hotwire:
- Strada(Will release in 2022)
Turbo makes an application appear faster by only updating the body and the title of a page when a link is followed. By not reloading the full page, Turbo reduces browser rendering time and trips to the server.
It is used for speed and broadcast updates and it has the following two elements: frames and streams.
So what turbo does is it won't load the unnecessary js and CSS on every request, instead, it will smartly process only the required js and CSS, and this way our execution becomes faster and more robust.
And this happens via an AJAX call which reads through your HTML and replaces your page with the content you are looking for and this is achieved by frames and streams.
It takes care of all the strenuous event handling for you.
Stimulus uses controllers to define action in it, for example, we want to see a description of a post on click of a read more button a call is being generated into the controller and there we can define the action in the controller, then in that action data is fetched from the server and you display it in the way you want and use turbo steam to display it in the right place.
There are many different ways StimulusJS can be of use. Since controllers are reusable and one can attach them to any HTML element.
With Strada now you can easily get your skills to the mobile environment, after making your web application with some small tweaks you can make it work on ios or Android easily. (Strada will premiere in 2022 ).
The hunt for the most finite way to develop web application will continue to the eternity but I would say why to write long piece of complex code when we have a way to make our web pages more interactive, simple, and clear without writing pyramid of java-scripts.