Convert Figma logo to code with AI

abpframework logoabp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.

12,849
3,426
12,849
658

Top Related Projects

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

ASP.NET Boilerplate - Web Application Framework

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.

Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all

Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core

Quick Overview

ABP Framework is an open-source, modular application framework for ASP.NET Core. It provides a complete infrastructure to develop modern web applications and APIs following best practices and conventions. ABP aims to simplify development by offering pre-built modules, tools, and libraries.

Pros

  • Modular architecture allows for easy customization and extension
  • Comprehensive set of features including multi-tenancy, localization, and authorization
  • Strong focus on Domain-Driven Design (DDD) principles
  • Active community and regular updates

Cons

  • Steep learning curve for developers new to the framework
  • Can be overkill for small, simple projects
  • Some users report performance issues with larger applications
  • Documentation can be overwhelming due to the extensive feature set

Code Examples

  1. Creating an entity:
public class Book : AuditedAggregateRoot<Guid>
{
    public string Name { get; set; }
    public BookType Type { get; set; }
    public DateTime PublishDate { get; set; }
    public float Price { get; set; }

    protected Book() { }

    public Book(Guid id, string name, BookType type, DateTime publishDate, float price)
        : base(id)
    {
        Name = name;
        Type = type;
        PublishDate = publishDate;
        Price = price;
    }
}
  1. Defining an application service:
public class BookAppService : ApplicationService, IBookAppService
{
    private readonly IRepository<Book, Guid> _bookRepository;

    public BookAppService(IRepository<Book, Guid> bookRepository)
    {
        _bookRepository = bookRepository;
    }

    public async Task<BookDto> GetAsync(Guid id)
    {
        var book = await _bookRepository.GetAsync(id);
        return ObjectMapper.Map<Book, BookDto>(book);
    }
}
  1. Configuring a module:
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
public class BookStoreWebModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<BookStoreDbContext>(options =>
        {
            options.AddDefaultRepositories(includeAllEntities: true);
        });

        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<BookStoreWebModule>();
        });
    }
}

Getting Started

  1. Install the ABP CLI:
dotnet tool install -g Volo.Abp.Cli
  1. Create a new ABP project:
abp new BookStore
  1. Run the application:
cd BookStore
dotnet run

This will create a new ABP project named "BookStore" and start the application. You can then navigate to https://localhost:44300 in your browser to see the running application.

Competitor Comparisons

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Pros of aspnetcore

  • Larger community and more extensive ecosystem
  • Direct support from Microsoft, ensuring long-term maintenance
  • More frequent updates and faster adoption of new .NET features

Cons of aspnetcore

  • Steeper learning curve for beginners
  • Requires more boilerplate code for common functionalities
  • Less opinionated, which can lead to inconsistent application structures

Code Comparison

aspnetcore:

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllers();
    services.AddDbContext<ApplicationDbContext>(options =>
        options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
}

abp:

public override void ConfigureServices(ServiceConfigurationContext context)
{
    context.Services.AddAbpDbContext<YourDbContext>(options =>
    {
        options.UseSqlServer();
    });
}

The abp framework provides a more streamlined approach to configuring services and database contexts, reducing boilerplate code. However, aspnetcore offers more flexibility and control over the configuration process.

ASP.NET Boilerplate - Web Application Framework

Pros of aspnetboilerplate

  • More mature and stable, with a longer development history
  • Extensive documentation and community support
  • Supports both ASP.NET MVC and ASP.NET Core

Cons of aspnetboilerplate

  • Heavier and more complex architecture
  • Slower adoption of new technologies and features
  • Less modular and harder to customize

Code Comparison

aspnetboilerplate:

public class PersonAppService : AsyncCrudAppService<Person, PersonDto, int, PagedPersonResultRequestDto, CreatePersonDto, UpdatePersonDto>, IPersonAppService
{
    public PersonAppService(IRepository<Person, int> repository) : base(repository)
    {
    }
}

abp:

public class PersonAppService : CrudAppService<Person, PersonDto, Guid>, IPersonAppService
{
    public PersonAppService(IRepository<Person, Guid> repository) : base(repository)
    {
    }
}

The code comparison shows that abp has a more streamlined and simplified approach to creating CRUD application services, with fewer generic parameters and a more concise syntax. This aligns with abp's focus on modularity and ease of use, while aspnetboilerplate offers more flexibility at the cost of increased complexity.

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.

Pros of OrchardCore

  • More focused on content management and website building
  • Offers a modular architecture with a rich ecosystem of themes and modules
  • Provides a user-friendly admin interface for non-technical users

Cons of OrchardCore

  • Steeper learning curve for developers new to the platform
  • Less comprehensive application development framework compared to ABP
  • Smaller community and fewer resources available online

Code Comparison

OrchardCore:

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddOrchardCms();
    }
}

ABP:

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddApplication<MyAbpModule>();
    }
}

Both frameworks use a modular approach, but OrchardCore is more focused on content management, while ABP provides a more comprehensive application development framework. OrchardCore's setup is simpler for CMS-centric projects, while ABP offers more flexibility for complex business applications.

OrchardCore excels in content management scenarios and provides an intuitive admin interface, making it suitable for projects where non-technical users need to manage content. ABP, on the other hand, offers a more robust set of tools and conventions for building large-scale applications with advanced features like multi-tenancy and distributed event bus.

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.

Pros of nopCommerce

  • Specialized e-commerce solution with built-in features like product management, order processing, and payment gateways
  • Extensive plugin ecosystem for easy customization and extension
  • Comprehensive documentation and active community support

Cons of nopCommerce

  • Less flexible for non-e-commerce applications compared to ABP's modular architecture
  • Steeper learning curve for developers new to e-commerce platforms
  • More opinionated in terms of architecture and design patterns

Code Comparison

nopCommerce (Product entity):

public partial class Product : BaseEntity, ISoftDeletedEntity
{
    public string Name { get; set; }
    public string ShortDescription { get; set; }
    public decimal Price { get; set; }
    public bool Published { get; set; }
    // ... other properties
}

ABP (Generic entity):

public class MyEntity : AggregateRoot<Guid>
{
    public string Name { get; set; }
    public string Description { get; set; }
    public decimal Price { get; set; }
    public bool IsActive { get; set; }
    // ... custom properties
}

The code comparison shows that nopCommerce has pre-defined entities tailored for e-commerce, while ABP provides a more generic approach, allowing developers to define custom entities based on their specific needs.

Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all

Pros of ServiceStack

  • Lightweight and fast, with minimal overhead
  • Extensive support for various data formats (JSON, XML, CSV, etc.)
  • Built-in support for multiple authentication providers

Cons of ServiceStack

  • Commercial licensing for larger projects
  • Steeper learning curve for developers new to the framework
  • Less integrated with the broader .NET ecosystem

Code Comparison

ServiceStack:

[Route("/hello/{Name}")]
public class Hello : IReturn<HelloResponse>
{
    public string Name { get; set; }
}

ABP:

public class HelloWorldAppService : ApplicationService, IHelloWorldAppService
{
    public virtual Task<string> SayHello(string name)
    {
        return Task.FromResult($"Hello {name}!");
    }
}

ServiceStack focuses on a more attribute-based routing approach, while ABP follows a more traditional service-oriented architecture. ServiceStack's approach can lead to more concise code, but ABP's structure may be more familiar to developers accustomed to standard .NET practices.

Both frameworks offer robust solutions for building web applications and APIs, with ServiceStack providing a more lightweight and flexible approach, while ABP offers a more comprehensive, modular architecture with stronger integration into the .NET ecosystem.

Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core

Pros of CleanArchitecture

  • Lightweight and focused on clean architecture principles
  • Easier to understand and implement for smaller projects
  • More flexibility in choosing additional libraries and tools

Cons of CleanArchitecture

  • Less comprehensive out-of-the-box features compared to ABP
  • Requires more manual setup for common enterprise application needs
  • Limited built-in modules and integrations

Code Comparison

CleanArchitecture:

public class CreateTodoItemCommand : IRequest<int>
{
    public int ListId { get; set; }
    public string Title { get; set; }
}

