← Back to context

Comment by pclowes

2 hours ago

Thank you for the thorough reply!

A long time ago I had a "Component Based Rails Application (CBRA)" using engines as the domain boundary. It was unpleasant because it just moved pain points into unfamiliar places. The slices approach is very interesting.

Overall I like dry-rb.

If I find myself on a ruby project again I will investigate more thoroughly!

Taking a workshop at Rocky Mountain Ruby on "Component Based Rails Applications" with Stephan Hagemann (the author of that book) was my introduction to all of this stuff! I found Hanami (then called Lotus) shortly after and I never looked back.

I tried out Rails Engines on a couple projects, with such high hopes and ran into issue after issue. Sure it's theoretically possible to build whatever you want with Rails, but in practice it's infeasible. Some people have experimented with arbitrarily nesting Hanami slices too and had success. It's not something we're focusing efforts on because it's rather niche and get inherently complicated but it's possible.

Modularity is such an important part of large software projects and Rails doesn't give you any tools for it (and Ruby doesn't help either). Packwerk was an attempt to constraint Rails, with limited success: https://shopify.engineering/a-packwerk-retrospective.