Architect with Separation of Concerns

Architect with Separation of Concerns

When constructing the backend architecture for a system, keep the concerns separated. This is a general principle followed in containerized designs, but holds true down to smaller components. Even if the component isn’t far away and different, keep responsibilities relegated to separate files or directories.

The most important reason to build this way is interoperability and modularity. You can swap things out when necessary. Oftentimes, requirements grow, and a different library might serve further functionality, so you want to replace an old one. Or maybe you upgrade to a paid service that provides better accuracy or features, so you have to support that instead. By building with this in mind, and keeping each library in its own walled silo, you can swap things in and out with more ease. This leads us to the next point of how these separate components should interface.

In many cases, you want a structured interface between major libraries and components. If you have an ETL or data ingestion process, writing out to an intermediate structure is often best. This can be a file, a database, or data stream like kafka. By doing this, results can be captured later if a downstream event fails or corrupts the data. Otherwise, you can communicate data between services and micro components with an API, though without a playback or recording service, this usually loses replayability / traceability. Either way, a well defined type structured data translation layer is often well advised for communication between services. This can take many forms, depending on the technology stack you’re in or the preferred intermediates for the libraries you’re using. Protobuf, JSON, yaml, csv, sql, txt are common formats.


There is a lot to keep in mind designing a backend service. Just one important principle is modularity and separation of concerns. Reach out if you need help architecting your MVP.


Original article posted at https://mvpengineer.com/architect-with-separation-of-concerns

To view or add a comment, sign in

More articles by William Dvorak

  • Chat GPT is a Game Changer

    ChatGPT is getting tons of press. It is well deserved.

  • Cybersecurity Concerns

    We want to provide value to users. We never want to put them in a worse place than they were when they came to us.

  • The Case for Fractional Workers

    The world of work is changing rapidly. We see the major tech companies laying off tens of thousands of overpaid local…

    1 Comment
  • MVPs for Highly Regulated Industries

    A number of industries create unique hurdles for startups and new products. They come in the form of compliance…

  • Two Sided Marketplace MVPs

    A two sided marketplace is a product or website for two distinct demographics that engage in an economy based on their…

  • What is a Fractional CTO?

    At the basic level, it's your Chief Technology Officer who works part time. A fractional CTO can serve many roles and…

    1 Comment
  • Getting Advice on Your MVP

    As an entrepreneur, you're blazing a new path. This is definitional.

  • Limitations of Unit Tests

    Some developers are dogmatic using test driven development (TDD) philosophy. For MVPs, I think this is the wrong…

  • MVPs for Crypto and Bitcoin

    Crypto is a huge topic, and this format is too short to share comprehensive thoughts, but I want to dive into crypto…

  • Artificial Intelligence as a Perfect Solution

    AI methods Artificial Intelligence will solve our problem. Lot's of entrepreneurs have a grand vision of how AI can…

    2 Comments

Others also viewed

Explore content categories