/apworks-core

Apworks framework supporting .NET Core

Primary LanguageC#Apache License 2.0Apache-2.0

Apworks Core

Apworks framework supporting .NET Core.

Branch All Platforms Windows Server 2012 Ubuntu 16.04.2
master Build Status Build Status Build Status

Introduction

Apworks is an application development framework which provides essential components and building blocks for creating, implementing and deploying enterprise applications with either classic layered architecture or event-driven CQRS architecture styles. The original repo of Apworks framework is here, which was targeting specifically on .NET Framework 4.5.1 based on some legacy technologies and not being maintained anymore.

Apworks Core is the rewrite of the original Apworks framework, with the following enhancements or features built in:

  • Built based on .NET Core (targeting .NET Framework 4.6.1, NetStandard 1.6), which means Apworks Core can work in both Windows and Linux systems
  • Integrated with ASP.NET Core seamlessly. Fluent APIs provided by the integration component allows developers to enable Apworks features in ASP.NET Core very easily and smoothly
  • Cloud-friendly, support on modern development and DevOps tech stack, such as Microservices, Hypertext Application Language (a.k.a. HAL), Docker, MongoDB, etc.
  • Native support of task based programming model (async/await)
  • Native support of custom entity identifier
  • And so on...

How to Build

Build on Windows

  1. Make sure Windows Powershell 4.0 or above is installed on your Windows machine

  2. Install latest version of .NET Core SDK

  3. Install Git

  4. Clone this repo with the following command:

    git clone https://github.com/daxnet/apworks-core

  5. Go into the build-scripts folder, execute the following command (arguments in the square bracket are optional):

    powershell -F build.ps1 [-runUnitTests] [-runIntegrationTests]

The build artifacts will be placed in the build directory under the project root.

Build on Linux

  1. Instal Powershell for Linux, for more information about the installation please refer to: https://github.com/powershell/powershell#get-powershell

  2. Install latest version of .NET Core SDK

  3. Install Git

  4. Clone this repo with the following command:

    git clone https://github.com/daxnet/apworks-core

  5. Go into the build-scripts folder, execute the following command (arguments in the square bracket are optional):

    powershell -F build.ps1 -framework netstandard1.6 [-runUnitTests] [-runIntegrationTests]

The build artifacts will be placed in the build directory under the project root.

Build Script Arguments

The build.ps1 script accepts the following command line arguments:

  • -version (optional, string, default 1.0.0): The version number used for both assemblies and NuGet package
  • -generatePackages (optional, boolean, default false): Indicates if the NuGet packages should be generated instead of only perform the build. Note that in Linux systems you shouldn't use this argument, as it will build the projects on multiple .NET framework versions, which include .NET Framework 4.6.1 that is not supported by Linux
  • -framework (optional, string, default all): Specifies the targeting framework of the generated assemblies, this option will be ignored if the -generatedPackages is specified. Note that in Linux systems you must specify the framework version to targeting netstandard1.6 as the full .NET Framework 4.6.1 is not supported in Linux
  • -runUnitTests (optional, boolean, default false): Indicates if the unit tests should run
  • -runIntegrationTests (optional, boolean, default false): Indicates if the integration tests should run

Examples

Please refer to Apworks Examples Github repo for the example applications that make use of Apworks Core framework.

Get Started

  1. Add https://www.myget.org/F/daxnet-apworks/api/v3/index.json as one of your NuGet package source for the packages in stable release versions
  2. Add https://www.myget.org/F/daxnet-apworks-pre/api/v3/index.json as one of your NuGet package source for the packages in preview or development versions
  3. In Visual Studio 2015/2017, open Package Manager Console
  4. Select the project that you want to add Apworks Core packages, and execute:
    • Install-Package Apworks
    • You can add additional Apworks Core packages by using the Install-Package command followed by the package name. E.g. Install-Package Apworks.Integration.AspNetCore
    • You can also specify the version of the package that you wish to use, e.g. Install-Package Apworks.Integration.AspNetCore -Version 1.0

For more information about using Apworks Core framework in your application scaffold, please read the Apworks Core documentation.

Components and Packages

Component Package Name Package Source (preview) Package Source (stable)
Base Framework Library Apworks MyGet Badge (n/a)
ASP.NET Core integration component Apworks.Integration.AspNetCore MyGet Badge (n/a)
MongoDB repository implementation Apworks.Repositories.MongoDB MyGet Badge (n/a)
Entity Framework Core repository implementation Apworks.Repositories.EntityFramework MyGet Badge (n/a)
Simple repository implementation Apworks.Repositories.Simple MyGet Badge (n/a)
Simple event store implementation Apworks.EventStore.Simple MyGet Badge (n/a)
Common library for Event Store implementation with ADO.NET Apworks.EventStore.AdoNet MyGet Badge (n/a)
Event Store implementation on PostgreSQL Apworks.EventStore.PostgreSQL MyGet Badge (n/a)
Simple messaging Infrastructure implementation Apworks.Messaging.Simple MyGet Badge (n/a)
Querying parsers implemented with Irony Apworks.Querying.Parsers.Irony MyGet Badge (n/a)
Json serialization implementation Apworks.Serialization.Json MyGet Badge (n/a)

Documentation

Please find the latest documentation here.

References