by shimonamit · 10y ago · 0 comments
"@dhh this is just a bit too much https://github.com/rails/rails/blob/master/rails.gemspec#L28 … now every Rails install requires redis, eventmacine, celluloid and faye"
The result is that I'm learning Elixir/Phoenix and having the same reaction Dave Thomas describes in his new book, that is, finding anew the joy of programming.
Second, I find Rails to still be the most productive web framework. Removing every last bit of redundancy is nice, but it isn't going to save me that much. Maybe it'll save me a couple tens of MBs of disk space, and a couple of MBs of RAM per process. But if that costs me a few hours of work, it isn't worth it. Disk space costs next to nothing and RAM is cheap. Maybe optimizing that makes sense if you're Facebook, but most people are not.
Every time I use Node.js, Sinatra, etc I find myself wasting time around the most basic things, e.g. directory structures, database migrations, logging, etc.
I don't care about the disk space and RAM at all, but every additional C extension (like EventMachine) means one more dependency that can break when I update a) my OS or compiler, b) Ruby, c) Rubygems, d) Bundler or e) Rails. Most of these updates have to be installed immediately for security reasons. I absolutely love Ruby as a language, but with Rails I feel I spend half my time in the terminal, trying to fix `gem install` incantations just to keep things running :(
But of course it doesn't fit everyone needs.
For instance, there is no Devise equivalent. No modular authentication package that you can just plug in and configure in 15 mins. Horrible.
For example, Node/NPM/Express/etc. all have a philosophy the opposite of Rails bloat, but often require more configuration, and solid knowledge of the underlying middleware.
The tradeoff between these two approaches is one many engineers need to make (e.g., the more recent Gulp vs WebPack has some similarities to this debate), and this is a common debate that will likely continue for years in the future. Pick whatever works best for your philosophy, your team, and the given project.
The whole issue of bloat in Rails is overblown because Rails has been quite modular since version 3.
[1a] https://github.com/rails/actioncable/pull/28
The backend for ActiveSupport::Cache::Store is similarly interchangeable (memcached, disk, etc.)
I can see why adding a Redis dependency makes opinionated programmers grumpy, and I predict ActionCable supports other backends than Redis eventually.
Elixir and Phoenix may or may not last, that I don't know, but they are a joy to work with.
As far as LFE goes.. implementing a LISP-1 on top of erlang seems like a perfectly reasonable thing to do, but why invent some new funky syntax (elixer) ?
Microseconds I say, microseconds! :) in development!
But it seems to have made it into the beta as a gem dependency.
https://github.com/rails/rails/pull/22585#discussion_r475154...
Here's a few ways to avoid it: https://gist.github.com/nateberkopec/1184c81a92c10d84d779
I just hope that they resolved some of them. And Rails has always been a dependency soup, so I am not too surprised to see stuff piled onto the ever-growing list (I have nothing against Rails, I even use it, I'm just not too happy about the bloatyness).
[1]: https://github.com/rails/rails/blob/master/rails.gemspec#L28
AFAIK nodejs is already an optionial rails dependency for the asset pipeline.