Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are real Ruby on Rails alternatives in 2017?
40 points by rubyfan on Aug 9, 2017 | hide | past | favorite | 53 comments
What are the real alternatives to Ruby on Rails in 2017? When I saw “real” I mean, what frameworks offer a wide variety of packages/libraries, common integration with “as-a-service” offerings, and have an opinionated methodology for delivering high level web and API functionality rapidly?

I hear constant refrain “Ruby is dead” so much so that it reminds me of the situation with FreeBSD many years ago.

Admittedly I’m partial to Rails but also love microframeworks too... Sinatra, express, Kemal, iron, etc. but none of those seem to really offer a comprehensive opinionated toolset the way Rails does. There are things that are close but don’t satisfy.

Is there anything close in JS/ES, Kotlin, Rust, Go, Crystal, Scala or Java 8+?




I think it is more 'Ruby isn't sexy any more' because people older than 25 use it.

It's just the usual thing of the next generation not wanting to listen to the music the previous generation did.

These things come in cycles. I remember when 'Hot Java' was sexy and cool and only throwbacks wrote C. (And when C was sexy and cool and only throwbacks wrote COBOL, etc) There were lots of other languages and frameworks around at the time too that have long since been consigned to the history books.

I never thought fashion would be a factor in IT engineering, but you realise over time that the two things you cannot escape are fashion and politics. They are fundamentally part of the human condition.

If you want long lasting skills in the IT industry make sure you're good at fashion and politics. They'll take you all the way to a comfortable retirement.


That's a very good insight.


Elixir's Phoenix is where a few former Rails folks have migrated to, so it shares a few of the ideas that made Rails so appealing: https://hackernoon.com/phoenix-is-better-but-rails-is-more-p...

A list of companies using Elixir/Phoenix: https://github.com/doomspork/elixir-companies

Discussion on how Bleacher Report (1.5B pageviews/month) moved from Rails to Phoenix: https://news.ycombinator.com/item?id=13606139


I used to work at a company in a similar vertical as BR also linked off CNN frequently and also running Rails. I understand the scalability challenges that might lead someone to something like Erlang and Elixir.

Curious, what’s your take on why this hasn’t caught on?


I've only played around with Phoenix/Elixir so can't claim to have any special knowledge. But I've heard it argued that functional languages/frameworks aren't as common in startups as expected because functional programming isn't as popular among current developers, nor as commonly taught in school. And Erlang seems to be particularly specialized:

https://news.ycombinator.com/item?id=7277797

Elixir is relatively new (2011), Phoenix even newer. Maybe it's too early to say whether or not it will take off in the same way Rails did? And maybe it won't ever take off because Node/Express brings sufficient performance while allowing developers to use JavaScript, arguably the most popular language in production today.


As somebody who has been diving into Elixir and Phoenix this year I have to say that the Phoenix way into Elixir isn't as exciting as a backend application written in Elixir in regards to the power of the language and the platform. A lot of Phoenix is hidden and is "magic". You don't need to utilize the OTP at all when using Phoenix and you don't interact directly with what makes Elixir (and Erlang) so special.

I started using Phoenix and Elixir and while I liked Elixir's syntax better than other languages I just didn't see what was so great about it. Then I started doing non-web things with Elixir and it became clear how awesome Elixir is. I heard the same thing with Ruby back when I looked at Rails 5 or so years ago. Elixir seems like just another language when you aren't really digging into the OTP.


