Code Monkey home page Code Monkey logo

masa.contrib's Introduction

| EN

MASA.Contrib

Packege CI

The purpose of MASA.Contrib is based on MASA.BuildingBlocks to provide open, community driven reusable components for building mesh applications. These components will be used by the MASA Stack and MASA Labs projects.

Structure

MASA.Contrib
├── solution items
│   ├── nuget.config
├── src
│   ├── Data
│   │   ├── MASA.Contrib.Data.UoW.EF                               Unit of work
│   │   └── MASA.Contribs.Data.Contracts.EF                        Protocol EF version
│   ├── DDD
│   │   ├── MASA.Contribs.DDD.Domain                               In-process and cross-process support
│   │   └── MASA.Contribs.DDD.Domain.Repository.EF
│   ├── Dispatcher
│   │   ├── MASA.Contrib.Dispatcher.Events                         In-process event
│   │   ├── MASA.Contrib.Dispatcher.IntegrationEvents.Dapr
│   │   └── MASA.Contrib.Dispatcher.IntegrationEvents.EventLogs.EF Cross-process event
│   ├── ReadWriteSpliting
│   │   └── CQRS
│   │   │   └── MASA.Contrib.ReadWriteSpliting.CQRS                CQRS
│   ├── Service
│   │   └── MASA.Contrib.Service.MinimalAPIs                       Best practices for [MinimalAPI]
├── test
│   ├── MASA.Contrib.Dispatcher.Events
│   │   ├── MASA.Contrib.Dispatcher.Events.BenchmarkDotnetTest
│   │   ├── MASA.Contrib.Dispatcher.Events.CheckMethodsParameter.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.CheckMethodsParameterNotNull.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.CheckMethodsParameterType.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.CheckMethodsType.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.OnlyCancelHandler.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.CheckMethodsType.Tests
│   │   ├── MASA.Contrib.Dispatcher.Events.Tests
│   ├── MASA.Contrib.Data.UoW.EF.Tests
│   ├── MASA.Contrib.Dispatcher.IntegrationEvents.EventLogs.EF.Tests
│   ├── MASA.Contribs.DDD.Domain.Tests
│   ├── MASA.Contribs.DDD.Domain.Repository.EF.Tests

Feature

1. MinimalAPI

What is MinimalAPIUsage introduction

Advantage:

  1. Classify APIs and add them to different Services to make the Service structure clearer and get rid of running account programming

2. EventBus

Usage introduction

Advantage:

  1. Arrangement of Handler
  2. Implement Saga
  3. Middleware
  4. Transaction

Effect:

  1. Event and Handler decoupling
  2. Arrangement of Handler
  3. Implement Saga
  4. Middleware
  5. Transaction

3. CQRS

what isCQRSUsage introduction

4. IntegrationEventBus

Realize cross-process events based on Dapr。Usage introduction

Advantage:Use the same transaction to commit the user-defined context and the log to ensure atomicity and consistency

5. DomainEventBus

Usage introduction

Advantage:

  1. CQRS
  2. Field Service
  3. Support domain events (in-process), integrated domain events (cross-process)
  4. Support the unified sending of field events after being pushed onto the stack

6. DDD

DDD // todo

7. Contracts.EF

Protocol based on EF implementation,Usage introduction

Advantage:

  1. Filter deleted information when querying
  2. Open transaction after query
  3. Soft delete
Install-Package MASA.Contribs.Data.Contracts.EF
builder.Services
    .AddUoW<CustomDbContext>(dbOptions =>
    {
        dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
        dbOptions.UseSoftDelete(builder.Services);//Start soft delete
    })

When the entity inherits ISoftware and is deleted, change the delete state to the modified state, and cooperate with the custom Remove operation to achieve soft deletion Do not query the data marked as soft deleted when querying When combined with EventBus, the transaction is opened after the first CUD, and the transaction rollback is supported when the entire Handler is abnormal.

Unit testing rules

To ensure the reliability of the entire source code, the unit test coverage is at least 90%

☀️ License agreement

MASA.Contrib

masa.contrib's People

Contributors

blazor-component avatar doddgu avatar mixvii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.