Software Engineer
1 week ago, 109 views
1 week ago, 75 views
1 week ago, 1710 views
2 weeks ago, 219 views
3 weeks ago, 1128 views
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.
Follow the steps below to try version 7.0.0 RC today:
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
--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.
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:
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:
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.
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 (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.
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.
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.
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 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:
/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.IsEnabledForIntegrationServices
to true
in AbpAuditingOptions
options class to enable audit logging for the integration services too.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:
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.
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.
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.
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.
The following improvements have been made on the eShopOnAbp project within this version:
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.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.
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.
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.
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.
We thank you all. We thank all the authors for contributing to the ABP Community platform.
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.
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 .
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!
has there any post of how-to seed dynamic permissions inside microservice project in mongo environment
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.
ABP 9.0 release candidate has been released today. Read the blog post to learn all new features in details. Continue Reading
ABP 8.3 stable version has been released today. Read the blog post to learn all new features in details. Continue Reading
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
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
📢 We're excited to introduce the new ABP CLI after the announcement of the new unified ABP Platform. Continue Reading
ABP Framework and ABP Commercial 8.2 versions have been released today. Continue Reading
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
ABP Framework and ABP Commercial 8.1 versions have been released today. Continue Reading
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
Today, ABP Framework and ABP Commercial 8.0 versions have been released based on .NET 8.0. Continue Reading
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
ABP Framework and ABP Commercial 7.4 versions have been released today. Continue Reading
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
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
ABP Framework and ABP Commercial 7.3 versions have been released today. Continue Reading
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
ABP Framework and ABP Commercial 7.2 versions have been released today. Continue Reading
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
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
ABP Framework and ABP Commercial 7.0 versions have been released today. Continue Reading
ABP Framework and ABP Commercial 6.0 versions have been released today. Continue Reading
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
ABP Framework and ABP Commercial 5.3 versions have been released today. Continue Reading
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