Lesson Description
The "Problems with Monoliths" Lesson is part of the full, Enterprise UI Development: Microfrontends, Testing, & Code Quality course featured in this preview video. Here's what you'd learn in this lesson:
Steve highlights when to switch from a monolithic codebase to other architectures, focusing on challenges like team collisions, merge conflicts, and long CI/CD times. He cautions that more autonomy can lead to more complexity and potential issues. He also notes that the right solution often involves a mix of approaches tailored to the team's needs.
Transcript from the "Problems with Monoliths" Lesson
[00:00:00]
>> Steve Kinney: And so where you should switch from the monolith is when the pain starts getting real, right? And some of this is a technology problem, and some of this is like, if you have, for instance, two teams from two completely different parts of the organization with two sets of bosses, with two sets of timelines, right? Whether you think something is technologically the right choice probably doesn't matter.
[00:00:28]
And so if you come to a thing where multiple teams are editing the same files, right, like everything is a merge conflict nightmare, so on and so forth, it's time to start thinking about like, well, how do I solve that problem? The other one that will get you is as the sheer size of a codebase grows, right? You know, the bad side of a good problem is we have so many tests that now CI/CD takes 25 minutes to run, right?
[00:01:03]
Now, we should argue that the problem is really you wanted that dopamine hit of watching CI turn green so you can merge in your PR, but like, you know, that is the thing. If the feedback loop for is something good enough to go to production 2 hours, then the number of decisions you can make to fix that begins to drop precipitously, right? And we'll see when we get to stuff like Turbo Repo and some of the other things like that, that you can have one repo and also solve for the build times, right?
[00:01:38]
I would argue that the team collisions, you're just going to move the problem around. If there's a bunch of shared code, you're going to probably move that to its own micro front-end service or package anyway, right? Like, is your code base organized correctly to begin with, but, you know, everything matters, right? Even on projects I work on by myself, there's times where it's like, I almost just want to section things off so I can, especially again to our question about using AI tools and stuff along those lines, like, sometimes breaking stuff apart is nice because our little friend who likes to go on side quests can be constrained a little bit to just the area you want them to work on before they start jumping several directories over to refactor the sign-in page.
[00:02:23]
You're like, I just needed to update the privacy policy. So yeah, those all become different parts and that's where we start to look at some of the different tools. And again, nothing is concrete and everything's along a set of squishy boundaries. And so we talked about the monolith. Let's talk about our time together today, which is, this is my spectrum when I said that nothing's on the spectrum of simplicity to autonomy.
[00:02:54]
So as you go from the monolith all the way to Runtime front ends, you get more and more team autonomy, right? If you're just the team that's shipping, I always hear these examples of like the team just working on the side nav. Has anyone ever seen a team that just works on the side nav? Right, I've never seen that before in my life, but that's always the diagram you see in the blog posts about these things and the team that just works on the top nav.
[00:03:22]
I'm like, can I join that team? That seems great. Until you have to make it responsive, right? But as you move to the micro front ends around it, you get more autonomy, you get more complexity, right? There's more things that can go wrong, there's more things you have to juggle, and so where everything happens happens somewhere along, you know, like everything's got flavors of everything, but generally speaking, the themes go along the spectrum.
[00:03:46]
And so we talked about the monolith because there's not a lot to talk about, it's just the default. If you make no decision, you have a monolith. Right, great, we've covered how to do a monolith. Just don't choose to do anything. Done. We're going to jump all the way over to Runtime micro front ends with our friend module federation and all of those things, the most autonomous, most complex set of things, and then we'll take steps backwards and kind of simplify a little bit along the way and kind of see the different flavors.
Learn Straight from the Experts Who Shape the Modern Web
- 250+In-depth Courses
- Industry Leading Experts
- 24Learning Paths
- Live Interactive Workshops