Live data from Hacker News

Rails has won: The Elephant in the Room

akitaonrails.com

171–180 of 213 posts

Re: Rails has won: The Elephant in the Room

#171

Earlier quoted context omitted.

Oh, so you're talking about SOA / "microservices" and Claims-Based Identity (or rather, Claims-Based Identity is what you should be using). Well, an ORM is totally the wrong way to go about expressing user identities in a distributed system. As it were I wrote the AuthN/AuthZ library Square uses to solve this problem: https://github.com/square/rails-auth The objects we build for representing user identities are POROs…

You're right in that claims-based identity is the better approach; users was not the best example, but I wrote that post more hastily than I should have. =) But any distributed service with single-source-of-truth ownership of a domain object is going to be totally hosed by ActiveRecord; to handle it without every service having a database connection to every other service's datastore you end up with something like a…

to handle it without every service having a database connection to every other service's datastore you end up with something like a conversion step from Magic Model Object to a PORO, and that sucks wind.

I actually prefer the distinction: serialized domain objects do not have access to the full richness of the ORM API, so having a separate class representing the specific behavior of an API-wrapper makes a lot more sense to me.

Something like ActiveModel::Serializers wraps up a lot of the boilerplate while also letting you retrieve nested object graphs in a single request:

https://github.com/rails-api/active_model_serializers

That said at Square we generally use protobuf-based RPC for our service-to-service requests, because we have a polyglot SOA so it's important for our services to produce and consume protos to support more languages than just Ruby.

Re: Rails has won: The Elephant in the Room

#172
post #116

Earlier quoted context omitted.

"Carpenters argue about the best saws/drills, artists argue about the best brushes/paints, musicians argue about the best instrument maker." Is that actually true? I can't think of a single example of such an argument. I have heard recommendations, and heard various trendy tools being promoted (at least for music), but never an argument. I think it has to do with transferability of skill. In music, carpentry, and pai…

I've never had a problem moving to another language, I'll never understand why people pigeonhole themselves into categories like "rails dev" or "java dev". The fundamentals are transferable, I don't even mention specific technologies or stacks these days if I don't have to.

It's not necessarily a problem, but it takes humility.

Re: Rails has won: The Elephant in the Room

#173

Earlier quoted context omitted.

"Carpenters argue about the best saws/drills, artists argue about the best brushes/paints, musicians argue about the best instrument maker." Is that actually true? I can't think of a single example of such an argument. I have heard recommendations, and heard various trendy tools being promoted (at least for music), but never an argument. I think it has to do with transferability of skill. In music, carpentry, and pai…

"When art critics get together they talk about Form and Structure and Meaning. When artists get together they talk about where you can buy cheap turpentine." -- Pablo Picasso

Haha.

But there is a big difference between discussing tools and arguing about them like your career depends on a particular opinion being right.

Re: Rails has won: The Elephant in the Room

#174

I never thought I'd hear myself say this, but the ASP.NET MVC/IDE is a better ecosystem than Rails now. No more missing bundle x, install devkit x,....just install visual studio 15 and get to work.

The problem is that it basically locks you out of the ecosystem of Linux/Unix and that is significantly larger and more important than the ecosystem of Rails.

Ok. Imagine me a developer just trying to put up an MVP to see if the idea gets traction. Pitch me on why I should rely on a toolchain that has multiple versions, bundles, and a plethora of (possibly) compatible packages vs one ide with autocompletion and a built in package manager that automatically picks the jquery, json, whateverelse-supporting-javascript library I need etc with a single install?

Re: Rails has won: The Elephant in the Room

#175

This article is a superb example of bad writing, of bad thinking. I have no skin in the Ruby/Rails game. I'm not a web developer. But I'm interested in the fates of languages and the merits of major approaches that define many jobs and decide the employability of millions, so I read it. The problem is: what in the world is he saying? What is his thesis, and what reason does he give us for believing his thesis? His op…

I found it pretty coherent, actually. The author is trying to reset our focus from the technical details of how Rails works to the bigger picture of how the market for web technology has evolved over time. All the more important for those of us with "skin in the game," which I'm guessing means coders, because we tend to be myopic about our little world of symbols and tools, and often get caught clueless when the rug…

I concur. Coming from São Paulo, Brazil, I thought Akita's post was well written and derived out of positive, lightly spoken, opinion. Breath of fresh air against the backdrop of hostile tech machoism.

