ABP.IO Platform 7.0 RC Has Been Published

User Avatar
1 year ago, 49451 views, 2 comments
Cover Image

Today, we are happy to release the ABP Framework and ABP Commercial version 7.0 RC (Release Candidate). This blog post introduces the new features and important changes in this new version.

Try this version and provide feedback for a more stable version of ABP v7.0! Thanks to all of you.

Get Started with the 7.0 RC

Follow the steps below to try version 7.0.0 RC today:

  1. Upgrade the ABP CLI to version 7.0.0-rc.3 using a command line terminal:
dotnet tool update Volo.Abp.Cli -g --version 7.0.0-rc.3

or install it if you haven't before:

dotnet tool install Volo.Abp.Cli -g --version 7.0.0-rc.3
  1. Create a new application with the --preview option:
abp new BookStore --preview

See the ABP CLI documentation for all the available options.

You can also use the Get Started page to generate a CLI command for creating a new application.

You can use any IDE that supports .NET 7.x, like Visual Studio 2022.

Migration Guides

There are breaking changes in this version that may affect your application. Please see the following migration documents, if you are upgrading from v6.x:

What's New with ABP Framework 7.0?

In this section, I will introduce some major features released in this version. Here is a brief list of titles explained in the next sections:

  • Upgraded to .NET 7.0
  • Upgraded to OpenIddict 4.0
  • Dapr Integration
  • Integration Services
  • Dynamic Permissions and Features
  • External Localization Infrastructure
  • Distributed Entity Cache Service
  • Layout Hooks for the Blazor UI
  • Improvements on the eShopOnAbp project

Upgraded to .NET 7.0

We've upgraded the ABP Framework to .NET 7.0, so you need to move your solutions to .NET 7.0 if you want to use ABP 7.0.

You can check the Migrate from ASP.NET Core 6.0 to 7.0 documentation. Also, there is an ABP Community article that shows how to upgrade an existing project to .NET 7.0. You can check it from 👉 here.

Upgraded to OpenIddict 4.0

OpenIddict 4.0 preview has been released on June 22. So, we decided to upgrade the OpenIddict packages to 4.0-preview in ABP 7.0.

Once the final release of OpenIddict 4.0 is published, we will immediately upgrade it to the stable version and we plan to make ABP 7.0 final use the stable version of OpenIddict 4.0.

You can read the "OpenIddict 4.0 preview1 is out" post to learn what's new with OpenIddict 4.0.

Dapr Integration

Dapr (Distributed Application Runtime) provides APIs that simplify microservice connectivity.

ABP and Dapr have some intersecting features like service-to-service communication, distributed message bus and distributed locking. However, the purposes of ABP and Dapr are different. ABP's goal is to provide an end-to-end developer experience with an opinionated architecture. On the other hand, Dapr's purpose is to provide a runtime to decouple common microservice communication patterns from your application logic.

ABP 7.0 offers some packages to provide better integration with Dapper. I will cover some important integration notes below but if you want to get a full overview of ABP Dapr Integration please see the ABP Dapr Integration documentation.

Distributed Event Bus Integration

ABP's Distributed Event Bus System provides a convenient abstraction to allow applications to communicate asynchronously via events.

The new Volo.Abp.EventBus.Dapr and Volo.Abp.AspNetCore.Mvc.Dapr.EventBus packages make it possible to use the Dapr infrastructure with the ABP's standard distributed event bus abstractions. The Volo.Abp.EventBus.Dapr package is used to publish events and the Volo.Abp.AspNetCore.Mvc.Dapr.EventBus package is used to subscribe to events.

See the documentation to learn more.

C# API Client Proxies Integration

ABP can dynamically or statically generate proxy classes to invoke your HTTP APIs from a Dotnet client application.

The Volo.Abp.Http.Client.Dapr package configures the client-side proxy system, so it uses Dapr's service invocation building block for the communication between your applications.

See the documentation to learn more.

Distributed Lock

ABP provides a Distributed Locking abstraction to control access to a resource that's shared by multiple applications. Dapr also has a distributed lock building block.

The Volo.Abp.DistributedLocking.Dapr package makes ABP use Dapr's distributed locking system.

See the documentation to learn more.

Integration Services

Integration services was an idea to distinguish the application services that are built for inter-module (or inter-microservice) communication from the application services that are intended to be consumed from a user interface or a client application.

