Skip to content
Sander Hoogendoorn edited this page Dec 29, 2020 · 6 revisions

The easy framework is a straightforward library for building domain-driven microservice architectures, implementing a simple evolutionary architecture. This library is distilled from projects where the teams I've worked with built platforms based on a simple, common architecture where each service centers around a small part of the platform domain.

This library will include best and foremost simple practices to support building microservices, based on the following software architecture and patterns:

Architecture

Microservices built with easy have a four-layered architecture: services, process, domain, data. Each of the layers serves a single purpose and follows clear patterns and communications.

Data

It is the responsibility of the classes in the data layer to fetch and deliver data from outside the microservices. This data can come from e.g. a file system, relational and other types of databases (we prefer document databases), or from other services on your domain, or from services outside your domain. Classes performing this function are called gateways.

Domain

In the domain layer, there are supertypes to model the domain, such as entities, records, value objects, and enumerations. The domain layer also knows the repository layer supertype, for handling instances of entities and structs.

See Domain

Process

The process layer contains use cases, that model your process.

Services

The services layer has resource as the layer supertype, to model the API exposed.

Utilities

Additionally, this library contains utility classes for standardizing e.g. URI's, and ids, constructors, lists, queries, and errors. Quite often these are constructed as monads, which renders robust code.

This library will contain a simple validation mechanism, using decorators.

We keep this library simple on purpose, extending it using additional libraries and frameworks should be possible simply by embedding their API's.

Likely we will use jest for unit testing, wrap axios for request handling, and a simple MongoDB connector, and wrap tsyringe for dependency injection.

Please note: we are slowly adding more value to the library, step by step. Most of our additions are useful as such, both it will take some effort for the full architecture to be in place to implement fully working microservices. Please bear with us.

Clone this wiki locally