Re: Rails has won: The Elephant in the Room

#176

This article is a superb example of bad writing, of bad thinking. I have no skin in the Ruby/Rails game. I'm not a web developer. But I'm interested in the fates of languages and the merits of major approaches that define many jobs and decide the employability of millions, so I read it. The problem is: what in the world is he saying? What is his thesis, and what reason does he give us for believing his thesis? His op…

I also agree that it's rambling, but clearly not first language so I'll give it a pass.

The general thesis seems to be that The frustration that Solnic felt with Rails is understandable, and quite possibly inevitable, as rails has become mainstream, large, and a ripe target for disruption by other frameworks/libraries. Despite this, Rails is still an excellent framework due to it's easy-rampup for beginners, and flexibility for more experienced developers.

Here is my summary of the sections, as I understood them:

Accepting Reality:

- Ruby is not much without rails.

- Large frameworks are written by entities that can afford to, so they are not held to the whims of other large entities (angular/polymer for google, react for fb, etc). It's just a power struggle.

- Rails can be compared to Wordpress, though wordpress's codebase is worse, rails suffers from similar lockin as tools like wordpress and magento.

- The community of rails is well-connected, and if large enough entities invest in rails & ruby, it will be fine, and will continue progressing through the natural cycles of OSS projects

Laws of market reality:

- Rule 1) Hindsight is 20/20

- Rule 2) No solution is perfect

- Rule 3) You either build tools for yourself or for others, fits-you or fits-the-market

- Avoid building businesses completely on frameworks/platforms made available by large entities, as they may dissapear at a moment's notice (i.e. don't tunnel-vision angular because google might kill it like GWT)

- Beware of churn and external reasons for software projects being put out to pasture.

- There is too much churn, and there are too many companies trying to make the next big thing. This can maek the monopolies provided by ASP.NET and Rails very attractive.

- There are many similarities between rails, asp.net and spring in that they shield you from churn and offer a tyrannical but relatively-unchanging toolset

- Frameworks either die heroes or live long enough to become the villain

Why is this a problem for rails now? What is the history of rails and it's competitors?

- The technical points from Solnic's article mostly have merit

- DHH has flaws, and rails is very much his brainchild. He created it while he had a business to run

- People flocked to rails from various languages/frameworks (.NET, PHP, Java), so they could drop unnecessary abstractions

- People got addicted to writing ruby, for it's simplicity and productivity advantages over PHP, Java, and C#

