• Stars
    star
    372
  • Rank 114,858 (Top 3 %)
  • Language
    C#
  • Created almost 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apworks is a flexible, scalable, configurable and efficient .NET based application development framework that helps software developers to easily build enterprise applications by applying either Classic Layering or Command-Query Responsibility Segregation (CQRS) architectural patterns.

Out of Date Announcement

This repo is out of date and will no longer be maintained. Please refer to https://github.com/daxnet/apworks-core for the new, modern and latest version of Apworks. Apworks Core is the rewrite of Apworks framework, supporting Microsoft .NET Core.

Project Description

Apworks is a flexible, scalable, configurable and efficient .NET based application development framework that helps software developers to easily build enterprise applications by applying either Classic Layering or Command-Query Responsibility Segregation (CQRS) architectural patterns. Apworks provides the fundamental libraries and tools for practicing and implementing Domain-Driven Design concepts such as entities, value objects, repositories, factories, specifications, event sourcing, snapshots, domain repositories, message dispatching and synchronization, etc. It also provides the utilities from infrastructure level such as Inversion of Control/Dependency Injection (IoC/DI) components, AOP interception, exception handling & logging, so that architects and developers can focus on the business domain and communicate with domain experts via ubiquitous language without any concern of technical implementations.

Followings are the highlights of current implementation of Apworks framework:

  • Flexible configuration - Apworks provides three different approaches that allows you to configure the framework. Config file configuration allows system administrators to change the application configuration after the application has been deployed, it is usually used in the production environment. The coding configuration allows developers to build the configuration information for Apworks in the source code so that developers would benefit from the IntelliSense provided by Visual Studio. Furthermore, coding configuration also allows multiple configuration information exists under the same AppDomain, this makes it easier to have your application unit-tested. You can also use the Fluent API to configure the framework, which allows you to configure the framework in a natural and readable manner.
  • Message bus integration - Apworks provides a flexible framework to support message buses. Message buses are important building blocks for distributed enterprise solutions, applications would dispatch or receive messages (like events) in different patterns. By this means, systems under the same solution can be easily and loosely integrated. Apworks provides both Direct Message Bus, which dispatches messages directly to another process, and MSMQ Message Bus, which utilizes the Microsoft Message Queuing (MSMQ) to perform message dispatching. Also, Apworks allows developers to extend the framework so that 3rd-party messaging solutions can be integrated into their own business
  • Supports different database systems - Developers can choose different database systems according to the project's needs. When applying Classic Layering architectural pattern, Apworks provides adapters for NHibernate, Entity Framework and MongoDB so that different databases can be used in the project. For CQRS application architecture, Apworks not only provides Relational-Database Management System (RDBMS) adapters such as SQL Server and MySQL, but also provides the interfaces for extending the framework to use NoSQL solutions
  • Supports different domain repositories - Apworks provides following implementation for domain repositories to meet different project scenarios:
    • Event Sourced Domain Repository - The domain repository used for event sourcing. If you need to enable the event sourcing mechanism in your project, that's it
    • Regular Domain Repository - The domain repository that applies the standard repository pattern. This domain repository will store the entities themselves in the backend database, rather than domain events, so you won't get any benefits from the event sourcing
    • Regular Event Publisher Domain Repository - This domain repository will store entities rather than domain events in the backed database, however, compared with the Regular Domain Repository, it will emit domain events and publish them to the message bus so that external systems could be easily integrated
    • Snapshot Domain Repository - This domain repository will take snapshots for the entities to be saved and stores the snapshots
  • Supports different snapshot providers - When applying CQRS, snapshots are very important when event data are growing larger and larger. Apworks supports two built-in snapshot provides:
    • Event Number Snapshot Provider - This snapshot provider counts the number of events generated for a specific aggregate root. If the number exceeds a specific amount (maximum number of events), a snapshot will be taken from the aggregate root and be stored to the snapshot database. This maximum number of events is configurable in the Apworks' configuration
    • Suppressed Snapshot Provider - Use this snapshot provider along with the Event Sourced Domain Repository to suppress the generating of the snapshots
  • Aspect-oriented programming (AOP) - By utilizing the dynamic proxy of Castle project, Apworks is now able to provide the features of Aspect-oriented programming. From the Apworks' configuration, developers are able to specify the methods that need to be intercepted as well as the interceptors to achieve their AOP goal
  • Exception handling - Apworks provides a built-in interceptor for working with exception handling mechanism. Exception handling is also highly configurable from Apworks configuration

Dependencies

Apworks has applied the Separated Interface Pattern to reduce the dependencies on other 3rd-party frameworks & tools from its core level. However for some adapter components, they still depends on specific technical implementation and 3rd-party libraries. These dependencies include:

  • Object containers - Apworks uses Microsoft Unity as IoC/DI container, however developers can use the interfaces defined in Apworks core assembly to customize object containers
  • Repositories for Classic Layering architectural pattern - Apworks uses NHibernate and Entity Framework to implement the repository for Classic Layering architecture, however developers can use the interfaces defined in Apworks core assembly to customize repositories
  • SQL Server database storages - This depends on the SQL Server client components defined under System.Data.SqlClient namespace of Microsoft .NET Framework 4.0
  • MySQL database storages - This depends on the MySQL .NET Connector components
  • Aspect-oriented programming (AOP) - This depends on the dynamic proxy facilities provided by Castle Core assembly

