Home » Why Commit Scope is indispensable
Actueel + +

Why Commit Scope is indispensable

Stephan Wolbers

Almost every Mendix app starts out the same way: small, clear, and well-organized. A few entities, a handful of microflows, and short lines of communication within the team. Mendix feels exactly as it’s meant to: fast, productive, and enjoyable.

The reality of scaling Mendix applications

Success changes that picture. More users mean more requirements. More requirements lead to more functionality, additional entities, and new microflows. Teams grow, and releases come more frequently. What was once compact is slowly evolving into a mature landscape.

So far, nothing out of the ordinary: this is what growth does.

The real problems usually don’t arise during the initial development phase, but afterward. Once the application is live, minor changes become part of regular releases.

Then familiar symptoms start to appear. A commit has unexpected side effects. A validation check is located somewhere other than where you thought it would be. Microflows do just a little more than you intended. And some bugs only show up in production.

These are not exceptions. These are typical consequences of an application that has grown without explicit consideration of responsibilities, transactions, and dependencies. The complexity did not arise suddenly, but crept in gradually.

Commit Scope is our Mendix team’s solution for this very stage of maturity. It’s not designed to slow down Mendix, but to help us maintain control over behavior, data, and quality as we continue to grow.

Why Commit Scope is necessary

Commit Scope was born out of one central question: how do you keep a growing Mendix app manageable without relying solely on discipline and agreements?

As an application matures, these same three quality objectives come under pressure: data integrity, maintainability, and testability. Not as abstract principles, but as concrete challenges in day-to-day development work.

Data integrity is often the first sign that something is amiss. As functionality grows, it becomes less clear which objects belong together functionally. Minor changes in subsequent releases can then lead to unexpected regressions—data that is stored correctly from a technical standpoint but no longer makes sense functionally.

It is precisely these subtle inconsistencies that are treacherous. They often don’t become apparent until later and are difficult to fix.

Maintainability usually follows soon after. Microflows grow alongside the application and take on more responsibilities. Interaction logic, validation, and business rules become intertwined. The code continues to function, but becomes increasingly difficult to read, review, and modify safely.

Testability is rarely separate from these two issues. Implicit commits, hidden validations, and side effects in UI flows make it difficult to set up reliable automated tests. Tests sometimes fail and sometimes don’t, or they fail to cover precisely the scenarios that do go wrong in production.

As a result, trust is shifting back toward manual checks and caution. This slows down further development.

These problems reinforce each other. Each subsequent change becomes more difficult than the last. Before you know it, you’re caught in a self-perpetuating cycle. The only “innovation” is that everything takes longer.

Commit Scope aims to break this cycle by establishing a clear structure for transactions, validation, and responsibilities.

Commit Scope has its roots in the Menditect Testability Framework. It is not a copy, but our interpretation of the idea that quality is a design decision, not a corrective mechanism.

    The three core principles of Commit Scope

    These problems don’t require exotic solutions. Above all, they call for clear-cut decisions. Commit Scope is built around a small number of principles that, together, ensure predictable behavior without limiting Mendix’s flexibility.

    1. Clearly define what goes together

    The first principle is perhaps the most important one: before you commit anything, you must explicitly determine which objects belong together functionally. In other words: the Commit Scope. Not from a technical perspective, but based on the application’s business logic.

    In many applications, this happens implicitly. A microflow affects multiple entities, and commits occur at different times. The interdependencies arise mainly by chance and due to the order in which they occur.

    Commit Scope turns this on its head. You deliberately define which entities together constitute a single, consistent change. You commit them all together.

    By making this connection explicit, you prevent the database from entering a temporarily or permanently invalid state.

    2. Validate before committing

    The second principle follows logically from this. If you know what you’re going to commit together, you should also perform a full validation before anything is written to the database.

    In many Mendix applications, validation has become scattered. Some of it is in the UI, some in microflows, and some in entity events. This works—until it doesn’t. Error messages become unpredictable. Tests must account for hidden rules that only take effect under specific conditions.

    Commit Scope makes validation explicit and deterministic. Everything that must be true for a consistent commit is checked in advance. The database transaction only proceeds once the entire set of objects is valid.

    This provides control over error handling. Validation logic becomes traceable, reusable, and testable.

    3. Separation of responsibilities

    The third principle is the separation of responsibilities. Not as a theoretical exercise, but as a practical means of reducing complexity.

    Commit Scope uses a clear layered structure:

    • Interface logic is responsible for interaction and inputs
    • The process layer orchestrates the use case and determines the commit scope
    • Entity logic includes validations, database transactions, and business rules

    Each layer has its own role. And does as little as possible beyond that.

    Microflows are becoming smaller and more predictable. Logic is becoming reusable. The application isn’t necessarily simpler, but it is more understandable.

    Where the challenges lie

    Commit Scope is a deliberate design choice and, as such, also sets clear boundaries. The pattern explicitly prioritizes predictability, data integrity, and maintainability, not maximum throughput in all situations.

    That choice requires a different way of working. Structure often doesn’t take our need for speed into account. With explicit commit points, centralized validation, and a stricter structure, Commit Scope deviates from standard Mendix patterns.

    That can feel a bit awkward at first. But the inconvenience is even greater when bugs show up in production.

    This means that Commit Scope isn’t always the obvious choice. The pattern is particularly well-suited to business-driven entities and use cases involving clear transactions, where inconsistencies have a direct impact and stability is more important than sheer speed.

    This pattern is less suitable for technical or support entities, such as logging, staging, or derived data, and for high-volume or performance-critical workflows, such as bulk imports or large-scale synchronizations. In these scenarios, the additional structure mainly introduces overhead without providing sufficient added value.

    The crux of the matter is simple. What is considered a feature in business logic namely, explicit validation and verification, actually becomes a drawback in throughput-driven scenarios. Commit Scope is therefore not a dogma, but a tool that must be used thoughtfully and selectively.

    Who is Commit Scope for?

    Commit Scope is not a universal pattern. It is particularly relevant when applications and teams reach a certain scale, often after a few small changes have shown that “small” is a relative term.

    For Mendix developers who want to look beyond “it works for now,” Commit Scope offers a way to systematically manage growing complexity.

    IT project managers gain greater predictability in terms of quality. And they become less reliant on individual knowledge or experience.

    For Product Owners, this means fewer regressions and greater confidence when rolling out new features.

    Commit Scope is particularly useful when stability, maintainability, and predictable behavior become more important than maximum speed for each individual change.

    Conclusion

    Commit Scope isn’t about how you commit, but about when you decide that something is right. And it is precisely that decision that you don’t want to leave to chance.

    The pattern is therefore not an accelerator. It is a stabilizer. And you need it most when the pace picks up, the stakes get higher, and quality can no longer be left to chance.

    Altijd als eerste op de hoogte?
    Volg ons op LinkedIn!

    Lincedin icon

    Mis geen update of event!
    Abonneer je op onze nieuwsbrief en hoor als eerste over onze nieuwste updates, klantverhalen en events.

    Skip form

    Gerelateerde artikelen