3 ms·
Hmmm, At least in rails 6 it moved away from the asset pipeline to a webpacker thing. It always was opinionated, and imho for many applications the classic ful
by universa1 6y ago
Hmmm,
At least in rails 6 it moved away from the asset pipeline to a webpacker thing. It always was opinionated, and imho for many applications the classic full-page-reload cycle is still good enough, or a js client-side app doesn't bring any benefits besides being the cool thing to do. The docs were a problem from the beginning, but that improved a little with the official guides. As someone who used it on and off since version 1.x, it is obviously familiar and I am biased. Though it still feels like not really getting in my way when doing things and I can just write a feature and be done with it, when following the rails way.
In the past I spent a lot of time in the freenode #rubyonrails channel, and a lot of beginners would have benefited greatly from understanding how a MVC app works, and along with it stuff like request-/response cycle. Especially since this also translates well into API/client-side apps.
Sorry if this is a little incoherent, I am a little sleep deprived and back to the baby now :-)
- aerovistae 6y agoI certainly agree the classic full page reload approach is still completely relevant. It's more that most websites nowadays will employ a hybrid approach. They need a bit of both. Anything that isn't a static website is going to be using react or some other front end frameworks, and a lot of react involves asynchronous requests with REST APIs. But most rails resources focus exclusively on the one approach, with very little of the other.
- universa1 6y agoI don't know the resources anymore, but Rails really embraced the REST (in it's opinionated way) approach with rails 3+. So any more or less up-to-date doc should indoctrinate the REST-style, especially for CRUD. You might need to make the transfer from the data is not coming from a form anymore, but some JS that sends JSON, but that is something a developer should be able to do... And yeah, I also think a mix is what makes sense for most things, and there it can be anything from plain js/jquery through stimulusjs to react/vue. Even though it sounds to me like I am trying to defend rails, this is not really what I am trying to do, just trying to show a little bit different perspective :-)