I think Erlang hasn't caught on because of its syntax. It is much different than anything else I've seen (that wasn't an esoteric language). That syntax will rear its ugly head when using Elixir as well since you have to dive into the OTP every so often. Given that Elixir is built upon the BEAM it isn't a surprise that Elixir isn't more well known.

Then there are documentation issues. Hexdocs.pm is amazing and typically there is enough information to get started and going but that is typically at a higher level and that is also not written in a way that is necessarily friendly to those outside the HN crowd. Sometimes there will be a single example of how to do something and sometimes there won't be a single example, which means you have to figure it out. There are sites like Elixir School (which I have used) but it is little more than a re-hash of the official Elixir tutorials. Now, there are some projects with great documentation (Phoenix is one of them) but most are not that in depth.

When dealing with OTP (which is part of what makes Elixir so great) you run into issues with the documentation and then Erlang syntax. For instance, I'm working on a blog engine that I want to run fully contained using Mnesia, the OTP relational database. There is no Elixir support for Mnesia so I have to fall back to Erlang. Now I'm learning Erlang's syntax, which is slowing me down significantly. Now, I want to do this and my design decision is to use Mnesia so I can not have to worry about dealing with a standalone RDMS so this setback isn't pulling me down but if I was a beginner just trying to learn I would've given up by now.

Let's talk library support. There are a lot of great libraries that are written by Jose and the Elixir core team but there is a lot of gaps as well. Odds are if there is an API you want to call you won't find an Elixir library for it and you'll have to go at it yourself. There isn't anything wrong with that if you are willing to take the time but if you need to get stuff done then it is just a hassle. Again, I'm doing my Elixir work on the side so I have plenty of time to make libraries (I have made a couple so far and am in the process of making more) to help others do what I need to do.

Finally there is the thought shift that is required to fully embrace Elixir. Elixir looks Ruby-ish but idiomatic Elixir is much different that Ruby. There are two areas you are supposed to keep state in Elixir (specifically Agents or GenServers) and they aren't exactly beginner friendly topics. I was listening to an episode of The Elixir Fountain this morning and they were talking about moving to Elixir from Ruby and a lot of people find ways to hide state in their code when it shouldn't be there. They just haven't shifted from an OO mindset to a FP mindset. Recursion, Map, reduce, etc, are all concepts that can be harder to understand. It is easier to do a for loop in an OOP language than try to fit that into something like Elixir. It can be done but it gets messy fast when you are new and may not know the best way to do things.

At the end of the day, I love Elixir and hope to get to write it professionally soon but despite being around for 6 years it isn't ready for the mainstream yet due to the issues above.

TL;DR; Documentation isn't the best. Erlang syntax and lack of popularity make Elixir harder to discover. 3rd Party Library support is sparse. And the mindshift from OOP to FP takes time that many may not be willing to invest


I find the evidence for Elixir adoption unconvincing as it invariably focuses on Bleacher Report. It's the same with Elixir app examples which are invariably chat apps, painting Elixir as a one-trick pony. Indeed.com offers little evidence for Elixir/Phoenix coming anywhere near the adoption of Ruby/Rails.


I found Laravel (PHP) to be almost the equivalent to Rails (Ruby) with https://lumen.laravel.com/ similar to Sinatra. I've coded, tested, debugging in both extensively. That said I don't consider Ruby declining at all and personally prefer Rails over Laravel (language, ecosystem, packages, day-to-day coding).


+1 for no Rails bandwagon bashing!


I think the closest would be Java's Spring Boot: http://projects.spring.io/spring-boot/

I think it is easier to find resources to answer rails questions though.

In addition, many of the languages you list are very young and their frameworks lack the maturity of something like Rails, Django, Spring, or Laravel.

I think it's worth asking, why are you looking to switch? If rails is not a performance barrier for you, then I do not see a good incentive to switch other than wanting to learn something new.


Spring doesn’t seem as straightforward to me as I would hope. Play is similar, there is promise there but just too open ended.


Play is probably fine if you use Scala, the Java side is painful. I've worked with Play (Java version) for 3 years and we're moving to Spring Boot now, it's much simpler and stable (from a feature and framework perspective).


The funny thing I see on the springboot quickstart page:

Absolutely no code generation and no requirement for XML configuration

And the very next thing is a maven xml config.


It's not a requirement to use Maven, so their statement is correct even in this extended sense. There's Gradle after all.


Yes it’s just an ironic presentation.


By no XML, they mean that you don't have to do any configuration in xml files. You can declare everything as a bean.

Example: // enabling ETAGS

    @Bean
    public Filter etagFilter() {
        return new ShallowEtagHeaderFilter();
    }
There is also the option to do many things in a yml file like you are used to from Rails.


I'm a long time ruby developer and have switched to erlang/elixir now for about 2 years now. IMHO phoenix is at least as good as rails, personally I think its most often a better option when building large applications, though this is due mainly to elixir/erlang and OTP.

Elixir offers production grade options for all the major packages/libs you need and all the packages I've had to build have been the same kinds of minor things like api clients or whatever that I had to build a gem for when I was using ruby.

So phoenix/elixir is certainly a "real alternative" since I've been building production systems in it for 2 years.

lastly Phoenix is not quite as opinionated as rails, but its still very opinionated and any rails developer will feel very much at home there.


I have not looked into Elixir Phoenix but have been hearing some noise about it recently. Folks also frequently compare Rails to Django (Python) ... my 2 cents is Rails has a lot of good tools to build web apps fast and underneath it all provides a lot of strong functionality. Most things are relative though to the specific "thing" you're building so I can not say Rails is the best framework without knowing xyz, but for most web applications I'd stick with Rails. You get a lot that often gets taken for granted. Nowadays it seems folks take 1 month bootcamps and come out thinking they know everything and are so quick to try the next framework. I think that bad implementations, lack of expertise, and biased opinions has hurt the public opinion on Rails. Ultimately Rails enables you to quickly build and figure things out. Once your business is set in stone, the data model is consistent, and you're no longer figuring it out you can switch focus outside of something like Rails and break your system up into solid super fast micro-services. It's just my biased opinion since Rails is "easy" for me. Perhaps Elixir or Django are just as nice, but ultimately I guess it boils down to the developers themselves, the mentorship, the team etc. Ruby isn't dead but if in 2017 developers are banking on 1 language or framework then good luck. Full-Stack problem solvers is becoming a norm now. Just figure out how to become a strong developer in general and care less about frameworks that most people / companies abuse and implement incorrectly all the time. Sorry for the rant but God Damn this Ruby is dead buzz is so annoying, irrelevant, and usually backed by people using it incorrectly in the first place.


Great rant. In a way my question is a challenge the Rails is dead noise. Maybe I’m an old dog but the stuff I see lately misses the mark. Developers seem to spend a lot of time thinking about how they’re going to run their microservices before any functionality is built... there’s something wasteful there. Rails just works and seems to be faster to solution than any of the piecemeal approaches I see in the microframework world.


I quite like Lift which is a Scala framework allowing stupidly fast rapid prototyping (rails is really slow and clunky in comparison) . There are no routes and all the Javascript stuff is built in (so no annoying manual Ajaxcalls). It is multithreaded via Aktors and has build in comet for async stuff which is almost trivial to use. The example for using the framework a life webchat which is a handful of files with a few lines code each. On top the HTML is, well... proper HTML. No scull operators or such thing. The framework attaches functionality via css selectors in so called snippets which are like small controllers but not for an individual view but more for a specific functionality which helps with reusability. On top you get all the cool thing from scala like option types, static typing with type inference, the speed, multithreading and so on.

The biggest downside is the rather awful documentation (often outdated) and the missing migrations. I found it quite a step to lean since it is not an mvc framework and inherently stateful. There are a few free books however.


Laravel (PHP) is very Rails like.

I love Rails but clients/projects have pushed me toward using Laravel the past few years.

It's been a great experience.

Lots of great packages, great community, great tools for deployment Forge + Envoyer.

Laracasts.com is a great resource to see what it's all about.


Nooo.. But then I have to use PHP..

I kid, I kid ;)


