API Design

Conciseness: When designing an API, you should minimize the set of methods, requests, objects, and resources exposed by the API. Unnecessary complexity makes the API difficult to understand and maintain. Consistency: The object hierarchy and queries should be logically related and intuitive to API users. The names of objects and methods should correspond to their purpose. Names for the same objects and parameters must be consistent across all API methods. ...

2023-01-04 · 1 min · 104 words · Andrey

Versioning

Accurate versioning is crucial for: Ensuring compatibility and traceability of new features in the application and API. Documenting functionality with reference to the specific version in which capabilities appeared. Designating the current status of software product readiness (pre-release, alpha, beta). Planning new functionality (roadmap). Version Number A version typically consists of several numbers separated by dots. The most common format is X.Y.Z (Major.Minor.Patch). Rules: Major: Incremented for incompatible API changes. Minor: Incremented for adding functionality in a backward-compatible manner. Patch: Incremented for backward-compatible bug fixes. Semantic Versioning It is recommended to follow the rules of Semantic Versioning (SemVer) when numbering versions. ...

2022-09-18 · 2 min · 223 words · Andrey

Layers in Software Design

Separation of concerns is one of the most important principles in software design. A common way to adhere to this principle is to divide the application code into several levels of abstraction or layers, each performing a strictly defined function. Infrastructure Layer The Infrastructure Layer is the outer layer that handles all interactions between the application and the outside world. It includes all code that works with external dependencies, such as databases, third-party services, API controllers, etc. It contains implementations of entity repositories, adapters for message queues and external systems, and libraries for network operations, file access, and even system timers. ORMs and similar tools are encapsulated here. ...

2022-08-27 · 2 min · 261 words · Andrey

An Advanced Approach to Software Architecture

The Control Code project aims to propose an advanced approach to software architecture that offers many benefits and is fairly easy to implement. It also provides an application framework with a fast-start application template, a set of modules with standard features, an extensible design, and flexible user configuration capabilities. The framework is based on the most reliable software development patterns: Transaction Script and Domain-Driven Design (DDD). It uses an extensible layered application design and facilitates further application evolution. ...

2022-04-03 · 3 min · 443 words · Andrey

Namespaces

DDD and Microservices Namespace Naming Conventions Building software systems using microservices and Domain-Driven Design (DDD) reduces overall complexity and simplifies development by dividing a complex system into separate, smaller subsystems (called bounded contexts in DDD). To simplify implementation, we propose the following namespace naming conventions for .NET microservices. Namespace Templates System: Short name of the software system. Context: Name of the bounded context (subsystem). Domain Layer Namespace Description {System}.[Context].Domain Domain entities and value objects Application Layer Namespace Description {System}.[Context].Contracts Service interfaces, other interfaces, and data contracts {System}.[Context].Services Service implementations {System}.[Context].UnitTests Entity and service unit tests Infrastructure Layer Namespace Description {System}.[Context].AdaptersImpl Implementation of adapters {System}.Host.Controllers API controllers {System}.Host Application host (includes services, adapters, and controllers) {System}.Tests Integration and component tests Adapter Suffixes Repository Adapter Gateway Provider Store Db

2022-04-03 · 1 min · 127 words · Andrey