Code Maat is a small system with a simple architecture. More elaborate architectures require more sophisticated transformation specifications:
Don’t specify all components. For example, ignore small utility components.
Differentiate how the code is laid out in the file system against its logical structure. Your analysis transformations don’t have to mirror the code structure the transformations operate on.
Use beauty as a guide. You know how you want the ideal system to look. Now think of all the ugly ways those expectations could be broken. In particular, look for beauty breakers that would be expensive.
Let’s see it in practice on a large system.
Our next case study uses nopCommerce.[28] nopCommerce is an open-source product used to build e-commerce sites. It’s a competent piece of code consisting of 200,000 lines of C# and JavaScript together with a bunch of SQL scripts and CSS files—a perfect opportunity to see how the analysis method works across multiple languages.
The first step is to identify the architectural principles of the system. nopCommerce is a web application built around the Model-View-Controller pattern.

Model-View-Controller (MVC) is a pattern for implementing user-interface applications. Like all patterns, each implementation looks different.
One variation is to introduce a service layer encapsulating the business logic and have the Controller delegate to that layer. This is how it’s done in nopCommerce. Often, additional layers, such as data access, follow.
There’s a simple idea behind all those layers. That idea is to separate concerns. In theory, that allows us to change our mind and swap a layer for one with another implementation. This potential flexibility comes at a price.
In practice, layered architectures rarely deliver upon their promise. Instead, you’ll often find that each modification you make to the code ripples through multiple layers. Such modification patterns are an indication that the layers aren’t worth the price you pay. Perhaps they even make your code harder to change. Let’s see whether that’s the case.
