Live data from Hacker News

Choosing Ruby on Rails for web development project in 2019

ideamotive.co

71–80 of 216 posts

Re: Choosing Ruby on Rails for web development project in 2019

#71

Ruby/Rails backend with a React FE seems to be pretty popular these days, and is where I spend most of my time, but honestly I'd rather go back to Rails views with Stimulus for some of the components that need it. 3 years ago we were breaking monoliths into microservices, now it seems that we overshot that, and I'm much more likely to see people sticking with one main monolith, and maybe one or two other services. Si…

I've taken the approach of building the monolith first with an architecture that allows me to easily pull parts of it out into services when I hit constraints and need that scalability.

How?

Re: Choosing Ruby on Rails for web development project in 2019

#72
post #25

Earlier quoted context omitted.

And yet, when I think of gitlab I think of the insane resources it consumes and the slowness of the system even when you overprovision by a factor of 2 on cpu. Not saying I dislike gitlab, I actually really like it and we use the on-prem gold edition licensed to 6k seats. (as in, I put my money where my mouth is when I say I like it) But of the things people complain about regarding rails that's that it's: large, hea…

I believe github onprem gets around the speed by using jruby? I’m sure that could be done with GitLab as well.

I have my doubts. From my experience, JRuby is generally slower. Source: used it in production at a billion dollar company, benchmarked it personally on individual items, contacted core devs when it was slower for advice.

Re: Choosing Ruby on Rails for web development project in 2019

#73
post #43

Among my peers (undergrads in college) Rails has largely lost mindshare to python and Node (and even PHP!). At the 3 hackathons I went to this semester I could not find a single other person who knew Rails (so I always have to switch to node or python). If you take a look at devpost, Rails is increasingly losing popularity: https://devpost.com/software/built-with/ruby-on-rails My plea to the Rails community and Rails…

I would say that Rails has fully embraced SPAs as an option. With Webpacker you can have React or Vue installed by default. That being said, at one point we decided to start using React to handle the front end of our Rails app and it has become a huge regret. Recently we decided to switch back to using Rails + Turbolinks + Stimulus.js and the development speed and experience have been so much better. It's dishearteni…

I did Rails + Mithril.js (5kb react-like SPA) and then switched to Rails + Turbolinks + a mix of vanilla js, stimulus.js, and abusing ajax & js.erb.

The biggest things I miss from the original setup:

1) it's easy to write integration tests when rails is nothing but an api

2) components. it's just way easier & nicer to work with than rails views/partials.

I thought rails + turbolinks + stimulus etc would be simpler in terms of code/maintainability, but I'm not so sure anymore.

Re: Choosing Ruby on Rails for web development project in 2019

#74

Earlier quoted context omitted.

Yeah, rails does look out of style. But node backend development is unpleasant (at least compared to rails).

Agreed - its just interesting to see the next generation of talent completely ignoring a major platform in current tech industry.

To be fair, Java/python people probably said the same things to the upcoming rails people at some point.

Re: Choosing Ruby on Rails for web development project in 2019

#75
post #11
post #3

The beauty of rails is how simple and quick it is to get a robust (if bare) application up and running. Even if you use sinatra or padrino instead, the wealth of the web community built around ruby still makes it rather easy. If I were a tech lead and had to make a choice now, in 2019, I would still (probably) choose rails-api for a backend with some separate frontend. I've been slowly working on a backend for a web…

> I've been slowly working on a backend for a web app in Rust I'm interested in why you made the choice to use Rust for a web app? It feels like you love a good challenge, but there are obviously technical constraints for some apps. I look around and wonder if the options have really changed a whole lot since 2006? If you need productivity, choose Ruby or Python (or maybe JS.) Java and .NET exist if you have more exa…

Or if you want productivity and a performant web server, try Elixir + Phoenix.

Number crunching still has to be dished off to something else like C, Rust or Go, though.

Re: Choosing Ruby on Rails for web development project in 2019

#76

Rails is ideal for the "Get Shit Done" approach to development. However, Ruby's type system does not provide many assurances, making mature codebases harder to maintain, refactor, and extend (as compared to codebases in, say, well-written Java). I am surprised this was not listed as one of the criticisms. Sorbet, a type checker for Ruby, stands to make this criticism less valid: https://sorbet.org/

I have to be honest, I don't understand why people care so much about typed languages. I almost never face type related issues, and when they occur they are the easiest to catch.

How many team members contribute to your codebase? I've personally found that I need it less when it's just me committing code, but need it at my large company when traversing unknown codebases.

Re: Choosing Ruby on Rails for web development project in 2019

#77

Devise[1] alone makes it worth using rails for many webapps. Throw in things like simple form[2] and will paginate[3] and it's incredible how much you can get done cleanly and quickly. Using something like intercooler.js, you can build a solid modern web app in a fraction of the complexity of most systems today. 1 - https://github.com/plataformatec/devise 2 - https://github.com/plataformatec/simple_form 3 - https://g…

intercooler over turbolinks? or together? not quite sure what intercooler really brings

Re: Choosing Ruby on Rails for web development project in 2019

#78
post #40

Among my peers (undergrads in college) Rails has largely lost mindshare to python and Node (and even PHP!). At the 3 hackathons I went to this semester I could not find a single other person who knew Rails (so I always have to switch to node or python). If you take a look at devpost, Rails is increasingly losing popularity: https://devpost.com/software/built-with/ruby-on-rails My plea to the Rails community and Rails…

I’m surprised it’s Python/Node taking that mindshare. From my perspective (fintech industry), it looked like 100% of the decreasing usage of Rails by other fintech startups have been due to choosing Elixir’s Phoenix framework instead.

Can you cite some examples?

Re: Choosing Ruby on Rails for web development project in 2019

#79

Earlier quoted context omitted.

Just a disclaimer, I work with Rails every day, but I don't really like it all that much and I really don't like ActiveRecord. We have Rails legacy apps and I maintain one of them. I'd still use Rails for some things, but it I'm pretty picky about what I think it's good for. Having said that, it makes me a bit sad that there are quite a few developers who actively avoid SQL. Granted the syntax is absolutely awful, bu…

As a counterpoint, I love ActiveRecord. It's a Swiss Army knife that's got pretty much everything you need, you just need to find the right tool and use it. What ActiveRecord isn't is discoverable . Which is to an extent understandable. Its domain is literally anything you could express in SQL. But you really can do anything you want with it, you just have to find the right abstraction. A tool I use a lot is to .to_s…

Long ago I liked ActiveRecord(AR), then I worked at a company that did large aggregations in SQL and found it to be severely limited in working with complex queries which use many JOIN statement and sub-queries. During that time I came to enjoy working with the Sequel[0] gem, and its fantastic documentation. Now, after working with Ecto[1] in Elixir, I've found that the ROM[2] builder pattern is a better approach to abstracting SQL and mapping the results to Ruby objects. It's much cleaner and more maintainable than a long mess of AR queries.

Ryan Bigg wrote a great book about breaking away from AR in Rails called Exploding Rails[3]. It's a good read.

[0] http://sequel.jeremyevans.net/

[1] https://github.com/elixir-ecto/ecto

[2] https://rom-rb.org/5.0/learn/introduction/active-record/

[3] https://leanpub.com/explodingrails

Re: Choosing Ruby on Rails for web development project in 2019

#80

Earlier quoted context omitted.

Python3+ and PHP7+ are faster than Ruby though. Maybe they were comparing modern ruby to 10 year old PHP/Python?

Faster based on what benchmark?

PHP vs Ruby https://benchmarksgame-team.pages.debian.net/benchmarksgame/... Python vs Ruby (mixed results) https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Post reply on HN