Live data from Hacker News

Why I believe Rails is still relevant in 2019

devbrett.com

31–40 of 264 posts

Re: Why I believe Rails is still relevant in 2019

#32
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?

Re: Why I believe Rails is still relevant in 2019

#33
post #5

Every time I read an article about something still being relevant, it soon becomes irrelevant.

Naah Rails is here to stay - the momentum around the project is still huge and too many companies rely on it. Even if dhh did a Guido and left, there's a big army of contributors that would replace him. If I need to guess though, in 10 years dhh is still involved with Rails to some degree.

Re: Why I believe Rails is still relevant in 2019

#34
This article reads to me as more of a "Rails vs Node.js" piece, which seems almost too easy—I would be interested in a more thorough comparison of Rails versus other frameworks. Here I will attempt a comparison, limited in length as this isn't a blog. :)

My personal favorite up-and-coming framework (and admittedly, my favorite web framework overall) is Phoenix[1], written in Elixir[2], a functional programming language with a focus on concurrency, performance, and developer productivity. In my opinion, Phoenix has almost all of the best parts of Rails without nearly as many of the warts, and adds a plethora of compelling features of its own.

Despite what the author argues, I believe that raw performance and developer performance are equally important, and even intertwined. Why? A slow application results in lost customers and revenue, a fact that is well-documented. A default Rails application is going to be quite slow, requiring intervention. Of course, most larger Rails apps are not necessarily slow in practice—in my experience, this is largely because the code is littered with brittle caching logic and hacks requiring many human-hours to maintain and debug when things go wrong. Thankfully, Ruby is seeing improvement in the performance realm.

Phoenix achieves massive scalability, raw performance, and developer performance, without requiring significant trade-offs and caching logic littered all over your code. It is an absolute joy to write Elixir. Phoenix is famous for consistently achieving microsecond response times without caching, and being capable of holding millions of websocket connections[3]. Granted, Elixir as a language is not computationally fast, but the typical web app is not performing expensive computations, but instead juggling IO, which Elixir handles extremely well. CPU-intensive tasks can be written in a different language if need be.

Importantly, Phoenix is not your application—Phoenix's job is to provide a web interface into your broader Elixir application. Thus, Phoenix is more of a toolkit than a framework, and yet it provides everything you would expect in any web framework, with strong conventions based on the solid foundation of Elixir. You could migrate to a different framework with relative ease. You can easily integrate different interfaces into your application, such as a CLI frontend. This is in contrast to Rails, where Rails is your application unless you actively fight against the framework.

Ruby and Rails are notoriously bad at handling concurrency and real-time features using e.g. websockets. This becomes progressively painful as using all CPU cores becomes increasingly necessary, and as websockets continue their ascension on the web & mobile. In contrast, concurrency and soft real-time communication are Elixir & Phoenix's bread-and-butter.

As I mentioned, Phoenix brings compelling features of its own. The most interesting to me is the upcoming Phoenix Live View[4], which will allow developers to write rich, interactive, real-time applications without being forced to wade into JavaScript hell. Read the linked article for more information. I could be wrong, but I don't see something like Live View making its way into Rails, especially without significant downsides.

One area where Ruby & Rails trounce Elixir & Phoenix is maturity. Although they have gained significant traction, Elixir & Phoenix are still comparatively immature. Thus, you'll have a harder time hiring, finding third-party libraries, and answers to questions. That said, Elixir is based on Erlang, which is extensively battle-tested and has a huge assortment of libraries available. (You can very easily and naturally use Erlang code in Elixir.)

I could go on, but I think this has gotten long enough.

[1] https://phoenixframework.org

[2] https://elixir-lang.org/

[3] https://phoenixframework.org/blog/the-road-to-2-million-webs...

[4] https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera... (Repo: https://github.com/phoenixframework/phoenix_live_view)

Re: Why I believe Rails is still relevant in 2019

#35
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?

Java has JPA (Java Persistence API) which is an abstraction layer over various ORMs. However, most people use Hibernate. Hibernate is nice because it also gets out of the way when you need it to, like when you're inserting or selecting a massive amount of data. It also supports the Stream API now, which is super convenient.

I've found Admin interfaces on the same server to turn into liabilities and infosec in bigger orgs usually has strict rules around segregating admin access off into its own subnet with restricted access only to internal traffic.

That said, for simple monololiths I use Jhipster, which auto generates Admin pages for you similar to ActiveAdmin.

Re: Why I believe Rails is still relevant in 2019

#36
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 giving us either. Rack was fine.

I think especially after your app gets to be a certain size, you are either writing your own framework, or fighting with the framework you chose at the beginning. It's just the nature of the beast. From there it's more of a training issue than anything else. You can hire "Rails developers" (or whatever developers), but you can't hire people who are specifically trained in a system you've built. Depending on the kinds of developers you hire, this may or may not be a problem.

Personally, I like writing code and I like small, light systems that are easy to move around in. Usually that means trying to avoid large frameworks. However, not everybody I've worked with is comfortable with that experience, so normally we pick things people have worked with before. Either way it's not a big deal in the end.

Re: Why I believe Rails is still relevant in 2019

#37

Rails needs more opinionated decision on frontend story. Just pick ReactJS instead ? Not a bad idea. Or VueJS ? Neither a bad choice. It's the main reason i don't choose Rails over a universal Node.js stack for the HTML rendering part.

Their opinion is coffeescript + turbolinks, which turn out to be the first two defaults developers change.

Turbolinks works fine with VueJS.

Re: Why I believe Rails is still relevant in 2019

#38

Aren't some large at-scale apps still on RoR? AFAIK Coinbase, Shopify, Twitch, etc...

Having to support a legacy RoR monolith and being happy with it are 2 different things. How many of those companies are now supplementing the monolith with microservices in other stacks and are actively chopping up the monolith? I know at least 2 of those companies are doing just that.

Re: Why I believe Rails is still relevant in 2019

#40

Does any free web framework have something more thorough than rails' Active Admin? Django admin seems pretty unfinished by comparison. Haven't seen anything actually better.

I've tried to work with ActiveAdmin on several consecutive projects, and I do not understand the draw. It's a fussy DSL that requires you work with your data in a way that feels very un-Rails. You basically have to approach building out your UX from the perspective of what the tool is designed to do. This seems a shame, in the context of Rails - a framework that's actually pretty great at getting out of the way in the right places.

Of course, there are people in this thread who prefer writing Rack endpoints over the thorny complexity of Sinatra. You really can't make everyone happy all of the time.

Post reply on HN