ha . . . this is true.

Laravel makes it tolerable though.


Yes, if were not for Laravel's Collections I wouldn't touch it. The biggest barrier for me with PHP is the idiomatic PSR-driven abuse of blank lines, a la Kernigen and Ritchie, coupled with code hidden in doc-comments. You're lucky to find more than 5 lines of code visible on a screen when surrounded by this code style monstrosity.


Phoenix in Elixir seems to be really appreciated. The Play framework in Scala is also often mentioned as a very performant tool if latency/throughput/reliability is really what you are after.


I’m after productivity ala Rails. Nothing seems to come close for me yet.


That's generally the win you got with Rails. Seems that most people moving away from rails are chasing better performance for high scale sites. So if that's not you, rails is probably a good choice.

I'll have to take a closer look at this Phoenix stuff though


Have you considered that you feel that Rails is very productive simply because you know it? What you perceive as intrinsic productivity is just you knowing the framework/tool very well.


Sure enough a valid point.

When I didn’t know it I was productive too, circa Rails 0.14.3. I’ve stepped away for programming for many years and skipped mostly through Rails 3 and 4. Recently picked right back up in Rails 5 and just as productive as ever.


.net core. With Asp.net MVC.


Is it dependent on Azure or Windows-only tools?



No, it's equally unfinished on all platforms. Hopefully 2.0 will be better.


