Live data from Hacker News

Why I believe Rails is still relevant in 2019

devbrett.com

141–150 of 264 posts

Re: Why I believe Rails is still relevant in 2019

#141
post #105

Earlier quoted context omitted.

A summary of my experience would be: libraries are good, frameworks are bad. (Indeed possibly the best "framework" I ever used was TurboGears which is very deliberately just a collection of dedicated libraries, all of which you can replace piecemeal as and when you need to). Rails raised the bar for how little custom configuration should be necessary to do a simple, straightforward thing. But it turns out being a fra…

Can you give an example of a collection of libraries that you would consider would compete with Rails?

On a broad level, Turbogears is such a thing. (On an even broader level, so is my current preferred stack which is something like: Wicket, Akka-Http, Circe, Hibernate, Liquibase, and Scala's native ways of doing DI). If you're asking about Ruby specifically I'm not current enough to answer.

Re: Why I believe Rails is still relevant in 2019

#142

I work on a Rails system. It's fine. Just like everything else is fine. I have problems, but I have problems with everything else too (sometimes different problems, but not always...). I think my main complaint about Rails is that it's pretty heavy weight. Lately we did a Sinatra app because we didn't really need anything that rails was giving us. Fairly quickly I realised that I didn't need anything that Sinatra was…

Well framed and this is what we all learned and moved to: There are new paradigms out that just make so much more sense and which are followed by the majority. When I read the original submission, I mean just the title, I was facepalming in my mind. Rails had its time and there were reasons why people liked it. But when I see that people post that Rails is still great in 2019, I'd like to stress following issue becau…

> proper http/2 support in Rails-land

Between early hints support in Rails 5.2, nginx proxying to HTTP2, and an http2 enabled CDN what's actually missing?

Re: Why I believe Rails is still relevant in 2019

#143
post #30

Build your app using whatever you're most comfortable with because in the end an existing product is better than no product. Will you enjoy spending an extra hour per day working with this framework over another? That's an hour more of progress. Personally I think Spring Boot with Kotlin is a way better choice today for monoliths that transition well to micro services. But if you're already deep in the RoR world just…

Personally I think Spring Boot with Kotlin is a way better choice today for monoliths that transition well to micro services. What do you use for an ORM in this case? Is there anything comparable to ActiveAdmin?

> Is there anything comparable to ActiveAdmin?

https://github.com/marmelab/react-admin + a GraphQL backend gets really close.

Re: Why I believe Rails is still relevant in 2019

#145

Popularity of a framework or paradigm seems largely driven by marketing and memes. With "Rails doesn't scale" as the almost-rhyme that sticks in people's minds, an entire tech cycle gets wasted on things that take significantly more developer effort. I've seen a Rails app handle Cyber Monday traffic for an ecommerce company just fine, and I've seen JVM-based apps crumple under a fraction of the load. Rails scales (se…

> Rails scales Your post is a bit misleading. Rails can scale but to get there is different than with other stacks. Some would say, it's much more challenging or complicated, some would call it just a PITA and if you really, really want to scale, like e.g. a porn site, Rails is the worst choice you could ever take. Or you would just completely rewrite it but what is then the motivation to take a framework? Maybe fram…

Hulu was, and possibly still is, a Rails site. Streaming video is no problem for a Rails based application because the application server just prepares a URL for nginx to stream.

Re: Why I believe Rails is still relevant in 2019

#146

As a former Rails developer, I figured it would be worth mentioning reasons I disagree. > Rails is not the fastest framework in the world… but I will argue that performance is the last thing you should worry about when you want to scale. > In my experience, NodeJS or projects written in other frameworks start to collapse architecturally after an alarmingly small amount of complexity is added to them. > More important…

> If you want to go with “battle-hardened and industry-proven”, use the Spring ecosystem.

Well, uh, there it is.

As a Rails fan who was forced to use Java for a web application at a previous job, I've been all over this whole topic, and even ranted about it on this site a couple times. This is the conclusion I came to: some people like to have things done for them by a framework, valuing the tradeoff of time vs. specificity, and some people like to write a lot of extra code themselves, valuing the precision that affords, at the expense of time.

The working example I took away from the exercise was that writing a simple edit page with a nested model. It took me 3 lines of code in Rails, with a few dozen more from the generators. (Cocoon is freaking magical.) In Java/Spring/Node.js, it took me 160, and I still wasn't done. I needed repeated classes, controllers, and services in 2 languages in 2 stacks. One of the arguments I see a lot in this field is how people are fans of strict types in the Java world. OK, but it seems to be a requirement to keep Java and Javascript sorted, and is a non-trivial amount of work to keep in sync.

Some people get hung up on, say, race conditions of database validations, or mock database transparency as useless, or argue about which ecosystem has more plugins (Node "wins!"), and some people think it's ridiculous to duplicate 90% of the plumbing, or hate having to deal with migrations manually, or find it inconceivable that there's not one single canonical example of a working Spring/Node CRUD app in a current version of the stack available on the entirety of the internet.

To the last point: THAT is how fragmented the "Spring" world is to learn and apply. THIS is the tradeoff in NOT being opinionated. In nine months of pulling my hair out, I never once found 2 examples that did ANYTHING the same way, and NOTHING was current and complete, not even stuff by Matt Raible. I even contacted him directly, and the best he could do was point me at a GitHub project I had never been able to bubble up with Google, which was 3 versions out of date, and would no longer work the same way with current versions of the stack.

To each their own. Horses for courses. Your milage may vary. Terms and conditions may apply. It's almost like a "right-left" dichotomy of politics.

Anyway, I leveled up my career, and now I get to pick what tools I use. But, yes, I'm still bitter on this topic. ;-)

Re: Why I believe Rails is still relevant in 2019

#147

Popularity of a framework or paradigm seems largely driven by marketing and memes. With "Rails doesn't scale" as the almost-rhyme that sticks in people's minds, an entire tech cycle gets wasted on things that take significantly more developer effort. I've seen a Rails app handle Cyber Monday traffic for an ecommerce company just fine, and I've seen JVM-based apps crumple under a fraction of the load. Rails scales (se…

> Rails scales Your post is a bit misleading. Rails can scale but to get there is different than with other stacks. Some would say, it's much more challenging or complicated, some would call it just a PITA and if you really, really want to scale, like e.g. a porn site, Rails is the worst choice you could ever take. Or you would just completely rewrite it but what is then the motivation to take a framework? Maybe fram…

So let's just forget about Basecamp, Github, AirBnb, Hulu, Kickstarter, MyFitnessPal, Twitch and all the other Rails sites and continue to pretend Rails can't scale and won't work for the modern web.

Re: Why I believe Rails is still relevant in 2019

#148
post #99
post #78

I think for what it is - for its paradigm if you will - ruby on rails is an extremely well-designed platform. But I think things have moved on and what was back then seen as the right way (or just fresh new way) is now seen differently. For example - is it really "better" to say 7.even? rather than isEven(7)? (Strict OO vs multi-paradigm/functional programming). Or is the article's example of a data model migration r…

> For example - is it really "better" to say 7.even? rather > than isEven(7)? Yes. And that has nothing to do with rails, it's just the Ruby way. > Or is the article's example of a data model migration > really better than a series of alter table sql statements? Yes. Migrations provide much more than just altering DB schema. > And why not go for a pure SPA rather than an > AJAX-sprinkled compromise I would love more…

>I would love more people to ask themselves "do I really need SPA?" actually.

And I'd love if people asked "is anyone actually doing SPA" beyond what TurboLinks + a Vue frontend on a Rails backend would get you.

Re: Why I believe Rails is still relevant in 2019

#149
post #73
post #70

I have this joke that I noticed ruby/rails developers seems to use a lot of their extra time (which they get with the high productivity you seem to get with rail) talking about how great ruby and rails are and how efficient they are with it ^^

Take a look at how many non-rails developers spend their time proving that Ruby and Rails are dead.

But that's not wasted time, they're just waiting for their async promises to finally return so the page actually renders.

Re: Why I believe Rails is still relevant in 2019

#150

Earlier quoted context omitted.

I recommend to not use an ORM. Really, with a modern language, an ORM is mostly redundant. If on Spring boot, simply use JDBCTemplate and TransactionTemplate to deal with raw SQL queries and transactionality. Get rid of all the annotation magic around this. Then you need a bare minimum of mapping code. Mostly this boils down to a single line of code to call the relevant constructors while you extract columns from you…

I have dynamically generated queries that span over 200 lines. Doing this without a query builder is pure madness. It doesn't matter how modern your language is, manually concatenating SQL shouldn't happen in 2019.

Why not use a view?
Post reply on HN