Live data from Hacker News

Why I believe Rails is still relevant in 2019

devbrett.com

241–250 of 264 posts

Re: Why I believe Rails is still relevant in 2019

#241

Earlier quoted context omitted.

Young developers (as one myself), tend to be overly focused on what makes them attractive as a developer. Kinda like an overly insecure teenager. So they pounce on any framework or tech that makes them desirable to an employer. Rails isn't hot, so it won't get them a job so they won't learn it.

That's flat out wrong. As a Rails developer, I have a weekly stream of recruiters trying to get my attention.

I think a lot of developers focus on learning newer technology stacks because they are hot and tend to pay more. But less popular doesn't mean it's not in demand.

I know 2 COBOL programmers who are being paid a ton of money because of critical banking systems running it and candidates are hard to find.

Re: Why I believe Rails is still relevant in 2019

#242

I spent a couple of years dreaming of getting paid to work in Ruby and Rails and about 7 years doing so. There are many things I loved about Ruby, and Rails brought a ton of good ideas to web development, as this post describes (though I don't agree with all the highlights). I've since moved to using Elixir and Phoenix, and then even more recently, done some consulting on a Rails project. So the contrasts are on my m…

Callbacks suck, so write service functions for complicated CRUD. Working around ActiveRecord defaults is like the 2nd thing you learn to do at a serious Rails shop. I'm afraid you may not have been working with sophisticated Rails engineers, because we certainly modify defaults in our applications. Elixir is hot, but it's hard to learn and will always have a barrier to entry that Rails won't. Rails and .NET will live…

> Callbacks suck, so write service functions for complicated CRUD. Working around ActiveRecord defaults is like the 2nd thing you learn to do at a serious Rails shop. I'm afraid you may not have been working with sophisticated Rails engineers, because we certainly modify defaults in our applications.

I'm not sure why you feel like you need to demean my experience to discuss this. Callbacks are extremely commonly used in Rails apps and not at all the province of Rails newbies. Here's DHH in 2018 telling you about how Basecamp uses callbacks: https://www.youtube.com/watch?v=M3JPTOTqsnE

And even if you don't like callbacks and never use them, at some point you're going to change jobs or consulting clients and land in a code base that's full of them.

> Elixir is hot, but it's hard to learn and will always have a barrier to entry that Rails won't.

Maybe so. I can't predict to what extent it will catch on, but it's paying my bills. If I get to stay in a happy little niche, that will be fine with me.

Re: Why I believe Rails is still relevant in 2019

#243

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…

If you're going this way I would still recommend a library like jOOQ. It gets out of the way and is very low-level, but it still allows you to build type-safe SQL instead of having to randomly concatenate strings in order to build your query. This is especially useful if you have dynamic joins and things like that, which can get hairy fast if you're building them manually.

+1 for jOOQ. I prefer to Just Write Queries than muck about with quirky ORM magic that gets turned into queries. jOOQ lets me do that with safe query building and type checking through to the DB level (with code gen).

Re: Why I believe Rails is still relevant in 2019

#244
Man. I like two things. Boring languages/frameworks, and minimalism.

Boring languages/frameworks Just Work, and are usually pretty secure.

Minimalist --which is to say, making something as simple as possible, but no simpler-- means fewer moving parts which can break in production.

90% of what my places of employment and clients need is the same old shit, and I like to build it so that when something breaks, I can jump in and hammer out the broken thing and get the process moving again without needing a ton of research.

Re: Why I believe Rails is still relevant in 2019

#245
post #121

Earlier quoted context omitted.

Depends what you were trying to achieve with it; for the various things I've seen it used for a mix of protobuf-in-flat-files, Cassandra, and Spark.

Which one of those tools should I use if in trying to achieve relational modeling?

If you have a problem for which relational is a good fit then Postgresql is definitely a better choice. I've yet to actually encounter such a problem though.

Re: Why I believe Rails is still relevant in 2019

#246
post #175

Earlier quoted context omitted.

Up to a point. In my experience there is limited support for e.g. using "mismatched" versions of different parts of it.

Isn't that the same with any collection of libraries? If you don't use a framework and just pick your libraries, you'll still need to ensure that their versions work fine together.

If you pick a bunch of standalone libraries you can be fairly confident they're not going to interfere with each other - which version of your web templating engine you use has nothing to do with which version of your ORM you use, and you can upgrade each independently. When they're both part of a big overarching framework it's more likely that a subtle interaction has slipped in and not been noticed.

Re: Why I believe Rails is still relevant in 2019

#247
post #168

Earlier quoted context omitted.

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.

None of them is on a standard unmodded Rails stack.

Basecamp is always on the latest or beta version of rails, Rails 6 at the moment. GitHub has recently updated to version 5 and are merging a large mount of their scaling gems for version 6.

There are some podcasts and keynotes where DHH talks about their stacks.

Re: Why I believe Rails is still relevant in 2019

#248
post #152

Earlier quoted context omitted.

My point is rather if you are doing that (a hybrid app) wouldn’t doing a full spa actually be simpler? And allow you to use a less complex framework / a framework which doesn’t have to support that legacy.

You're going to need to define a "full SPA". Every SPA needs a backend, and Rails is as good as any. In fact, Rails + Vue is, by any definition, a "full SPA" as Vue is a SPA front-end framework and SPA only refers to the front-end design. You can launch Rails in API-only mode so there is no "legacy" anything, just a backend framework that has all the benefits of Rails while still giving you the SPA front-end you're l…

By full spa i meant something where all ui is rendered on the client side and the server only serves static files and a set of web services for whatever business logic that has to run on the server.

Re: Why I believe Rails is still relevant in 2019

#249

Earlier quoted context omitted.

I've made at least a dozen LOB Rails apps for internal use at companies. I also worked at a bespoke consultancy that made Rails sites for startups, and I've seen dozens of Rails apps "in production," out on the open internet, and making money for their owners. I think there may be some conflation here between "production" and "Twitter- or Facebook-scale production." And I wouldn't trust ANY framework to applications…

Even for internal use, you have to worry about data integrity a lot of the time. > I also worked at a bespoke consultancy that made Rails sites for startups Ah, so didn't have to handle the maintenance burden afterwards. I did. Rails is awesome if you can just dump the maintenance burden on someone else and move on.

Wha...? Honestly, the presumption on this board sometimes. I was one of the 2 people who maintained the apps on AWS. There were no issues. I guess we've just had VERY different experiences.

Re: Why I believe Rails is still relevant in 2019

#250
post #196

Earlier quoted context omitted.

Another concern with Elixir is that, like Node, it is optimised for IO, not computation. Take chatbots, for which Elixir is supposed to be ideal - what if my chatbot connects to a computation-intensive AI/NLP model. I'm going to need something else for that, surely? Elixir and Node are good for the orchestration layer but lack the all-round capabilities of, say, the JVM platform.

Elixir definitely comes up short on raw computation. However we've been very satisfied with it for implementing a database. Use data oriented design (you want that anyway) and move any CPU intensive part into a native function. It's pretty straightforward to bind a C/C++/Rust library.

Considering the massive growth in AI that makes Elixir only half a solution then unless you're good with low-level languages such as C/C++/Rust. Scala and Clojure, on the other hand, are good for both computation and IO so I don't really see the advantage of Elixir.
Post reply on HN