> Markdown version of [/videos/987-modulith-instead-of-monolith-pragmatically-towards-microservices](https://www.wearedevelopers.com/videos/987-modulith-instead-of-monolith-pragmatically-towards-microservices). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Modulith Instead of Monolith - Pragmatically Towards Microservices Refactoring a 20-year-old codebase for multimillion-euro hardware demands precision. Discover how one team tamed their tangled C# legacy by shifting to a modular monolith instead of microservices. - **Speakers:** [Hendrik Lösch](https://www.wearedevelopers.com/@hendrik-losch) - **Event:** World Congress 2024 - **Published:** August 20, 2024 - **Duration:** 30:12 - **URL:** https://www.wearedevelopers.com/videos/987-modulith-instead-of-monolith-pragmatically-towards-microservices ## Summary Refactoring a 20-year-old codebase controlling multimillion-euro semiconductor manufacturing hardware requires precision and pragmatism. Facing a tangled web of C# WinForms clients and legacy backends, the engineering team embarked on a multi-year restructuring effort into a modular monolith rather than microservices, recognizing that distributed network calls would overwhelm embedded hardware limits and complicate their unified installer deployment model. The transition relied heavily on product line software engineering and domain-driven design to identify core bounded contexts like machine handling and image repair. To maintain continuous delivery and secure management funding over a lengthy migration, the entire legacy monolithic application was originally encapsulated as a single pluggable module on a new Prism framework foundation. A strict dependency architecture drove the progressive module extraction: legacy code was allowed to call newly isolated modules, but new framework code was completely barred from referencing back to legacy pathways. By utilizing abstract domain models and a central bootstrapping core to load specific system configurations based on client needs, the team transformed a fragile codebase into flexible, interchangeable components capable of safely managing hardware variations from different external vendors. **Keywords:** modular monolith architecture, legacy codebase refactoring, product line software engineering, domain-driven design, bounded context isolation, hardware integration control, embedded systems optimization, c# winforms migration, legacy module encapsulation, prism framework implementation, hardware variability management, dependency flow rules, in-process message bus, runtime bootstrapping configurations, deployment monolith strategies ## Chapters 1. **Refactoring a legacy monolith inside semiconductor manufacturing hardware** (01:00) — Context on upgrading a 20-year-old application controlling complex manufacturing machines without interrupting customer value. 1. **Technical debt and tangled architecture of the legacy monolith** (02:30) — An exploration of the unscalable architecture, entangled code base, and business constraints that make rewriting impossible. 1. **Identifying bounded contexts using domain-driven design principles** (06:12) — Breaking up the application by analyzing underlying business domains before touching the technical layers. 1. **Why microservices fail in resource-constrained hardware environments** (08:10) — Retaining a monolithic structure optimizes resource utilization, consistency, and debuggability on fixed hardware platforms. 1. **Defining the modulith approach for single deployment units** (10:28) — Moving toward a modular development model while deploying an optimized single-process monolithic application. 1. **Structuring modules around public interfaces and startup kernels** (13:45) — Encapsulating functionality into easily replaceable interface libraries integrated by a localized startup kernel. 1. **Managing hardware variations using product line software engineering** (17:36) — Controlling the complexity of different machine generations and vendor hardware by leveraging targeted software permutations. 1. **Implementing layered module architectures with foundation platforms** (20:52) — Organizing assets, features, and external integrations over a shared infrastructure framework that multiple teams consume. 1. **Extracting modules safely to restructure the legacy codebase** (26:42) — Encapsulating the old application as the first module and iteratively isolating domains without using legacy code. ## Related Moments - [The challenge of preventing modular monoliths from degrading](https://www.wearedevelopers.com/videos/100325-building-moduliths-that-last-patterns-for-sustainable-module-integration) (from "Building Moduliths That Last: Patterns for Sustainable Module Integration") - [Restructuring the monolith using domain-driven design](https://www.wearedevelopers.com/videos/1206-single-server-global-reach-running-a-worldwide-marketplace-on-bare-metal-in-a-cloud-dominated-world) (from "Single Server, Global Reach: Running a Worldwide Marketplace on Bare Metal in a Cloud-Dominated World") - [Rejecting unnecessary industry buzzwords and binary architectural thinking](https://www.wearedevelopers.com/videos/1827-mastering-modern-architecture-oliver-sturm) (from "Mastering Modern Architecture - Oliver Sturm") - [Prioritizing modularity over the monolith versus microservices debate](https://www.wearedevelopers.com/videos/164-monoliths-a-love-story) (from "Monoliths: A love story") - [Modernizing legacy applications through proactive leadership](https://www.wearedevelopers.com/videos/1223-coffee-with-developers-babette-wagner) (from "Coffee with Developers - Babette Wagner") - [Transforming to a cloud-native modular application architecture](https://www.wearedevelopers.com/videos/1444-crew-management-system-for-airlines-plan-duties-for-pilots-flight-attendants-worldwide) (from "Crew Management System for Airlines: Plan duties for pilots & flight attendants worldwide") ## Related Articles - [How to Avoid Over-Engineering](https://www.wearedevelopers.com/magazine/546-how-to-avoid-over-engineering) - [Why You Shouldn’t Build a Microservice Architecture](https://www.wearedevelopers.com/magazine/118-why-you-shouldn-t-build-a-microservice-architecture) - [Now is the time for industrialized software development](https://www.wearedevelopers.com/magazine/601-now-is-the-time-for-industrialized-software-development) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) ## Related Jobs - [Senior Architect Realtime Bare-Metal Software](https://www.wearedevelopers.com/jobs/ext/381559-senior-architect-realtime-bare-metal-software) at **ZEISS Group** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1597388-machine-learning-engineer) at **ZEISS Group** - [Senior Engineer, Infrastructure Platform](https://www.wearedevelopers.com/jobs/ext/328836-senior-engineer-infrastructure-platform) at **Intercom, Inc.** - [Senior Backend Developer — AI: MCP & Agent Engine](https://www.wearedevelopers.com/jobs/48297-senior-backend-developer-ai-mcp-agent-engine) at **basebox GmbH** - [Senior Developer Bare-Metal and Realtime Software](https://www.wearedevelopers.com/jobs/ext/380849-senior-developer-bare-metal-and-realtime-software) at **ZEISS Group** - [Backend Entwickler C#/.NET iv.)](https://www.wearedevelopers.com/jobs/ext/1262419-backend-entwickler-c-net-iv) at **Bosch-Gruppe Österreich**