4 ms·
> Ruby needs new blood infused into it. yes, I strongly agree with this, specially when talking about Web tech. I am programming in Ruby (and Rails) for over
by gls2ro 6y ago
> Ruby needs new blood infused into it.
yes, I strongly agree with this, specially when talking about Web tech.
I am programming in Ruby (and Rails) for over 12 years and I think I had the same feeling up until a couple of years ago that it become a stable system where I could move quickly and create new products but did not have so much newness.
But now I see at least two things which makes me love even more this ecosystem:
1. Stimulus JS along with StimulusRelfex https://docs.stimulusreflex.com/reflexes https://docs.stimulusreflex.com/reflexes
2. ViewComponent https://viewcomponent.org https://viewcomponent.org
And now I discovered this Matestack.
I am excited because Ruby on Rails is a technology I know very well and I was (and still am) a little against moving to full SPA and adopting a JS framework for frontend. Somehow the SPA felt to me a little unstable in general, when compared with SSR. This unstable I think was mostly due to being very hard to debug real production issues.
It might be from the way debugging worked in the beginning not showing proper line of code where the JS error was, or it might be because of my own resistance to change.
But now with these new tools added to the Ruby eco-system I can make the web interface more responsive and in the same time feel that I only add stable components into an app.
- arcturus17 6y agoCan't tell what your SPA experience has been, but in my experience React with a standard webpack configuration such as what you get with create-react-app provides an extremely detailed trace. Never felt like I've lost more time than I should there.
- gls2ro 6y agoProbably nowadays React with webpack provides a stable experience. It might be that my impression of SPA is also based on my resistance to dedicate time to learn the new tools. Usually I want to start doing stuff and then go back and read more. This is why I say it felt that way and I did not say that the SPA is unstable. Here is how my experience with SPA looked like: - I started with jQuery, 10 years ago or so (actually with Scriptaculous :) ), replacing parts of the interface with Ajax calls. Worked a little for a while then got into very ugly code both on JS and on Ruby. This was not a full SPA, but it was moving into that direction. - Then I moved to Backbone around 2013 I think. In the beginning it sounded very nice in the end again the code and mix with jQuery quickly become hard to organise. Also as it started to be slower to build MVPs in terms of moving fast and adding application features. - So I tried Angular and my main problem there was debugging production issues. The errors I saw on browser console were mostly not giving any clue about what went wrong. Probably it was because of the whole compile JS pipeline to support various browsers ... - Then I inherited a Webapp written in React (around 2014 or 2015) with backend in Rails which was a second-screen for a radio show. It provided various live interaction with listeners. There I saw the need for SPA but also is where SPA lost me as I spent a lot of time debugging simple things from someone could not be able to login to how long it took to add a new page to display some poll results. For sure a big part (or the most part) is on me and with my expectation about how things were working in Rails where if I wanted a page to display some poll results it meant to simply build a .html.erb and it was done. Of course later on came Action Cable and I started using it for any live thing. Again I am not saying SPA is in general heavy or hard to use. I am saying that for the products I build SSR sprinkled with some small reactive things is enough and for me (when I am mostly the solo developer) it is fast to produce (from idea to deploy) and debug a feature for a web app. That being told I am trying to learn Vue - and force myself to use so that I want to have experience with this kind of frameworks.
- jozzy-james 6y agoyou might be interested in https://inertiajs.com/ https://inertiajs.com/ if you're using rails (or laravel) - doesn't solve SSR if needed, but in my limited use does provide a nice middle ground for not needing to go full SPA editing to add: https://laravel-mix.com/ https://laravel-mix.com/ is a nice wrapper around some common webpack setup gotchas, despite having laravel in the name it's just regular old webpack (other than the default output directories)...https://luckyframework.org https://luckyframework.org uses it as well
- gls2ro 6y agoWow thank you. InertiaJS might be exactly what I was looking for to integrate some small Vue into a Rails app. Also I keep looking for an opportunity where I would use Lucky Framework with Crystal just to give it a spin.
- joelbluminator 6y agoWhat's wrong with old and boring? I don't think all the "newness" coming out of Node/Deno is actually improving anyone's productivity.
- gls2ro 6y agoNothing is wrong with old and boring. I like it. This is why I am using Ruby on Rails for most of my projects and it is the default framework to prototype any new idea I have. But I have to acknowledge that in some domains, some users expect the web app to behave in a specific way and adding some reactivity makes my life easier. This is why I prefer to use contained - and constrained - solutions (like Stimulus or Stimulus Reflex) which does not impose to change my .html.erb views to accommodate them.