Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What lang and web stack is both popular and similar to Ruby and Rails?
26 points by philonoist on Jan 11, 2019 | hide | past | favorite | 33 comments
By lang, I mean language.

I need that monk like enlightenment which Ruby and Rails have given me.

By popularity, I mean adoption at industry wide and scalable.




Django / Python sounds like the obvious answer. Almost every comparison between Rails and Django I have read seems to rate them fairly evenly.


If the main criteria is to be similar to Ruby + Rails, Python + Django is the right way to go. Beyond the many similarities of Ruby and Python as languages, Django fills the niche for the Python web development ecosystem that Rails does for Ruby; a fully fleshed-out framework, which comes with batteries included.

Many people have had the experience of choosing a lightweight framework (Sinatra, Flask, etc.) and gradually needing more and more features from a heavier framework. Eventually you find that you wrote a poorly documented, poorly implemented version of Django or Rails, and bringing new people onto your team is now far harder than just finding people who've used a specific framework.


It's unfortunate that Ruby doesn't get the push towards more applications like Python does. Especially for scientific computing and machine learning.


> I need that monk like enlightenment which Ruby and Rails have given me.

Then I suggest you scratch both the "popular" and "similar to Ruby and Rails" requirements. When you do that, you have things available to you such as Elm and Reason (with ReasonReact) for the frontend and F#/Haskell/Scala on the backend.

Popular will tend to the lowest common denominator, and similar to what you already know means you won't gain much if at all :)


If you end up listening to this advice and doing away with the "like Ruby/Rails" requirement, but find that a random pair of functional languages is a bit too esoteric, I'd recommend checking out Elixir and Phoenix. Lot's of interesting ideas that can give you that monk-like enlightenment again, but you won't struggle with as many of the problems that are endemic to small ecosystems. Plus Elixir/Phoenix have been designed web-development first, and won't leave you to reinvent the wheel (or all of Rails), as you often have to when using a more spartan framework.


I wanted to recommend Haskell/Elm, which is what we use at ITProTV, but felt it wasn’t popular enough to recommend per the OP’s preferences, so thank you for recommending it :)


https://laravel.com/ (PHP) will remind you of Rails. Even the directory structure.


For PHP, Yii Framework has awesomeness. I just v1 and a bit of v2 (though the simple vs modules split adds more complexity than just having modules always).

The great thing with Yii is performance (efficient generated SQL queries, multilevel caching, mixed eager/lazy loading) and instrumentation for application tuning. Other stuff is like other good frameworks.


Can second this. Not a PHP fan, but modern PHP is ok, and very popular. Laravel is pretty awesome, though, and explicitly inspired by Rails.


And that's why Laravel is opinionated by those of us that don't like RoR


Laravel gives you that Rails feeling.

It has a great community too, lots of great packages(gems).


If you are looking for something that gives you a very similar feeling to something you already know/love/use, you are likely to find yourself disappointed. Or at the very least, without a good reason motivating you to leave Ruby/Rails, you'll just find yourself returning quickly.

It might be more interesting to ask "what is nothing like Ruby and Rails?" to push yourself to learn something new that's entirely different, can give you new feelings.

If you are interested in exploring truly new things, there's a lot of interesting stuff happening in Universal or Isomorphic JS space (both names are basically for the same thing, and about equally common in usage), some of which becomes very different from the traditional Rails approach to a web backend. (Also, there's a lot of interesting variety in language options from transpiling ES2018 or ESNext to Typescript to increasingly more obscure transpiles to JS languages. I recommend Typescript as the best place to be, for what that is worth, but you'll get a bunch of other opinions pretty easily.) It could be useful experiencing some of that, and get a very different experience from just "Rails but in a another language". Server-side React seems to be getting increasingly popular, and the GraphQL approach to database work can be very different from a traditional ORM approach like ActiveRecord.


You should try Elixir and Phoenix.

Phoenix is similar enough to Rails that you won't feel totally lost, while using Elixir will teach you about functional programming and actor systems.


https://luckyframework.org/

Lucky uses crystal, you get all the benefits you are used to with rails, i.e. migrations, models views etc.

The main benefit is that crystal is a compiled language and is type safe. So you get to use all your ruby skills and the compiler adds a whole new level of safety to your code.

https://crystal-lang.org/


I tried LuckyFramework, Amber, and eventually settled on Kemal. The main reason being edit/compile-reload iteration time.


Scala/Play

Python/Django

Groovy/Grails

Elixir/Phoenix is far less popular, but very fun and gaining steam.


Another one for Scala/Play which coincidentally can also be Java/Play, although I would choose Scala hands down. Play was inspired by Rails, too.


Isn't Scala usually paired up with SPARK?


Most similar is Django/Python. Nothing even comes close to RoR and Ruby in similarity than Django and Python. The languages are very very similar to one another. The framework less so in smaller ways but very similar overall.


Rails, or in other words Web MVC is the most copied paradigm I’ve seen. Pick almost any modern language and there will be an MVC web stack for it.

I’d pick Node JS given that most web devs end up having to use Node anyway even if just as a build pipeline. Knowing Node better will always be useful. Also the dynamic typing will feel at home for a Ruby dev, and if you want to use types then try Typescript. If you want to go functional there is Purescript, Reason etc. All compile to JS so you can use on Node.


I’m not really sure what you’re aiming for here, but if you want something similar to Rails but with a different approach take a look at Phoenix on top of Elixir.


Why do you want to switch? There are frameworks for other languages, but they are not really better.


For a MVP you’re right. But a few years (months) down the line, you may find that some alternatives scale better. Elixir, for instance.


I am writing Ruby for 5+ years with a lot of Rails project that have the same age without problems, they are scaling happily without issues, easy to maintain as well.


And I believe you. In the end, no language is better than another one in absolute. It all depends on the use case. In mine, Elixir and Go happen to outperform everything else I know but they are probably terrible somewhere else.


This is what I'm wondering..


For writing APIs, Echo and Go are pretty great. Then write your site or app as a one pager in angular or react.

Many huge sites are running on rails though, so switching to a new framework isn't going to give you automatic "scale". I'd recommend reading this post which summarizes a re:Invent presentation about scaling to 10 million users on AWS http://highscalability.com/blog/2016/1/11/a-beginners-guide-...


Python + Django

But i really don't see the benefit of learning that stack when you already know Ruby+Rails. They are veryyy similar and unless your absolutely need some special Python library, it is simply a matter of personal preference.


I agree Python + Django is the closest experience to Ruby on Rails. But yeah if you're already doing rails there is no reason to swap.


I’ve been thinking about this too. React_on_rails makes react really nice with rails for universal rendering.

It seems a pretty great framework similar to rails could be assembled out of typescript, next.js, react, typeorm, webpack, ant design, terraform, postgres, cloudflare workers, cloudflare key value store, rds and by adding model and view generators, plus project and crud scaffolds.


Wouldn't that be Elixir and Phoenix?

Not so popular, but a number of those who have made the switch swear by it.


So no java fans out here? I used Spring Boot in production. It is high performant, super configurable and with lot of community support.


JavaScript/Gatsby




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

Search: