paint-brush
DNTFrameworkCore as a Lightweight Infrastructureby@rabbal
215 reads

DNTFrameworkCore as a Lightweight Infrastructure

by GholamReza Rabbal
GholamReza Rabbal HackerNoon profile picture

GholamReza Rabbal

@rabbal

February 21st, 2019
Read on Terminal Reader
Read this story in a terminal
Print this story
Read this story w/o Javascript
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<a href="https://github.com/rabbal/DNTFrameworkCore" target="_blank">DNTFrameworkCore</a> is a Lightweight and Extensible Infrastructure for Building High Quality Web Applications Based on ASP.NET Core and has the following goals:

Coin Mentioned

Mention Thumbnail
Flow
featured image - DNTFrameworkCore as a Lightweight Infrastructure
1x
Read by Dr. One voice-avatar

Listen to this story

GholamReza Rabbal HackerNoon profile picture
GholamReza Rabbal

GholamReza Rabbal

@rabbal

DNTFrameworkCore is a Lightweight and Extensible Infrastructure for Building High Quality Web Applications Based on ASP.NET Core and has the following goals:

  • Common structures in various applications like Cross-Cutting Concerns and etc
  • Follow DRY principle to focus on main business logic
  • Reduce the development time
  • Less bug and stop bug propagation
  • Reduce the training time of the new developer with low knowledge about OOP and OOD

image

Blog Entity CRUD API

image

Blog Entity CRUD Service

Features

This Framework has the various features that I list them in below:

Installation

To create your first project based on DNTFrameworkCore you can install the following packages:

PM> Install-Package DNTFrameworkCorePM> Install-Package DNTFrameworkCore.EntityFrameworkPM> Install-Package DNTFrameworkCore.EntityFramework.SqlServerPM> Install-Package DNTFrameworkCore.WebPM> Install-Package DNTFrameworkCore.Web.EntityFrameworkPM> Install-Package DNTFrameworkCore.FluentValidationPM> Install-Package DNTFrameworkCore.Web.MultiTenancy

OR

1- Run the following command to install a boilerplate project template based on ASP.NET Core Web API and DNTFrameworkCore:

dotnet new --install DNTFrameworkCoreTemplateAPI::*‌‌

2- Create a new project with installed template:

dotnet new dntcore-api

Now you have a solution like below that contains complete identity management features including user,role and dynamic permission management and also integrated with persistent JWT authentication mechanism:

image

Multi Project Solution

Introducing various projects in installed template

Domain project contains “Domain Model” of your application. For example, anemic domain model of identity management system was designed in this template.

image

Infrastructure project contains DbContext, Mapping and EF Core Migrations.

image

Application project contains DTOs/Models that related to domain entities, validators, application services and event handlers.

image

Resources project contains resx files.

image

UnitTests project contains unit tests for your application. for example, you can see UserValidatorTests and RoleValidatorTests results in the following picture:

image

IntegrationTests project contains integration tests for your application. for example, you can see RoleServiceTests and UserServieTests results in the following picture:

image

API project contains Controllers, Hubs and JWT authentication infrastructure. as example, you can see RolesController, UsersController and AuthController in the following picture:

image

In the end, if this infrastructure was useful, share it.

L O A D I N G
. . . comments & more!

About Author

GholamReza Rabbal HackerNoon profile picture
GholamReza Rabbal@rabbal

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
X REMOVE AD