Note that in the standard Apworks distribute package all required assemblies/libraries are included, you don't need to download them and replace the ones in the package individually. Apworks will announce the replacement of latest 3rd-party components in the release notes.

Sample Project

The Byteart Retail project demonstrated how to use Apworks framework to build domain-oriented, classic-layered applications. Although it is in Simplified-Chinese, you can read much about how Apworks helps you building the professional enterprise applications. For more introduction about Byteart Retail project, please read HERE, which is also in Simplified-Chinese.

Byteart Retail Version 3

The Tiny Library CQRS project fully demonstrates how to apply CQRS architectural pattern in a real-world application by using Apworks framework.

Tiny Library CQRS

More Repositories

1

ByteartRetail

一个演示.NET企业应用开发技术以及领域驱动设计的案例代码,业务背景是一个简单的在线零售系统。
C#
311
star
2

we-text

WeText is a sample application that demonstrates the implementation of DDD/CQRS and microservice architectural patterns in C#.
C#
257
star
3

apworks-core

Apworks framework supporting .NET Core
C#
203
star
4

irony

A modified version of the Irony project (https://irony.codeplex.com) with .NET Core support
C#
152
star
5

edasample

A sample project demonstrating EDA in ASP.NET Core
C#
99
star
6

ByteartRetail_Apworks

集成了Apworks框架的Byteart Retail案例,所有核心组件都由Apworks框架提供。是展示Apworks框架的一个很好的案例。
JavaScript
49
star
7

hal

The C#/.NET Core implementation of Hypertext Application Language (HAL) specification.
C#
45
star
8

CloudNotes

A personal note system running on the cloud.
C#
43
star
9

raspkate

A simple and small web server that can run on either Windows or Linux.
C#
33
star
10

apworks-examples

Example projects demonstrating Apworks framework.
C#
30
star
11

daxnet-blog

A blog web site for daxnet.
C#
27
star
12

tetris-sharp

A Tetris game made with CSharp and MonoGame
C#
26
star
13

wizard-framework

A Windows Forms based framework for building wizards.
C#
21
star
14

abacuza

Easing your on-premise Data Processing
JavaScript
21
star
15

logo-sharp

Logo programming language for managed world.
C#
17
star
16

mlnet-trainer

一个基于ML.NET监督式(Supervised)机器学习进行学生成绩预测的案例程序
C#
17
star
17

identity-demo

A demonstration app showing Angular SPA authentication and authorization based on Ocelot and IdentityServer4.
C#
14
star
18

UnifiedQueries

Unified Queries defined a Domain-Specific Language (DSL) to describe a common schema of a query specification.
C#
13
star
19

ocelot-sample

Examples using Ocelot API Gateway in ASP.NET Core applications.
C#
13
star
20

Starwar

A star war game developed with MonoGame
C#
12
star
21

irony-explorer

A project contains both the sample grammars as well as the Windows Forms based grammar explorer for Irony.
C#
9
star
22

CalculateIt2

A calculation generation engine for students.
C#
9
star
23

forms-ui

A Windows Forms library for solving real life problems.
C#
8
star
24

Json2DataSet

Converts the json string to the ADO.NET DataSet object
C#
8
star
25

tasklist

Task list example building for demonstration.
TypeScript
7
star
26

easymemo

一个展示企业级系统设计和架构的简单案例。
C#
5
star
27

name-list

一个演示容器化单页面应用访问后端RESTful API的案例
TypeScript
4
star
28

adaptive-console

A framework of building complex console applications with C#
C#
4
star
29

form-file-upload

Demonstrating file upload in ASP.NET MVC on .NET 5 and the using of Rook-Ceph on Kubernetes.
C#
2
star
30

byteart-retail-msa

Microservices architecture implementation sample of Byteart Retail
C#
2
star
31

guluwin

C#
1
star
32

live-writer-plugins

Some personal used plugins for Open Live Writer
C#
1
star
33

ovow

2D Gaming Engine for MonoGame
C#
1
star
34

OcelotDemo

C#
1
star
35

mdocwriter

Markdown Document Writer
C#
1
star
36

booking

A sample meeting room booking system.
C#
1
star
37

simple-store

A simple demonstration for utilizing value store via a backend service.
1
star
38

NesEmulator

Nintendo Entertainment System (NES) emulator written in C#
C#
1
star
39

link-game

A link game written in C# - 连连看小游戏
C#
1
star
40

tetris

Tetris game
1
star
41

pkiwhosnext

The internal lottery application of PerkinElmer Informatics R&D.
TypeScript
1
star
42

sphinx-demo

A demonstration project of sphinx and readthedocs.org.
1
star