- 2007-2011 were magical years (the silver age) for ruby adoption, every drinks rails koolaid. Merb tries to capitalize and fails (though it was ahead of it's time).

- 2011-2016 was a bittersweet period (the bronze age). Other languages have created their own frameworks, and are similarly productive to ruby, so they start to gain attention. Languages like Node, rust, clojure, elixir and even haskell.

- The bronze age also sees big companies start to release languages (apple with swift, google with dart and go, microsoft with typescript ASP.NET MVC, facebook with react)

- Rails is having this issue because it was meant to. It is being disrupted just as it's predecessors were. It is inevitable.

- Being the incumbent, rails is vulnerable because it cannot move or change as fast.

- The dominant model has also shifted, from rails-y backends to much simpler APIs talking to SPAs (Single Page Apps). Apis are much smaller cand can be written easily in various other languages

- For small to medium projects that fit rails's model, rails is still king. As wordpress is still king for blogs -- yes you could write a blog with go APIs and using react, but it's not wise.

- If you're using ra ils as a medium sized company, make sure you're using all the lastest rails practices -- it may not make sense to pursue a rewrite right away.

Conclusion:

- Solnic has a point, the rails community has become a frustrating place to be for many people, but it has built lots of momentum. It also common for people to side with the underdog frameworks.

- Rails made the transition from underdog to mainstream in 5 years, and has done a lot for web development. It's hard to offer all of what rails offers and power the web as it has done.

- ActiveRecord is indeed a rough point for rail's architecture, but there's no alternative that offers benefit worth the pain of a rewrite. New applications thould definitely use rails + trailblazer or go straight to the Hanami framework, but most will probably just ditch ruby.

- ActiveRecord could be better, but it looks like even the creator of DataMapper has moved away from ORMs. For the usual case, ActiveRecord is still a good technology to use.

- Other communities will face the same issues rails is having, as they become mainstream. It's inevitable that DHH has chosen not to make large sweeping changes to rails, and although it alienates experienced developers, starting with rails is still easy for beginners.

- People forget the magic of rails that beginners feel when they start, and rails wins because of it's simplicity when learning as a beginner, as well as enabling experienced developers to make tweaks to it.

- It's anyone's guess whether rails will last another 10 years given all the competition it's currently facing

Re: Rails has won: The Elephant in the Room

#177
post #27

I've been using Rails for a decade now, across many jobs, and one thing I've experienced fairly consistently is the worst Ruby web apps I have ever dealt with are the ones that weren't written in Rails. I've both seen and spent a lot of time rewriting overgrown Sinatra monstrosities with assorted non-AR ORMs. These apps were generally riddled with XSS since they didn't handle escaping correctly, often had unmaintaina…

"tl;dr: if you want to do web development but dislike Rails, your best bet is probably to switch to a different programming language than Ruby."

But... wasn't this the underlying point of Solnic's opinion piece?

Due to Rails "well deserved" domination in the web framework space, POROs never had a chance of contributing to friendly and just competition across the Ruby community. We simply ended up with shitty alternatives because no one was given the proper chance to be BETTER Rubyists.

They just kept eating the gluten and feeling the allergy pains, so to speak.

Ah well...

EDIT: shrug quoting...

Re: Rails has won: The Elephant in the Room

#178

Rails isn't the fastest or the smartest framework. It has weird choices, confusing aspects and some downright terrible defaults, but for me at least, it is the best framework and it has been for years for one simple reason: DOCUMENTATION! Every few years or so, a bunch of these articles come out shouting from the roof tops, "Rails is dead!" and "Long live Rails!" They often like to praise some new framework, like Han…

Elixir and Phoenix is what you're looking for. Most of the goodness of Rails for productivity, without the long term bad decisions that come with it to force eventual rewrites when the funding comes. There's a reason Rails core guys have put so much time into it. It gets every...single...dang...decision...right. I may never use another language unless forced because it's what I've spent years trying to find.

Nope. It doesn't. I've spent two years working with it. And "gets every single dang decision right" is a matter of opinion. Chris and José are incredibly wonderful people, but they are just as opinionated as the people behind Rails.

So "gets decisions right" sounds good as long as you agree with those decisions.

I happen to love working with Elixir and Phoenix. I find working with Ecto frustrating not because of the code, but because of the opinions the framework creators have made about where things go. They have good solid reasons for their opinions. And they are not wrong.

I just don't agree with them. And that's totally ok.

Re: Rails has won: The Elephant in the Room

#179

Earlier quoted context omitted.

Elixir and Phoenix is what you're looking for. Most of the goodness of Rails for productivity, without the long term bad decisions that come with it to force eventual rewrites when the funding comes. There's a reason Rails core guys have put so much time into it. It gets every...single...dang...decision...right. I may never use another language unless forced because it's what I've spent years trying to find.

If you discover a hot new language/framework that solves all of your problems, then here is what you've actually learned: you didn't have any hard problems. No tool is perfect for every situation, and if you find one that is perfect for every situation that you encounter, then that says a lot more about you than about the tool.

It's about balance and this has the right one for about 95% of what I do everyday in terms of client-server-database work, productivity, concurrency, stability, performance and scalability. That's where I spend most of my time on the web.

Short of complex calculations or extreme niche scenarios...it does handle pretty much everything in terms of "around web" work. For niche scenarios use what's appropriate but for the space that Rails has occupied in the general purpose realm it's wonderful.

Re: Rails has won: The Elephant in the Room

#180
post #107
post #85

Earlier quoted context omitted.

> Web development doesn't have many hard problems. It has one serious though. Kind of a strange way to put it but I think I agree with the gist. Scaling is the web's hard problem. Building an ever expanding list of features while measuring if users like them and delivering them via cheap computers and tiny pipes is surprisingly difficult. Scaling a rigidly defined web system on it's own generally isn't so hard at thi…

Systems always get more complex as you add features. At best you can avoid shooting yourself in the foot, but that's ok because none of your competitors can avoid the same issues.

The web's hard problem is dealing with that complexity at a speed and scale that is a few orders of magnitude bigger than any other programming environment I can think of.

> At best you can avoid shooting yourself in the foot

At best we can keep our systems simple, agile, and cut bad features as quickly as we test new ones (every damn day!).

Post reply on HN