With ABP 7.0, now it is possible to mark an application service as an integration service using the [IntegrationService] attribute (that is defined in the Volo.Abp.Application.Services namespace). Example:

[IntegrationService]
public class ProductAppService : ApplicationService, IProductAppService
{
    // ...
}

If your application service has an interface, like IProductService, you can use it on the service interface:

[IntegrationService]
public interface IProductAppService : IApplicationService
{
    // ...
}

When you do that ABP takes the following actions by conventions:

  • If you use the Auto API Controllers feature, the URL prefix will be /integration-api/ instead of /api/. In this way, for example, you can prevent REST API calls to your integration services out of your API Gateway, in a microservice system, and don't authorize these services. You can also filter integration services (or non-integration services) while creating Auto API Controllers, using the ApplicationServiceTypes option of the ConventionalControllerSetting object.
  • Calls made to integration services are not audit logged by default, because they are intended to be used by other services. You can set IsEnabledForIntegrationServices to true in AbpAuditingOptions options class to enable audit logging for the integration services too.

Dynamic Permissions and Features

In ABP Framework, permissions and features are defined in the codebase of your application. Because of that design, it was hard to define permissions (and features) in different microservices and centrally manage all the permissions (and features) in a single admin application. To make that possible, we were adding project references for all the microservices' service contract packages from a single microservice, so it can know all the permissions (and features) and manage them. As a result, that permission manager microservice needs to be re-deployed whenever a microservice's permissions change.

With ABP 7.0, we've introduced the dynamic permissions and dynamic features systems. See the following figure:

dynamic-permissions.png

Here, Microservice 1 defines the permissions A and B, Microservice 2 defines the permissions C, D, E. The Permission Management microservice is used by the permission management UI and manages all the permissions of a user in the application.

Basically, in the solution with ABP 7.0, all microservices serialize their own permission definitions and write them into a shared database on their application startup (with a highly optimized algorithm). On the other hand, the permission management service can dynamically get these permission definitions from the database (it is also highly optimized to reduce database usage) and allow the UI to show and manage them for a user or role.

We will update the authorization and features documentation in next days to state the configuration, while it mostly works automatically.

If you want to know why we made all these decisions and what problems we've solved, you can watch Halil İbrahim Kalkan's "Authorization in a Distributed / Microservice System" talk in .NET Conf 2022.

External Localization Infrastructure

Localization was another problem in a microservice system, when each microservice try to define its own localization texts and you build a unified UI application.

The PR #13845 described what's done in details. Basically, you need to implement IExternalLocalizationStore to get localizations of other services. However, since the open-source ABP Framework doesn't provide a module for dynamic localization, we haven't implemented that out of the box. We may implement it for open-source if we get a considerable request from the community (you can upvote #13953).

We've implemented the external localization system in ABP Commercial's Language Management module and also applied it in the microservice startup template. See the ABP Commercial part of this blog post to know more.

Distributed Entity Cache Service

ABP introduces a distributed entity cache service with v7.0.

Assume that you have a Product entity (an aggregate root actually):

public class Product : AggregateRoot<Guid>
{
    public string Name { get; set; }
    public string Description { get; set; }
    public float Price { get; set; }
    public int StockCount { get; set; }
}

And you want to use caching for faster access to the products. You first should configure the dependency injection to register the IEntityCache service, in the ConfigureServices method of your module class:

context.Services.AddEntityCache<Product, Guid>();

Now, you can inject the IEntityCache<Product, Guid> service whenever you need:

public class ProductAppService : ApplicationService
{
    private readonly IEntityCache<Product, Guid> _productCache;

    public ProductAppService(IEntityCache<Product, Guid> productCache)
    {
        _productCache = productCache;
    }

    public async Task<ProductDto> GetAsync(Guid id)
    {
        var product = await _productCache.GetAsync(id);
        return ObjectMapper.Map<Product, ProductDto>(product);
    }
}

In this example, I assume that the object mapping is configured to map from Product to ProductDto.

Here, We've directly cached the Product objects. In that case, the Product class must be serializable (because it is serialized to JSON when saving in the distributed cache). That may not be possible in some scenarios and you may want to use another class to store the cache data. For example, we may want to use the ProductDto class instead of the Product class for the cache object. In this case, change the dependency injection configuration as below:

context.Services.AddEntityCache<Product, ProductDto, Guid>();

Then inject the IEntityCache<ProductDto, Guid> service instead of the IEntityCache<Product, Guid> service.

You can configure the cache duration by passing a DistributedCacheEntryOptions object to the AddEntityCache method:

context.Services.AddEntityCache<Product, ProductDto, Guid>(
    new DistributedCacheEntryOptions
    {
        SlidingExpiration = TimeSpan.FromMinutes(30)
    }
);

Default cache duration is 2 minutes with the AbsoluteExpirationRelativeToNow configuration.

Check this PR to see the implementation and additional notes.

Layout Hooks for Blazor UI

The Layout Hook System allows you to add code to some specific parts of the layout and all layouts of the themes provided by the ABP Framework implement these hooks.

This system was already implemented for MVC UI but not for Blazor UI. We announced in the previous blog post (ABP 6.0 Release Candidate blog post) that we were planning to implement it in version 7.0. And now, we are introducing the Layout Hook System for Blazor UI as planned within this version.

You can read the Blazor UI: Layout Hooks documentation if you want to use the Layout Hooks in your Blazor application and see the required configurations.

Improvements on eShopOnAbp

The following improvements have been made on the eShopOnAbp project within this version:

  • We've integrated Keycloak (an open-source identity and access management system) as the authentication server instead of the built-in authentication server (that was based on IdentityServer). See #12021 for more information.
  • The product detail page now uses CMS Kit's Rating and Comment features. See #11429 for more info.

Other News

  • ABP 7.0 introduces the AbpDistributedLockOptions for the main options class to configure the distributed locking. You can specify any name as the lock prefix by configuring the AbpDistributedLockOptions. See the documentation for more.

What's New with ABP Commercial 7.0?

We've also worked on ABP Commercial to align the features and changes made in the ABP Framework. The following sections introduce a few new features coming with ABP Commercial 7.0.

Microservice Solution Architectural Improvements

We've worked on the microservice startup solution to make it proper for more advanced scenarios and better service independencies. As a result, all the services are made independently deployable and flexible to define its own permissions, features and localization texts.

For the permissions and features part, we've applied ABP's new dynamic permission and feature systems that are explained above. For the localization texts, we'd implemented ABP's new external localization infrastructure (that was also explained above) in the Language Management Module.

If you want to build a new microservice solution with ABP 7.0, all these are pre-configured for you. Just create a new solution and focus on your own business code! You can also migrate your existing microservice solutions to take advantage of these new enhancements. You can follow this guide as a good way to see the changes you need to apply in your solutions.

Set the Tenant Admin's Password from Host

tenant-admin-password.gif

ABP Commercial's SaaS module now allows setting the tenant admin's password from the host side. You can set a new password to any tenant admin's password from the Tenants page if you are a host user of the system.

WeChat and Alipay Integrations for the Payment Module

payment-gateway-1.png

In this version, WeChat Pay and Alipay gateways have been added to the payment module. You can read the Payment Module documentation for configurations and more information.

Others

  • CMS Kit (Pro) Module: Contact Feature allows multiple (named) contact forms with this version. Now, you can add different contact forms on different pages (with different settings).
  • Saas Module: Allows host users to test the connection string of a tenant database on the UI.
  • Chat Module: Introduces permission for searching other users.

Community News

New ABP Community Posts

We thank you all. We thank all the authors for contributing to the ABP Community platform.

We were in the .NET Conf 2022

dotnef-conf-2022.jpg

Microsoft has released .NET 7.0 and celebrated it with a 3-days international online conference. Halil İbrahim Kalkan, the lead developer of ABP Framework attended .NET Conf 2022 on November 10, 2022. His topic was "Authorization in a Distributed / Microservice System". In this talk, he talked about permission-based authorization systems and their challenges in a distributed system. Then, gave solutions that are implemented in the open source ABP Framework.

You can watch his speech from 👉 here.

Community Talks 2022.9: .NET 7.0 & ABP 7.0

In this episode of ABP Community Talks, 2022.9; we'll talk about .NET 7.0 and ABP 7.0 with the ABP Core Team. We will dive into the features that came with .NET 7.0, how they are implemented in ABP 7.0, and the highlights in the .NET Conf 2022 with Halil İbrahim Kalkan, Alper Ebicoglu, Engincan Veske, Hamza Albreem and Bige Besikci Yaman.

