There are a lot of vocal people who make it seem like you should be doing everything in Go or Angular or what have you, but I want nothing to do with either, and do not have problems that those are meant to solve. I love ruby, and I love rails.
DHH regularly sounds the drum of rationality - in a community at large of idealists and extremists. He is the reason I got into programming, and constantly serves to remind me that what I'm doing is, in fact, perfectly fine; and that everyone else puts up with a lot of nonsense for no great reason.
There are other frameworks out there, but you'd be hard pressed to find one with a leader that has such a sense of direction and reason for why the framework does what it does, and does not.
You should check out Scott Wlaschin's talk, Domain Modeling with F# if you get the chance. https://vimeo.com/97507575
It might be hard to believe now, but Rails also went through this stage of vocal supporters advocating for it over alternatives. If you go back and watch the introduction video [1], you have DHH creating a blog in 15 minutes using RoR. I remember being impressed by it and vocally pushing for it where I worked then. :)
Can you give examples of the 'lot of vocal people' saying 'you should be doing everything in Go or Angular'? I don't see this. I only hear this kind of black/white sentiment when filtered via junior devs.
Experienced devs I know get there are trade-offs. And I don't see anyone on the React/Angular/Vue teams saying that server-sidey Django/Rails/etc. apps are 'wrong'.
Nope. This is a misnomer that get's passed around a lot, and it's not based on anything factual. It's also dangerous, because people will read that and think "oh, i guess rails is bad". but it's not.
When you leverage the framework and best practices, it's great. There are different styles that can make things more complex, sure - but that's by no means the fault of rails.
People can go overboard at any level of the stack - rails won't stop you from this. Things can get sloppy and not perform efficiently - or become convoluted. again - not the fault of rails.
Sometimes, you need a little magic. Ruby (and rails) makes this possible. But if you rely heavily on magic, it'll bite you in the end.
But the great ones restrict how you can do those things down to a few patterns (in a way that doesn't actually seem like a restriction).
Maybe I've drank the kool-aid too much, but I agree with this whole-heartedly.
It reminds me of when I want to paint a room. I can go to Home Depot and spend an hour picking out all the tools I need, or I can buy one of those pre-packed toolkit and get to the actual painting immediately.
Rails + Heroku = My product will be ready to demo by end of the week.
Obviously this mentality only applies to people like me who wants to get things done quickly. People who value craftsmanship and specificity should do what pleases them. (That's not to say you can't do quality work with pre-packed toolkits)
ES6 has taken the edge off of some of the more obnoxious parts of JavaScript, but it still has a long way to go to catch up to Ruby, and Express is a cheap imitation of Rails.
It takes me over a day to get an Express application up and running. There's dozens of dependencies to wrangle into place. There's hundreds of lines of code to sketch in even the most basic of applications. So many directories to create, so many new files you have to basically build by hand. There's Gulpfiles to configure. There's a lot of work to integrate Passport. It's a lot of work to get as far as "Hello, world".
Meanwhile rails new and some Gemfile dependencies get you almost all the way there within an hour. Then you're making database migrations and laying in CSS and layouts.
I love both Node and Ruby for different reasons, but the out-of-the-box experience for Express is total garbage. You can't even parse a cookie without installing a module for that.
Node is way easier to create real-time services, like a Socket.io server in JavaScript is way less fuss than Ruby+EventMachine. It absolutely kills it when writing thin JSON APIs, and in terms of performance it's ridiculous. There's nothing preventing Node from having a Rails-like easy start for web applications but the attitude of the community where making decisions for people and having sane defaults is apparently against the rules.
I feel so much better after seeing this sentiment here. I've tried to dip my toe into the node.js world repeatedly only to feel like I'm trudging through setup for hours.
Of course I may have incorrect memories of how difficult/easy it was to set up my first rails app however long ago.
Lots of frameworks get you into tech debt quickly. This isn't good. What does it do to get you OUT of tech debt?
But can it truly be said that Rails has a purpose today? Its default performance remains lousy with any kind of load. Its convention-first approach means Rails knowledge doesn't easily generalize, as can be seen in this very comment thread from the experience of those who've approached the Node ecosystem as though it were "Javascript on Rails". The "history? what history?" attitude of its BDFL and his clique makes cause for trepidation out of the prospect of maintaining a Rails app over a significant length of time. And even by comparison with ES5, Ruby is a hot mess.
I get that DHH has to defend it. It's his baby, after all. But it's been a long time indeed since Rails had anything unique to offer beyond an ideology which is, in its own way, every bit as much a straitjacket as RMS' - and Rails' inheritors have innovated in ways that straitjacket makes it very hard at best for Rails to match.
You can say a lot about Rails but I like the idea that everything I commonly need as a web developer is most likely already in the framework, and there is usually a best practice way to do things. Options are great, but moving out of plumbing and into generating value to customers is still having a value.
If you don't like opinionated, batteries included solutions then Rails is not for you.
However there are other solutions that kind-of cloned some aspects of Rails. Playframework (Scala has a lot more similarities to Ruby IMHO than to Java, at least in philosophy). Also Spring Boot or JHipster (Spring boot + Yeoman - super opinionated)
> That people spent hours, if not days, just setting up the skeletons. The basic build configurations.
I spent hours everyday getting the asset pipeline to work, or it would break again, meaning I would have to fix it again.
> The vast majority of activity today is for yet another option on the a la carte menu.
Every week the developers want to switch out some module for another module within Rails because it was the hot new thing.
Maybe I worked on a bad project. Maybe I didn't get it. Maybe it was a growing pain that has passed. Rails was a pain in the ass to get to work. The ORM was cool, but did it save me time or mistakes from writing SQL - no.
I would love other people's opinions who have stuck with Rails.
You misunderstood DHH's point. He's talking about well-integrated defaults. He isn't talking about preventing people from using other modules if they choose to do so.
I mean, if your developers want to try the hot new thing every week, Rails isn't the problem. That much should be obvious.
I used to have this problem too -- more so in the early days of asset pipeline. Mostly when trying to use some client side framework. Rails is working on (or maybe already available, I'm not sure) yarn/webpack support.
> Every week the developers want to switch out some module for another module within Rails because it was the hot new thing.
Replacing the batteries which are included can be painful at times. If you want to use the new hotness in Rails, it comes at a price of extra work getting it working... but it only seems painful when comparing to the included batteries -- they just work. Support for different test frameworks, orms, templating languages are pretty good anymore though and are easier to swap out.
You'll definitely have a better experience with Rails if you forego the desire to run the latest and greatest and just use what Rails already has.
Granted, it's been a couple years since I dealt with any Rails apps. That's in large part by design, because every Rails app has a relatively high curation cost just to keep it up to date with the latest and greatest, and you have to do that if you want to be able to add features or usefully maintain anything without undue agony, because the Rails community has the collective memory of a goldfish and even less interest in maintaining continuity with the past.
I get that that's the big selling point, the drum DHH and his fans never stop beating: "Rails is omakase." This is a fundamentally broken metaphor, because sushi is dead by the time it gets to you, and all you have to do with it is eat it; the history of the ingredients is of little consequence. Would that software were so simple.
- depending on third party packages can be a pain
- switching environments / languages is annoying
The argument that these things disappear with Rails is weak.
The historical argument that a dynamically typed language can handle these issues more gracefully than J2EE is valid but less relevant today.
However, I'd just like to point out that in the same span of time JavaEE has undergone significant simplification (omakase API standards, anyone ;)) and if you check out the work of Adam Bien, you'll quickly find old myths of bloated memory consumption and fiddly XML configuration debunked.
Java is also lucky to have a parallel full-featured stack in the Spring ecosystem. Projects like JHipster do an opinionated take on how to wire things up and take you to quickly to orbit.
So basically, I disagree with DHH that there is "Very little activity in integrated solutions."
I do think that's pretty true of the JS ecosystem though. There are things like Sails, but most of the "new" stuff that comes out is build systems, tools, small libraries, and view libraries.
As to why... it's anyone's guess.
My guess is that making a full-stack opinionated framework like Rails is a big undertaking, and most people are focused on what they see as "quick wins" -- solutions to the obvious surface-level pains like "npm is slow" and "making forms with React is hard" that can gain traction quickly and rise to stardom on Github.
Maybe this is cynical to mention, but fame and recognition (and maybe interesting job offers) seem to be a big driving force behind the constant influx of new and better JS libraries/tools.
I think its because recreating rails in javascript just doesn't make sense in the current ecosystem. Either you are rewriting stuff like express from scratch (and why are you doing that?), or you're building on top of those modules and adding configuration conventions and scripts, in which case, congratulations, you've just written Sails.
When Rails first got started, ruby didn't have anything close to the ecosystem that JS enjoys today, so DHH et al. had to write most of the individual components themselves, with the intention of making them all work together.
So in my view, its similar to how Humans and Gorillas evolved from a common ancestor, but you won't see Gorillas becoming Human anytime soon.
It will never have strong-typed discipline though... (sad)
Some of the stuff it does is pretty much voodoo to me at this point. But - it's voodoo that makes me think - even say out loud to myself, sometimes - "wow". I can see how it's amazing that it does what it does with so little code. I can see how this is an enormous benefit to getting a project up and running. I can see how it'll potentially save me hours and hours of configuration.
That's a great benefit, but it comes at the cost of understanding. What exactly is that line of voodoo doing? I dunno. How do I troubleshoot it if it doesn't work? I dunno. Like, I have no idea.
[1]: As the first real "language" I'm trying to actually properly learn, so take my comments in that context. I am not already an experienced coder. I want to be able to knock up little projects, proofs of concept, in a reasonable amount of time. Rails, to me, seems like the framework that will allow me to do that. We'll see.
I can't speak to Rails, but I've worked in other codebases that used reflection to dynamically attach different pieces of code together. It was hard to trace code because I couldn't do a search for the value being generated nor could I use the static analysis to find the value. I had to manually trace through the whole stack to find the bit of reflection that was generating a value.
Right, so clearly Rails is not for you. No harm no foul.
This is essentially the point of rails, that I as an engineer don't care enough about those details, because I need to get something working quickly. if it gets to a point where it matters (because it actually does, say, when you're trying to scale) you can invest the time to learn how it all works and either improve it or say ... "you know what, I think we should ditch this entire thing"
Simple.
Besides, if for 133 rails jobs and 763 PHP jobs there are 60 and 1500 rails and PHP candidates (respectively,) you're clearly better off choosing rails.
https://www.quora.com/session/David-Heinemeier-Hansson/1?sri...
I wish that I had a more complex web app to do because it would be fun to get reacquainted with Rails. That probably won't happen since I have been going it the opposite direction, having updated a few Sinatra and PHP sites to be 100% static, and using cloud storage and CDNs.
I've developed and deployed several 'real world' web apps in Padrino now. I looked at Rails in the early days, but for some reason could never really get to grips with it (probably because it was too opinionated for me). Sinatra/Padrino's DSL methodology seemed to sit better with me, and I ran with it.
[0] - http://www.padrinorb.com
I hear this a lot about Django. The ORM is really good but "not as good as SQLAlchemy". The templates are great but "Jinja is better".
The thing is that as an engineer I value that the components are incremental improvements with sane defaults where change is deliberate and the benefits of what I'm missing out on are truly, honestly irrelevant. There's really very few times where I said to myself, "Oh of only my templating language had better support for these idioms". I just write a decent workaround because I've been using the same tool for years and it's maintainable and the total number of workarounds is so small that there are no good reasons to switch to an alternative even in the long term.
This is much better than the alternative of looking for 5 alternatives for the same component, discarding the first 3, using one for a month until I find it has fatal flaws, and finally settling for the last one.
I've used Ruby sporadically as gap-fill in small projects, but I didn't feel the language has any qualities that sets it apart from others.
Perhaps I missed something, any Ruby devs care to comment?
Just to add, my work revolves around the JVM ecosystem, but mostly in Scala and some Kotlin... Both already provide a nicer interface for Java :) e.g. in the context of collections both have `list.head` or `list.first` and `list.last`.
Quoting DHH, the Rails pitch was use Ruby for everything:
> The core premise of Rails remains in many ways as controversial today as it was when it premiered. That by formalizing conventions, eliminating valueless choices, and offering a full-stack framework that provides great defaults for anyone who wants to create a complete application, we can make dramatic strides of productivity.
That premise is irrelevant today. A complete application today isn't just a website. It's a website, a phone app, a car app, a TV, a kiosk, a conversational bot, etc. Choosing even the highest common denominator across all those platforms means eliminating unique opportunities to delight the user.
If now the premise of Rails is that it's a great way to generate JSON on the server, sure but that's a fraction of the stack. The selling point for Rails is now simply an aesthetic choice between Javascript and Ruby. DHH admits as much with his closing argument:
> Just look at some code. I dare you not to fall in love.
Since the core premise of Rails remains full-stack, plugins at best are a cycle behind innovation. Conventions have to be explored elsewhere before they can be formalized, and before choices can be exposed as valueless. At worse, plugins are multiple cycles behind innovation due to pointless infighting.
This just seems way too slow, I'd rather get my hands dirty today.
[1] or process containers, let's not get bogged down in vendor details.
Sticking with Ruby betrays that aesthetics are really the core premise of Rails, rather than aspirations of being the one framework to link all run times and in the darkness bind them.
Frankly, node needs such a framework.
1. Easy to deploy
2. Integration tests are a breeze
3. Debugging is a breeze
We use a distributed architecture in clojure and python where I work, but it has its own downsides, and for a lot of people monoliths are a much better solution.
Rails was unique in its time in that it shipped with solid client-side DOM manipulation (prototype.js). It supplied a "full-stack" framework that made it easy to build a dynamic, AJAX Ux.
But lately the "best practices" in the node ecosystem move so fast that any default may soon be outdated. What would today's javascript Ux best practice be? Vue.js? React? Angular? Which state management solution is "best" ? Which CSS framework is "best" ?
Any choice you make will be out of date by the time you ship. There's a ton of activity. It's a decision that belongs on the project, not the framework.
> You get to use Ruby, which, even in a world that has rediscovered the benefits of functional programming and immutability, remains the most extraordinarily beautiful and luxurious language I’ve yet to encounter.
He's saying there are other beautiful paradigms - especially of the FP variety. However, Ruby is really, really damn elegant.
And he's right; it's a joy. [I say as a C++ dev]
In terms of jobs prospects and similarity to Rails/Ruby what do you guys recommend ? Java ?
The web is increasingly moving frontend and the system of 2018 onwards will simply be the M in MVC.
Note, I'm not saying Rails is not worth learning. I'm just saying it's now the Cobol of web technology.
My question to you is this: why do you believe that? I think we have all witnessed a growth in popularity in front-end MVC frameworks, but are they the correct solution to all problems?
I mean, kind of. You don't really need much controller logic most of the time anymore. Last Rails backend I wrote probably involved personally writing a few lines of code here and there. Generally, I'm just pushing a JSON object back and forth. Auth and emails can just be 3rd party. The vast majority of controller type behavior ends up client side at this point. Partly, because its way simpler to scale with you push as much processing to the client as you can. Also, look at something like Firebase or Hoodie as examples of simple stores that require no backend logic.
Its not that Rails and Symfony are useless, I use them all the time, its just that they are kind of dated concepts. Heck even Wordpress solves a specific problem on the backend enough to be useful sometimes. That said Drupal at this point is such a dated concept(superseded by things like Rails and Symfony many years ago) that is should no longer be used.