top | item 37788748

(no title)

dinoreic | 2 years ago

I am Rails dev, and I don't like the fact that Rails in every new version has to REINVENT ALL THE WHEELS, ALL THE TIME. That creates huge problems for Rails devs and stakeholders.

Rails is based on Ruby, which is backend language, and Rails should stay more on backend.

That means

  - session management
  - routing and controllers
  - many API options (REST, json-rpc, ...) + JSON object exporters
  - ORM, Mailing, etc
  - server template renders (ViewCells are still not part of Rails)
  - tasks, logging and other helpers
In the same way Rails adopted rake gem as default task runner, without re-inventing it as "ActiveCliTasks", they could have created standardised connector layer that will exchange objects between backend and frontend.

So no Stimulus, TurboLinks, HotWire and other stuff one HAS TO learn and re-learn between versions. Svelte, Vue and React should have been officially supported with thin connectors. Rails server render layer can easily be integrated in any existing frontend tech, as alternative to React server components insanity.

Also, there is no reason to have to have socket connection to pass HTML between server and client, good old RPC is just fine as 99% of big app scaling problems are Database problems, no need for another layers of complexity one has to ensure it works.

I think, in that way Rails could "shine" far into the future, using its strong points but adopting new frontend stuff on the way, not re-inventing it all the time.

discuss

order

michaelteter|2 years ago

And chances are, new Rails projects will just be API backends with React frontends.

Also, if trying to do lightweight Javascripty frontends within the framework is important, we might as well just move to Phoenix. Phoenix is arguably better already... it just requires a moderate jump to learn Elixir (which unfortunately looks very much like Ruby but requires a very different approach to writing).

dinoreic|2 years ago

Phoenix is super fun, but it is in completely different realm than rails :)

What about all the gems Ruby has, does one really have all he needs inside Elixir/Erlang? More complex stuff like NokoGiri, Haml, etc., that works well and is maintained.

gls2ro|2 years ago

Are you seriously comparing the speed of changes in Rails with React/Vue/Svelte?

0xblinq|2 years ago

People just look for ways to justify their already taken decisions.