Bonyan.IdentityManagement.Domain
1.2.0
See the version list below for details.
dotnet add package Bonyan.IdentityManagement.Domain --version 1.2.0
NuGet\Install-Package Bonyan.IdentityManagement.Domain -Version 1.2.0
<PackageReference Include="Bonyan.IdentityManagement.Domain" Version="1.2.0" />
paket add Bonyan.IdentityManagement.Domain --version 1.2.0
#r "nuget: Bonyan.IdentityManagement.Domain, 1.2.0"
// Install Bonyan.IdentityManagement.Domain as a Cake Addin #addin nuget:?package=Bonyan.IdentityManagement.Domain&version=1.2.0 // Install Bonyan.IdentityManagement.Domain as a Cake Tool #tool nuget:?package=Bonyan.IdentityManagement.Domain&version=1.2.0
Bonyan Modular Monolithic Library
Purpose
The Bonyan Library is designed to facilitate the development of modular monolithic architectures in .NET Core projects. It provides a foundation for creating systems that are both easy to maintain and scalable, allowing developers to enjoy the benefits of modularity without the complexity of distributed microservices.
The primary purpose of this library is to solve the common challenges developers face when trying to create a monolithic codebase that remains modular, maintainable, and adaptable as the project grows.
Getting Started
For a detailed guide on getting started with the Bonyan Library, including installation and initial configuration steps, please visit the Getting Started page.
What is a Modular Project?
A modular project is an approach to building software where the system is divided into distinct, loosely-coupled units called modules. Each module encapsulates a specific set of functionalities, with clear boundaries and dependencies. This kind of structure helps improve separation of concerns, making the codebase easier to navigate and maintain.
In a modular monolithic architecture, all modules are part of the same deployable unit (the monolith). Despite being part of a single application, each module is designed to be independent and reusable, promoting a clean separation of responsibilities.
Challenges with Traditional Monolithic Architectures
Traditional monolithic architectures often start simple, but as the codebase grows, they become difficult to manage due to tightly coupled components. Key challenges include:
- Complexity Increases: As features are added, components become tightly coupled, making it difficult to modify one part of the system without affecting others.
- Maintenance Issues: It becomes harder to maintain or refactor the system as developers need to understand the full complexity of the entire application.
- Scaling Limitations: Scaling traditionally involves scaling the entire application rather than scaling specific functionalities, leading to resource inefficiencies.
These challenges make monolithic applications cumbersome and brittle, especially when they grow beyond a certain point.
How Does Bonyan Library Solve These Problems?
The Bonyan Library addresses these challenges by providing a set of tools and frameworks that enable developers to structure their monolithic applications in a modular way. This approach allows developers to retain the simplicity of a monolith while introducing a modular structure that makes the system scalable and maintainable. Here are the main problems it solves:
Tightly Coupled Components: By introducing modular boundaries, each component (or module) within the monolith is developed independently. The modules are well-encapsulated, and interaction between modules is managed through clearly defined interfaces. This significantly reduces the interdependencies between different parts of the system.
Maintenance Overhead: The library promotes a clear separation of concerns, with modules that encapsulate domain-specific logic and services. This makes the codebase much easier to maintain, as developers can focus on individual modules without worrying about unintended side effects in other parts of the application.
Scalability and Evolution: With the modular approach, specific modules can be refactored or even extracted into microservices if scaling demands change over time. The system's modularity ensures that scaling can be focused on the parts of the application that need it, reducing the overhead of scaling the entire system unnecessarily.
Team Collaboration: In a modular monolithic architecture, teams can work on different modules concurrently with minimal interference. Each module can have its own lifecycle, reducing conflicts and making it easier for large teams to collaborate on the same codebase.
Features of the Bonyan Library
- Module Abstraction: Provides abstract base classes for defining and managing modules. Modules can depend on each other, forming a cohesive yet loosely coupled system.
- Service Registration: Integrates smoothly with .NET Core's Dependency Injection (DI) framework, ensuring that modules can declare and use services independently.
- Lifecycle Management: The library provides lifecycle hooks (
OnPreConfigure
,OnConfigure
,OnPostConfigure
, etc.) that allow each module to participate in the application's startup and configuration phases. - Modular Boundaries: Clear separation of domains through well-defined Bounded Contexts, making sure that each module focuses on a specific part of the business logic, minimizing cross-cutting concerns.
Example Use Case
Imagine an e-commerce platform developed using the Bonyan Library. Instead of having all functionalities (user management, product catalog, order processing, payments) as part of a single codebase, Bonyan allows each functionality to be encapsulated into its own module:
- UserManagementModule: Handles all user-related operations, authentication, and profile management.
- ProductCatalogModule: Manages product listings, categories, and inventory.
- OrderProcessingModule: Handles orders, checkout processes, and related business logic.
- PaymentModule: Deals with payment gateways, transaction processing, and payment records.
With each of these modules being independent, the system becomes easier to develop, test, and maintain. Changes in the payment logic, for example, will not affect user management, as the modules are designed to be decoupled and only communicate through clearly defined interfaces.
Summary
The Bonyan Library is designed to help developers leverage the benefits of modular monolithic architecture. By providing a robust framework for managing modules within a monolith, it makes the application easier to maintain, more scalable, and adaptable to changing business requirements.
Whether you are building a new monolithic application or refactoring an existing one, the Bonyan Library provides the tools needed to keep the codebase clean, modular, and ready to grow without the common pitfalls of traditional monolithic architectures.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Bonyan.IdentityManagement.Domain.Abstractions (>= 1.2.0)
- Bonyan.UserManagement.Domain (>= 1.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Bonyan.IdentityManagement.Domain:
Package | Downloads |
---|---|
Bonyan.IdentityManagement.EntityFrameworkCore
Package Description |
|
Bonyan.IdentityManagement.Applciation
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.1 | 82 | 11/19/2024 |
1.2.0 | 86 | 11/17/2024 |
1.2.0-pre3 | 72 | 11/16/2024 |
1.2.0-pre1 | 74 | 11/16/2024 |
1.1.9 | 103 | 11/14/2024 |
1.1.8 | 100 | 11/14/2024 |
1.1.7 | 102 | 11/14/2024 |
1.1.6 | 94 | 11/14/2024 |
1.1.6-pre3 | 93 | 11/9/2024 |
1.1.6-pre2 | 69 | 11/7/2024 |
1.1.6-pre1 | 68 | 11/7/2024 |
1.1.5 | 76 | 11/6/2024 |
1.1.4 | 88 | 11/6/2024 |
1.1.3 | 82 | 11/5/2024 |
1.1.2-pre7 | 75 | 11/2/2024 |
1.1.2-pre6 | 74 | 11/2/2024 |
1.1.2-pre5 | 75 | 11/2/2024 |
1.1.2-pre4 | 71 | 11/2/2024 |
1.1.2-pre3 | 80 | 11/2/2024 |
1.1.2-pre2 | 66 | 11/2/2024 |
1.1.2-pre1 | 74 | 11/1/2024 |
1.1.1 | 86 | 10/31/2024 |