Live data from Hacker News

Choosing Ruby on Rails for web development project in 2019

ideamotive.co

161–170 of 216 posts

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

#161
Threads like these are really interesting to me.

Our fascination with which language /framework is the best, most performant, whilst understandable (we are all attracted to shiny technology) misses an important point.

Engineering is all about trade offs and there are plenty of technologies that are comparable nowadays.

I think it's more a matter of picking something that makes sense for you and your team as well as the particular problem you are tackling and sticking with it than engaging in a holy war.

For example if you need great concurrency support.. perhaps you are better off with elixir if you need heavy computations.. go for python if you need safety, then perhaps look at go or rust

Rails really optimizes for developer happiness, comes with a huge ecosystem and is mature enough that can be called a boring, stable technology to build on. That being said, it certainly isn't the right choice for everything.

Disclaimer: I mainly use ruby on a day to day basis but also love elixir, python and even go.

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

#162
post #43

Earlier quoted context omitted.

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 hadn't done rails in a while when I brushed up on it, and found Turbolinks to be a game changing addition. SPA's just require way too much work and fine-grained detail for starter applications. I would not recommend to do full-stack node over rails if you care about iteration speed early on.

[deleted]

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

#163
post #147

Earlier quoted context omitted.

How?

Service Oriented Monolith. I.e. you can organise a monolith in pretty much the same way you would organise a micro service architecture.

"Service Oriented Monolith", I'm loving it ! ;)

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

#164

Earlier quoted context omitted.

How?

If you push to keep your code organized into modules with simple function APIs, and make sure that code outside your modules doesn't use the package internals directly, then your function APIs can be easily extracted into a REST/gRPC call, and the only thing that changes (to the first approximation) is your internal service (function) calls become external service (api) calls. Obviously you now need to add an API cli…

I've been there. This only seems to 'work'--until you try to raise throughput/reliability and lower errors/latency. What ends up happening is that the module boundaries that made sense in a monolith don't make sense as microservices when communications are allowed to fail. Typically the modules are the source-of-truth for some concern with consumers layered above it. This is the worst pattern with microservices where a synchronous request has to go through several layers to a bottom-level service. With microservices you want to serve requests from self-contained slices of information that are updated asynchronously. The boundaries are then not central models but rather one part of a workflow.

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

#165

Earlier quoted context omitted.

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?

https://medium.com/@dan_manges/the-modular-monolith-rails-ar...

His talk was pretty cool and helpful if you want to split monolith!

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

#166

Earlier quoted context omitted.

I agree! SQL-avoidant developers are something we actively try to screen out in our interviews. (Being too gung-ho about using raw SQL -- something I've been accused of --is bad too, but at least it's not a path of willful ignorance) Granted [SQL's] syntax is absolutely awful, but it is a very useful and powerful language. The concepts behind relational databases are embraced by SQL in ways that I can't imagine in an…

I probably shouldn't have said the syntax is awful because as you say, I've never seen anything better. But I just think that SQL is this nice composable structure but it seems needlessly awkward to write from my naive point of view. I keep thinking that something more lisp-like would be nicer, but perhaps it wouldn't work. Maybe it's something I can try as an experiment some day :-)

You'll be a hero to millions!

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

#167

Earlier quoted context omitted.

From what I've seen of Sequel is looks awesome and I've been dying for an excuse to use it. found [ActiveRecord] to be severely limited in working with complex queries which use many JOIN statement and sub-queries I'd humbly suggest that this is not a flaw of ActiveRecord whatsoever! I think this is AR working exactly as designed. I would certainly agree that SQL > AR once your queries grow past a certain (fairly low…

Yes, I agree. For simple to low complexity queries AR is hard to beat, especially if your SQL knowledge is limited, and it allows for arbitrary SQL statements as string arguments. My biggest issue with AR is that the arbitrary SQL cannot be combined or reused in a way which leads to compositional queries. An example would be to break up a large SQL statement into several smaller statements and then recombine them in…

Yeah I think the easy composability of AR is probably its biggest asset.

As another commenter noted, yes you can do composable AR/Arel with raw SQL.... but like you said, it does get hairy pretty fast.

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

#168
post #127
post #107

Earlier quoted context omitted.

1. You can find a RoR developer.

Or not! Here in Toronto we've had a req open for a senior Ruby dev since like last October. We're seriously debating switching over to something else for no reason other than lack of available Ruby talent. Relatively view new devs are picking up Ruby nowadays. Job posting is here if anyone's interested --> https://angel.co/company/akira-2/jobs/106786-sr-full-stack-r...

[deleted]

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

#169

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've seriously seen people who have difficulty understanding a for loop that know how to use react at a basic level. Is that really what you want? That sounds like a ticket for short-term gains and long-term pains.

I would think understanding declarative code like React is much easier for beginners than procedural code like loops and switches. For example, tons of analysts and other business people can pick up SQL for reporting, but would have a lot of trouble writing code.

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

#170

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.

I think the advantage of type systems isn't something trivial like ensuring a function receives an integer instead of a string. It's that (in powerful type systems) you can encode your own domain constructs into types, which reduces cognitive overhead.
Post reply on HN