Ask HN: What are real Ruby on Rails alternatives in 2017?
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+?
58 comments
[ 2.5 ms ] story [ 121 ms ] threadI'll have to take a closer look at this Phoenix stuff though
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.
I just started hacking together my own and I would say the hardest part (for me) is file generation.
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.
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
Curious, what’s your take on why this hasn’t caught on?
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.
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.
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 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.
Absolutely no code generation and no requirement for XML configuration
And the very next thing is a maven xml config.
Example: // enabling ETAGS
There is also the option to do many things in a yml file like you are used to from Rails.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.
I kid, I kid ;)
Laravel makes it tolerable though.
https://docs.microsoft.com/en-us/aspnet/core/publishing/linu...
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.
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 haven't seen anything that has all of these built in.
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.
most experience with Python
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.
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.
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.
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!
<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.
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.
http://www.catonmat.net/blog/frameworks-dont-make-sense/
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.
It has worked really well for us over the past few years.