Not at all, it's completely open source, you can use any text editor you like, and develop on Windows/Mac OS/Linux.


Just started with Django, I am praying noone comes to me tomorrow and say "Django is dying", atleast not for now.


If someone ever says that to me, I'll still keep using it to the day I die. And I'll maintain it if need be. Because Django is awesome.


At GoCardless, we've replaced ActionController with Coach for request handling while still using the rest of the rails toolset: https://github.com/gocardless/coach

It has worked really well for us over the past few years.


Grails Framewok! http://grails.org

Built on top of Spring Boot.

Awesome performance, both in execution and development speed.

Convention over configuration. But it is still easy to access the rich Java libraries.

Comes with GORM, an ORM layer on top of Hibernate. Makes it work a lot more like Active Record with dynamic finders.

Groovy, very similar to Java. Metaprogramming, easier JDBC, execellent, makes it very easy to work with JSON. Groovy also has performance close to Java. Java and Groovy can access each other as they have similar byte code.

Very few breaking changes from release 0.4 to 3.3. You can expect that most of your code will work without needing a rewrite the next 10-20 years.

Superb HTTP parameter binding and validation with Command Objects.

It is a very mature framework and you have full access to Spring Framework.

Great community!


I inherited a Grails 2 codebase about 8 months ago. I'd never worked with Java or Spring before, but I have pretty extensive experience with Django, Flask and Symfony (inspired by Spring, as I understand it). Anyway, from my perspective, I'm sorry to say I have to strongly disagree with all of these points - I've never had a more miserable experience with a framework.

<rant>

First off, I found the documentation to be really bad. All of it assumes you're already deeply familiar with Spring/Hibernate, and it offers zero direction for those who aren't. Furthermore, Grails has a ton of magic. Which I guess could be OK, but again, it's all very poorly documented - and trying to read the source code of Grails itself to get a grasp on what's going on? Forget it.

Development speed? Hot code reloading pretty much doesn't work; any time I add or change a route, or a JSON marshaller (aka a serializer in every other framework known to mankind[0]), or simply add a JS file, you have to restart the dev server. Which, to top it off, spins up insanely slow compared to a proper dynamic language.

GORM. Same documentation rant. They cover the simple cases and leave you in the dark if you need to do anything more complex than a join. Luckily people on SO are helpful here, but I wish I could understand what the hell is going on behind the scenes.

Plugin ecosystem? Seems pretty small/inactive, especially compared to Django. Oh, and each time you install a plugin, expect at least another 30 seconds to spin up the development server.

Breaking changes? The recommended upgrade path from 2 to 3 is "start a new project and copy over your files." WTF?

The parameter binding/validation does work pretty well, as long as you don't try and do anything non-straightforward. But step outside the box, and it falls apart. And again, the documentation of these magical transformations is utter shit. Related: no default arguments allowed for controller parameters? Really guys?

