Software engineering
Software engineering principles: modularity, abstraction and separation of concerns
Code can “work”. The problem is time. Many systems become unmanageable because early on the priority was speed-to-demo: logic and UI mixed, cross dependencies, unclear boundaries. After months (or after yet another request) every change feels like a gamble.
Why software engineering principles matter
These principles are not theory: they are the difference between a system that evolves and a system that breaks every time you change a detail.
- Hard-to-change code: you touch one area and bugs chase elsewhere
- Constant bugs: domain rules are scattered and nobody knows where
- Rising timelines: every sprint gets slower because risk grows
- Inability to scale: the team cannot scale (and neither can the product)
Separation of concerns
Separating means stopping doing everything in the same place. UI and logic need clear boundaries: presentation must not decide business rules, and logic should not know HTML or framework details.
Concrete example: a “Timesheet management” page should only collect input and show state. Validation calculations, workflow state and export rules belong in separate services/modules (backend or application layer).
Practical impact: when you change the UI (or add a new interface) you do not rewrite the rules. And bugs become easier to locate.
Modularity
A module should have a precise responsibility and should not know too much about the rest. If every part “knows everything”, changes become expensive.
Example: in an ERP/business system you reason in independent modules such as “user management”, “payments”, “reports”, “warehouse”, “tickets”. Each module exposes interfaces (contracts) and uses only what it needs.
Practical impact: you can replace a module (or expand it) without rewriting the system. Testing also becomes more targeted.
Abstraction
Abstraction keeps you from coupling to details that change. If today you use one provider or export format, tomorrow you may need another. So you introduce stable layers in between.
Example: use interfaces/services to integrate ERP and external systems. The rest of the software calls a stable contract (e.g. “SyncOrders”), without knowing whether underneath there is an HTTP API, an export or a different call.
Practical impact: changing technology does not become a global refactor. You only change the adapter implementation.
Anticipating change
Software always changes. The real question is: “how much does change cost?” You design for future modifications when you define boundaries and contracts, instead of building everything around a “perfect” day-one version.
Example: if you know exports (PDF/Excel) will change with requirements, do not put the logic “in the file generator”. Put rules in an application layer and let rendering change without touching the core.
Practical impact: you reduce regressions and keep timelines predictable. In production you do not “discover” limits: you manage them earlier.
Generality
Generality does not mean building a generic product for everyone. It means avoiding overly specific, rigid solutions: the ones that work only for a single case and then block any evolution.
Example: instead of a flow “timesheet validation only for this case”, define parameterised rules (inputs/criteria) and reusable modules across similar domains.
Practical impact: when the second need arrives, you do not start from scratch. You reuse parts and reduce risk.
Incrementality
Incrementality means building in steps: release value early and grow without tearing things apart. Every increment must stay coherent with the architecture, otherwise the system “rots slowly”.
Example: start from a core (auth, roles, base modules), then add workflows and integrations. Every step is tested and must not break existing contracts.
Practical impact: you reduce risk and make progress visible. Testing stays controllable.
Common mistakes when you ignore these principles
- Monolithic code: everything in the same place, no boundaries
- Cross dependencies: every module “touches” every other
- Changes that break everything: continuous regressions and cascading fixes
- Hard testing: you cannot test without running the whole system
How I apply these principles in my projects
In real projects I apply the principles pragmatically: clear boundaries, modules with responsibility and stable contracts between UI, services and data.
- Flutter with BLoC: I separate logic and UI. The BLoC layer handles state, events and rules; the UI focuses on rendering.
- Node.js APIs: I structure services and contracts. System tests verify flows, not only single endpoints.
- Modular ERPs: modules by domain and workflow, with integrations encapsulated in adapters for ERP/CRM and export.
- Repository pattern: I separate persistence from logic. So I can change storage or export format without rewriting the core.
Conclusion
Software quality depends more on design than on the technology used. You can change frameworks, but if boundaries are clear and principles are respected, the system stays changeable, testable and scalable.
