News for hackers. Stuff that matters.
Re:Choosing Ruby on Rails for web development project in 2019 by llamataboot on Wednesday May 29, 2019 @10:20AM (#20040481)
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. Similarly, I'm much more likely to see people choosing NOT to use JS frameworks these days than use them.

Re:Choosing Ruby on Rails for web development project in 2019 by mipmap04 on Wednesday May 29, 2019 @10:33AM (#20040643)
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.
Re:Choosing Ruby on Rails for web development project in 2019 by diveanon on Thursday May 30, 2019 @09:22AM (#20050852)
This is the approach we used at a certain budget shaving startup and it worked very well.

The boosts to dev speed from a monolith / monorepo over a more "scalable" approach are huge and allow you to focus on business problems instead of self imposed tech challenges.

Re:Choosing Ruby on Rails for web development project in 2019 by 87zuhjkas on Wednesday May 29, 2019 @10:50AM (#20040843)
How?
Re:Choosing Ruby on Rails for web development project in 2019 by theptip on Wednesday May 29, 2019 @12:03PM (#20041823)
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 client layer but in terms of code organization, if your packages are cleanly separated then you've done a lot of the work already. (Transactions being the obvious piece that you'll often have to rethink when crossing a service boundary).

The advantage of this approach is that it's much easier to refactor your internal "services" when they are just packages, than it is to refactor microservices after you've extracted them and set them free (since upgrading microservice APIs requires more coordination and you can't upgrade clients and servers all in one go, as you often can inside the same codebase).

Re:Choosing Ruby on Rails for web development project in 2019 by karmakaze on Wednesday May 29, 2019 @04:10PM (#20044807)
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 by diveanon on Thursday May 30, 2019 @09:26AM (#20050878)
Or you can do poor man's microservices and use the same monolith with different production flags to load balance it.

Keep all your code in one repo, deploy that codebase to multiple servers, but have it acting in different capacities.

1 email server, 5 app servers dishing out html, 2 api servers

Etc

It works very well and was able to handle spikes of traffic during super bowl ads without any problems.

Re:Choosing Ruby on Rails for web development project in 2019 by bitterchicken on Thursday May 30, 2019 @11:30AM (#20052215)
This is the biggest favor you can do for yourself. The developer experience is as easy as production without descending into container induced madness.
Re:Choosing Ruby on Rails for web development project in 2019 by diveanon on Thursday May 30, 2019 @11:39AM (#20052308)
Testing is a breeze too because you are using the same tools across the board.

I don't know why it fell out of fashion, but for your average web app it is the gold standard imo.

Re:Choosing Ruby on Rails for web development project in 2019 by mipmap04 on Wednesday May 29, 2019 @12:19PM (#20042072)
This is exactly it.
Re:Choosing Ruby on Rails for web development project in 2019 by shijie on Wednesday May 29, 2019 @11:23AM (#20041222)
Elixir and Phoenix. The contexts pattern used in Phoenix is the most modular, easily microserviced way of structuring apps I’ve ever used. I slapped myself on the forehead when I first saw it. Duh. It’s really fantastic. Highly recommend
Re:Choosing Ruby on Rails for web development project in 2019 by bschwindHN on Wednesday May 29, 2019 @11:45AM (#20041515)
Do you have a good reference link to learn more about what you're talking about?
Re:Choosing Ruby on Rails for web development project in 2019 by pdimitar on Wednesday May 29, 2019 @12:38PM (#20042331)
Re:Choosing Ruby on Rails for web development project in 2019 by pan69 on Wednesday May 29, 2019 @01:13PM (#20042758)
Service Oriented Monolith. I.e. you can organise a monolith in pretty much the same way you would organise a micro service architecture.
Re:Choosing Ruby on Rails for web development project in 2019 by maitredusoi on Wednesday May 29, 2019 @04:07PM (#20044772)
"Service Oriented Monolith", I'm loving it ! ;)
Re:Choosing Ruby on Rails for web development project in 2019 by diveanon on Thursday May 30, 2019 @09:32AM (#20050917)
Bingo.

A properly organized codebase scales very well when partitioned into services.

It is my default approach for all new projects for the last 10 years or so.

Re:Choosing Ruby on Rails for web development project in 2019 by xjlin0 on Wednesday May 29, 2019 @04:17PM (#20044883)
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 by fouc on Wednesday May 29, 2019 @10:44AM (#20040768)
Vue.js seems to be particularly popular with the Ruby/Rails and PHP/Laravel crowd. I'm guessing it has to do with the SSR integration with the framework's views.
Re:Choosing Ruby on Rails for web development project in 2019 by madlynormal on Wednesday May 29, 2019 @11:27AM (#20041284)
Similar experience at the company I work for, though we're mostly using Angular for FE.