[0] This whole "let's make up a new name for some already widely established concept/function" appears especially rampant in Groovy/Grails. Not a fan.

</rant>

Perhaps coming from the perspective of JavaLand it's an upgrade, but man, this shit is not for me. Sorry for the rant.


> documentation rant. They cover the simple cases and leave you in the dark if you need to do anything more complex

The business model for Apache Groovy and Grails after Groovy creator James Strachan was pushed out became to hook users in with free open source software, then charge them for consulting and conferences when they'd amassed some technical debt.

> The recommended upgrade path from 2 to 3 is "start a new project and copy over your files

Virtually no-one's upgrading from Grails 2 to 3, or even starting new projects in version 3.


For the size of website Rails is optimised for nothing matches Rails IF you're considering all dimensions rather than just performance. That's because Rails capitalises on the unique design of the Ruby language. Ruby manages to blend OO, procedural and functional, taking the best features of Perl, Smalltalk and Lisp. The result is perfect for creating the kind of DSLs Rails is built on. Clojure and Elixir come close but they're strictly functional languages. Scala claims to excel in blending OO and functional but the result is a mess which has fragmented the Scala community whereas the Ruby community speaks with one voice.


I was pondering over the same question some time back which lead me into experimenting with frameworks in NodeJS and oh boy, I missed Ruby On Rails on every single line I wrote in those other frameworks. I whole heartedly regret looking into other frameworks just because I felt Ruby On Rails isn't sexy anymore.

This experience made me double sure on why Ruby On Rails is one of the strongest & productive frameworks available. My advice is, don't look anywhere else if you're not facing any problem with your current stack.


Play Framework - supports both Scala and Java. It was inspired by RoR to be a lightweight alternative to such legacy behemoths like Spring. It's a full featured web framework based on Akka, scalable out of the box. Combination of Play/Scala/Slick gives you compile time safety for database queries - very few alternatives can offer that. Also, strict types significantly reduces your test coverage which is not possible on any dynamic languages.


The comparison with Spring does not make any sense, because Play and Spring have different scope. Play is just a web layer, Spring is modular general purpose framework, compatible with different web layer implementations. If you want to compare "lightweight alternative to legacy behemoth", take the full feature stack (and mention all other additional libraries you'll need for Play to match the functionality). I doubt there will be significant difference.


At the moment nothing comes close. Theres are lots of 'Me Too' frameworks but they don't give enough extra benefit to make it worth switching.

In the future we might see something coming out of Rust, there's a nice HTML template api which is typesafe and an ORM called diesel which is also type safe and could give ActiveRecord a run for its money.


I know you didn't list Python, but Django works very well. Bit of a learning curve though. Flask is a microframework (also Python), with emphasis on the micro.

Django makes some trade-offs that might make it seem like you're less productive. Maybe it's true, but Django apps are very maintainable in my experience.


Migrations, asset pipeline, debugger, package management.

I haven't seen anything that has all of these built in.


PHP: Laravel, Lumens Python: Django, Flask, Pyramids, Tornado Java: Spring Scala: Akka?

most experience with Python


Have you considered hacking together your own? Rails is built on top of other components (Thor for command line).

I just started hacking together my own and I would say the hardest part (for me) is file generation.


The thing that’s cool about Rails is there’s some common understanding of the Rails way and in theory I can hire easier I have consistency of this working across versions, etc.

I know when I start a Rails project I’m a few steps away from business valuable functionality... less so with everything else, there’s like a design and architecture step that comes first. Sometimes/most times I just want to be productive.


Friends don't let friends use frameworks

http://www.catonmat.net/blog/frameworks-dont-make-sense/


fair enough, I'll take the downvote because it was a bit trolly.

But it's a serious point. Frameworks are not helpful in the long term.

Go has no commonly-accepted web framework because the idiomatic solution is to use the standard library and write just the code you need. Instead of importing a tonne of code (and assumptions about your project) that you don't need.

A framework will help you get something up quickly. But as the project continues it will get in your way, more and more. I've seen it so many times.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: