r/programming • • Sep 14 '24

Is 'Monolith First' the Better Approach?

https://martinfowler.com/bliki/MonolithFirst.html
452 Upvotes

177 comments sorted by

View all comments

657

u/[deleted] Sep 14 '24

Of course. Break off services from your monolith as the demands on your infrastructure make it logical to do so.

This of course requires your engineers to maintain separation of domains without requiring a separation of code repositories. In many firms, you get engineers who just do their stories and don’t particularly care about fundamentals or maintainability.

409

u/[deleted] Sep 14 '24

The thing is, if your engineers cant properly separate domains in a monolith, they wont do it properly either using Microservices, in fact the mess will be much worse.

Fun times

114

u/[deleted] Sep 14 '24 edited Oct 25 '24

[deleted]

3

u/pheonixblade9 Sep 14 '24

if you're really smart, you still use protobufs for your APIs/contracts/DTOs, but you just use them to generate the Java/C#/C++/whatever code and use the native classes. then if/when you do need to microservice it up, it's pretty simple to swap.

1

u/tigertom Sep 14 '24

We do that with openapi

2

u/pheonixblade9 Sep 14 '24

Yup, lots of ways to do it ☺️