ABP vNext Framework: Overview, Features, and Step‑by‑Step Guide to Building a .NET Microservice Application
This article introduces the ABP vNext framework, explains its origins from ASP.NET Boilerplate, details its modular, DDD‑based architecture and microservice capabilities, and provides a complete hands‑on tutorial—including CLI commands, project structure, code snippets, and best‑practice recommendations—for creating a .NET microservice solution.
The ABP vNext framework, a modern rewrite of ASP.NET Boilerplate based on .NET Core, offers a complete, modular, layered architecture that follows Domain‑Driven Design (DDD) principles and supports both monolithic and microservice solutions.
Background
ASP.NET Boilerplate, created in 2013 by Turkish architect Halil İbrahim Kalkan, gained over 9.8K GitHub stars and supports .NET Framework and .NET Core. Since version 5.0 it runs on .NET Core 3.x, but development slowed as the ABP team shifted focus to ABP vNext.
ABP vNext Overview
ABP vNext (also called ABP Framework) was launched in 2017, built on .NET Core, and now supports .NET 5 and .NET 6. It provides a complete infrastructure for modern web applications and APIs, offering out‑of‑the‑box modules such as multi‑tenant, auditing, BLOB storage, authentication, and more.
Key Features
Full modularity: framework modules (caching, email, security, EF Core, MongoDB, etc.) and application modules (blog, file management, identity, tenant management).
DDD infrastructure: repositories, domain services, entities, aggregates, value objects, and a four‑layered model (Presentation, Application, Domain, Infrastructure).
Microservice support: sample solutions MicroserviceDemo and eShopOnAbp demonstrate independent services, API gateways (Ocelot), authentication (IdentityServer4), databases (SQL Server, MongoDB), distributed cache (Redis), messaging (RabbitMQ), containerization (Docker, Kubernetes), and logging (Elasticsearch, Kibana).
Getting Started
Install the ABP CLI:
dotnet tool install -g Volo.Abp.CliUpdate if needed:
dotnet tool update -g Volo.Abp.CliCreate a module‑based solution:
abp new Yzw.BookStore -t moduleAfter removing unused template projects, the solution contains the typical layered projects:
.Domain.Shared – shared constants, enums, and DTOs.
.Domain – entities, aggregates, domain services, repositories.
.Application.Contracts – service interfaces and DTOs.
.Application – service implementations.
.EntityFrameworkCore – EF Core DbContext and migrations.
.HttpApi – REST controllers.
Example entity Book :
public class Book : AuditedAggregateRoot<Guid>
{
public string Name { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
}Register the entity in BookStoreDbContext and configure the table mapping:
public class BookStoreDbContext : AbpDbContext<BookStoreDbContext>, IBookStoreDbContext
{
public DbSet<Book> Books { get; set; }
// ...
}
public static void ConfigureBookStore(this ModelBuilder builder)
{
builder.Entity<Book>(b =>
{
b.ToTable(BookStoreDbProperties.DbTablePrefix + "Books", BookStoreDbProperties.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
});
}Create DTOs and map them with AutoMapper:
public class BookDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
}
public class BookStoreApplicationAutoMapperProfile : Profile
{
public BookStoreApplicationAutoMapperProfile()
{
CreateMap<Book, BookDto>();
CreateMap<BookDto, Book>();
}
}Implement the service interface and expose it via a controller:
public interface IBookAppService : ICrudAppService<BookDto, Guid, PagedAndSortedResultRequestDto, BookDto> { }
public class BookAppService : CrudAppService<Book, BookDto, Guid, PagedAndSortedResultRequestDto, BookDto>, IBookAppService
{
public BookAppService(IRepository<Book, Guid> repository) : base(repository) { }
}
[RemoteService]
[AllowAnonymous]
[Route("api/services/book")]
public class BookController : BookStoreController, IBookAppService
{
private readonly IBookAppService _bookAppService;
public BookController(IBookAppService bookAppService) { _bookAppService = bookAppService; }
// CRUD actions using _bookAppService ...
}Run the solution (ensure Redis is running), start Yzw.BookStore.IdentityServer and Yzw.BookStore.HttpApi.Host , and use the generated Swagger UI to test the APIs. Example curl request to create a book is provided.
Practical Tips
Manually compose your solution; remove unnecessary modules from the template.
Prefer hand‑written controllers over the auto‑generated API services for full control.
Avoid the built‑in batch repository methods for large data sets; implement custom logic.
Consider separating background jobs from the web host; integrate HangFire or Quartz only when needed.
Adopt a front‑end/back‑end separation strategy even though ABP provides web UI helpers.
Learning Path
Start with DDD fundamentals, read the full ABP documentation (prefer the English version), run the sample project, explore core modules (tenant, blog), then study the microservice demo to understand service interactions.
Conclusion
ABP vNext is a powerful .NET framework that streamlines solution scaffolding, embraces best practices, and fits microservice architectures, but teams should adapt its patterns to their specific needs rather than follow every convention blindly.
YunZhu Net Technology Team
Technical practice sharing from the YunZhu Net Technology Team
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.