Register to listen and ask your questions now 👉 https://kommunity.com/volosoft/events/abp-community-20229-net-70-abp-70-f9e8fb72 .

Conclusion

This version comes with some new features and a lot of enhancements to the existing features. You can see the Road Map documentation to learn about the release schedule and planned features for the next releases. Please try the ABP v7.0 RC and provide feedback to help us release a more stable version.

Thanks for being a part of this community!

2 comments

Leave Comment
User Avatar
nirmaldeol 1 year ago

has there any post of how-to seed dynamic permissions inside microservice project in mongo environment

User Avatar
hikalkan 1 year ago

Each microservice automatically seeds them. It doesn't change based on db provider. I mean it works same with Mongo as EF Core. So, You shouldn't need to see dynamic permissions. Please create an issue on the ABP Framework repository and write more details about your use case.

More From Engincanv

ABP.IO Platform 9.0 RC Has Been Published

ABP 9.0 release candidate has been released today. Read the blog post to learn all new features in details. Continue Reading

EngincanV October 2024

ABP.IO Platform 8.3 Final Has Been Released

ABP 8.3 stable version has been released today. Read the blog post to learn all new features in details. Continue Reading

EngincanV September 2024

New ABP Documentation System: Everything You Need In One Place 📣

We have combined the ABP (open-source) and ABP Commercial (paid) documents into a single, comprehensive resource. This unification brings you a bet... Continue Reading

EngincanV August 2024

ABP.IO Platform 8.3 RC Has Been Published

Today, we are happy to release ABP version 8.3 RC (Release Candidate). This blog post introduces the new features and important changes in this new... Continue Reading

EngincanV August 2024

Introducing the New ABP CLI

📢 We're excited to introduce the new ABP CLI after the announcement of the new unified ABP Platform. Continue Reading

EngincanV July 2024

ABP.IO Platform 8.2 Final Has Been Released

ABP Framework and ABP Commercial 8.2 versions have been released today. Continue Reading

EngincanV June 2024

ABP.IO Platform 8.2 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 8.2 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV May 2024

ABP.IO Platform 8.1 Final Has Been Released

ABP Framework and ABP Commercial 8.1 versions have been released today. Continue Reading

EngincanV April 2024

ABP.IO Platform 8.1 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 8.1 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV February 2024

ABP.IO Platform 8.0 Has Been Released Based on .NET 8.0

Today, ABP Framework and ABP Commercial 8.0 versions have been released based on .NET 8.0. Continue Reading

EngincanV December 2023

ABP.IO Platform 8.0 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 8.0 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV November 2023

ABP.IO Platform 7.4 Final Has Been Released

ABP Framework and ABP Commercial 7.4 versions have been released today. Continue Reading

EngincanV October 2023

Unleash the Power of ABP CMS Kit: A Dynamic Content Showcase

We're excited to introduce to you ABP's CMS Kit Module – a versatile module that empowers you to build your own dynamic content website with ease. ... Continue Reading

EngincanV September 2023

ABP.IO Platform 7.4 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 7.4 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV August 2023

ABP.IO Platform 7.3 Final Has Been Released

ABP Framework and ABP Commercial 7.3 versions have been released today. Continue Reading

EngincanV July 2023

ABP.IO Platform 7.3 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 7.3 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV June 2023

ABP.IO Platform 7.2 Final Has Been Released

ABP Framework and ABP Commercial 7.2 versions have been released today. Continue Reading

EngincanV May 2023

ABP.IO Platform 7.2 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 7.2 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV April 2023

ABP.IO Platform 7.1 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 7.1 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV February 2023

ABP.IO Platform 7.0 Final Has Been Released

ABP Framework and ABP Commercial 7.0 versions have been released today. Continue Reading

EngincanV January 2023

ABP.IO Platform 6.0 Final Has Been Released

ABP Framework and ABP Commercial 6.0 versions have been released today. Continue Reading

EngincanV October 2022

ABP.IO Platform 6.0 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 6.0 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV July 2022

ABP.IO Platform 5.3 Final Has Been Released

ABP Framework and ABP Commercial 5.3 versions have been released today. Continue Reading

EngincanV June 2022

ABP.IO Platform 5.3 RC Has Been Published

Today, we are happy to release the ABP Framework and ABP Commercial version 5.3 RC (Release Candidate). This blog post introduces the new features ... Continue Reading

EngincanV May 2022