ABP:

public class CreateTodoItemDto : IInputDto
{
    public Guid ListId { get; set; }
    public string Title { get; set; }
}

Both repositories provide a solid foundation for building .NET applications, but they cater to different needs. CleanArchitecture focuses on implementing clean architecture principles in a lightweight manner, making it suitable for smaller projects or those requiring more customization. ABP, on the other hand, offers a more comprehensive framework with built-in modules and features, making it ideal for large-scale enterprise applications.

The code comparison shows that both frameworks use similar patterns for defining data transfer objects or command objects. However, ABP tends to use more framework-specific base classes and interfaces, while CleanArchitecture leans towards more generic C# constructs.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

ABP Framework

build and test 🔹 codecov 🔹 NuGet 🔹 NuGet (with prereleases) 🔹 MyGet (nightly builds) 🔹 NuGet Download 🔹 Code of Conduct 🔹 CLA Signed 🔹 Discord Shield

ABP Framework is a complete infrastructure based on ASP.NET Core that creates modern web applications and APIs by following the software development best practices and the latest technologies.

ABP Platform

Getting Started

  • Quick Start is a single-part, quick-start tutorial to build a simple application with the ABP Framework. Start with this tutorial if you want to understand how ABP works quickly.
  • Getting Started guide can be used to create and run ABP-based solutions with different options and details.
  • Web Application Development Tutorial is a complete tutorial on developing a full-stack web application with all aspects of a real-life solution.

Quick Start

Install the ABP CLI:

> dotnet tool install -g Volo.Abp.Cli

Create a new solution:

> abp new BookStore -u mvc -d ef

See the CLI documentation for all available options.

UI Framework Options

Database Provider Options

What ABP Provides?

ABP provides a full stack developer experience.

Architecture

ABP offers a complete, modular and layered software architecture based on Domain Driven Design principles and patterns. It also provides the necessary infrastructure and guidance to implement this architecture.

ABP Framework is suitable for microservice solutions as well as monolithic applications.

Infrastructure

There are a lot of features provided by the ABP Framework to achieve real-world scenarios easier, like Event Bus, Background Job System, Audit Logging, BLOB Storing, Data Seeding, Data Filtering, etc.

Cross-Cutting Concerns

ABP also simplifies (and even automates wherever possible) cross-cutting concerns and common non-functional requirements like Exception Handling, Validation, Authorization, Localization, Caching, Dependency Injection, Setting Management, etc.

Application Modules

ABP is a modular framework and the Application Modules provide pre-built application functionalities;

  • Account: Provides UI for the account management and allows user to login/register to the application.
  • Identity: Manages organization units, roles, users and their permissions based on the Microsoft Identity library.
  • OpenIddict: Integrates to OpenIddict.
  • Tenant Management: Manages tenants for a multi-tenant (SaaS) application.

See the Application Modules document for all pre-built modules.

Startup Templates

The Startup templates are pre-built Visual Studio solution templates. You can create your own solution based on these templates to immediately start your development.

Mastering ABP Framework Book

This book will help you to gain a complete understanding of the ABP Framework and modern web application development techniques. It is written by the creator and team lead of the ABP Framework. You can buy from Amazon or Packt Publishing. Find further info about the book at abp.io/books/mastering-abp-framework.

book-mastering-abp-framework

The Community

ABP Community Web Site

The ABP Community is a website to publish articles and share knowledge about the ABP Framework. You can also create content for the community!

Blog

Follow the ABP Blog to learn the latest happenings in the ABP Framework.

Samples

See the sample projects built with the ABP Framework.

Want to Contribute?

ABP is a community-driven open-source project. See the contribution guide if you want to participate in this project.

Official Links

Support ABP

GitHub repository stars are an important indicator of popularity and the size of the community. If you like ABP Framework, support us by clicking the star :star: on the repository.

Discord Server

We have a Discord server where you can chat with other ABP users. Share your ideas, report technical issues, showcase your creations, share the tips that worked for you and catch up with the latest news and announcements about ABP Framework. Join 👉 https://discord.gg/abp.

NPM DownloadsLast 30 Days