ABP.IO Platform v4.2 RC Has Been Released!

User Avatar
3 years ago, 7532 views, 1 comments
Cover Image

Today, we have released the ABP Framework and the ABP Commercial 4.2.0 RC (Release Candidate). This blog post introduces the new features and important changes in this new version.

The planned release date for the 4.2.0 final version is January 28, 2021.

Get Started with the 4.2 RC

If you want to try the version 4.2.0 today, follow the steps below;

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

or install if you haven't installed before:

dotnet tool install Volo.Abp.Cli -g --version 4.2.0-rc.2
  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 Direct Download tab on the Get Started page by selecting the Preview checkbox.

Migration Guide

Check the migration guide for the applications with the version 4.x upgrading to the version 4.2.

What's new with the ABP Framework 4.2

104887532-78a79f00-597c-11eb-956a-2e9b77851f23.png

IRepository.GetQueryableAsync()

This version comes with an important change about using IQueryable features over the repositories. It is suggested to read this section carefully and apply in your applications.

IRepository interface inherits IQueryable, so you can directly use the standard LINQ extension methods, like Where, OrderBy, First, Sum... etc.

Example: Using LINQ directly over the repository object

public class BookAppService : ApplicationService, IBookAppService
{
    private readonly IRepository<Book, Guid> _bookRepository;

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

    public async Task DoItInOldWayAsync()
    {
        //Apply any standard LINQ extension method
        var query = _bookRepository
            .Where(x => x.Price > 10)
            .OrderBy(x => x.Name);

        //Execute the query asynchronously
        var books = await AsyncExecuter.ToListAsync(query);
    }
}

See the documentation if you wonder what is the AsyncExecuter.

Beginning from the version 4.2, the recommended way is using IRepository.GetQueryableAsync() to obtain an IQueryable, then use the LINQ extension methods over it.

Example: Using the new GetQueryableAsync method

public async Task DoItInNewWayAsync()
{
    //Use GetQueryableAsync to obtain the IQueryable<Book> first
    var queryable = await _bookRepository.GetQueryableAsync();

    //Then apply any standard LINQ extension method
    var query = queryable
        .Where(x => x.Price > 10)
        .OrderBy(x => x.Name);

    //Finally, execute the query asynchronously
    var books = await AsyncExecuter.ToListAsync(query);
}

ABP may start a database transaction when you get an IQueryable (If current Unit Of Work is transactional). In this new way, it is possible to start the database transaction in an asynchronous way. Previously, we could not get the advantage of asynchronous while starting the transactions.

The new way has a significant performance and scalability gain. The old usage (directly using LINQ over the repositories) will be removed in the next major version. You have a lot of time for the change, but we recommend to immediately take the action since the old usage has a big scalability problem.

See the migration guide for the actions you may need to take while upgrading your applications.

About IRepository Async Extension Methods

Using IRepository Async Extension Methods has no such a problem. The examples below are pretty fine:

var countAll = await _personRepository
    .CountAsync();

var count = await _personRepository
    .CountAsync(x => x.Name.StartsWith("A"));

var book1984 = await _bookRepository
    .FirstOrDefaultAsync(x => x.Name == "John");   

See the repository documentation to understand the relation between IQueryable and asynchronous operations.

Repository Bulk Operations

This version adds the following methods to the repositories:

  • InsertManyAsync
  • UpdateManyAsync
  • DeleteManyAsync

The purpose of these methods to insert, update or delete many entities in one call with a better performance.

Currently, MongoDB provider implements these methods as a single bulk operation since MongoDB API natively supports. But current Entity Framework Core implementation is not a real bulk operation. Instead, it does its best with the native API of the EF Core. If you want to implement in a more performant way, you can customize the bulk operations with your own implementation or by using a library. We could find a good open source library for EF Core 5.0 to implement it.

Selecting DBMS on Template Creation

ABP CLI now has an option to specify the DBMS when you use EF Core as the database provider.

Example: Select MySQL as the DBMS

abp new BookStore -dbms mysql --preview

Available options: SqlServer (default), MySQL, SQLite, Oracle-Devart, PostgreSQL. See the documentation to use any other DBMS or switch the DBMS later.

One change related to this feature is that: Now, the startup template doesn't come with an initial migration file. This is because the database migrations are different based on your DBMS preference and should be re-created. However, when you first run the .DbMigrator application, it will create the initial migration and create the database just like before.

See The Initial Migration section in the Getting Started document if you have problems on running the .DbMigrator application first time.

Swagger UI Login / Authorization

Testing the swagger UI was requiring some additional work, especially your authentication server is separated from the application that hosts the Swagger UI.

With the version 4.2, the startup templates come with the authorization pre-configured for you. An Authorize button is available when you open the Swagger UI:

swagger-authorize.png

When you click, it opens a modal to authorize:

swagger-authorize-modal.png

When you click to the Authorize button here, you are redirected to the login page to login with your username and password (default username is admin and password is 1q2w3E*).

Remember to select the Scopes (typically select all) you want to use before clicking to the Authorize button.

Angular Unit Testing

We've improved the modules and the startup template to setup and write unit tests easier with the Angular UI. See the Angular Unit Testing document for details.

Other News

  • Improved HTTP request-response performance by resolving dependencies in a deferred way in the action/page filters, interceptors and some other services.
  • Removed MultipleActiveResultSets from connection strings for new templates for SQL Server, since the new EF Core gives a warning when using it. If you want to use it, you need to change the connection string yourself.
  • Added HardDeleteAsync extension method that takes a predicate to delete multiple entities. This extension method is available if the entity Soft Delete.
  • Implemented the Page Alerts for the Angular UI.
  • Implemented Page Progress for the Blazor UI. It automatically shows an undetermined progress bar on top of the page while performing an AJAX request. It also proves an API to you if you need to show/hide the progress bar in your code.

What's new with the ABP Commercial 4.2

104887528-780f0880-597c-11eb-8da4-cf008bd37c66.png

Microservice Startup Template

The new Microservice Startup Template is a generic solution to start a new microservice solution.

While we accept that every microservice solution will be different and every system has its own design requirements and trade-offs, we believe such a startup solution is a very useful starting point for most of the solutions, and a useful example for others.

microservice-template-diagram.png

Figure: A simplified overall diagram of the microservice solution.

You can follow the documentation to get started with this startup template. This template should be considered as an early release. We will improve it and write a lot of guides.

If you want to use the ABP Suite to create your solution, then you need to first upgrade it:

abp suite update --preview

If you want, you can directly create a new solution from the command line:

abp new Volosoft.MyMicroserviceSystem -t microservice-pro --preview

Company Name is optional. Solution name could be MyMicroserviceSystem for this example.

Public Website in the Startup Templates

As mentioned in the previous release post, we've added a Public Website application to the startup templates. It is configured to authenticate through the IdentityServer with a single sign-on system.

You can use this application to create a landing page for your actual application or a corporate website for your business. An example screenshot:

public-website.jpg

It uses the same Lepton Theme, so you can apply all the styles. The Public Website has a different layout and also has a different setting for the styling (that can be configured in the Settings / Lepton Theme page of the main web application).

Public Website is optional and you need to select the "Public Website" option while creating a new solution using the ABP Suite, or use the --with-public-website option while using the abp new CLI command.

Easy CRM Blazor UI

Easy CRM is an example application built with the ABP Commercial. MVC (Razor Pages) and Angular UI implementations were already provided. With the version 4.2, we are providing the Blazor UI implementation for this application.

easy-crm.png

Other News

  • Implemented Iyzico as a payment gateway provider for the payment module in addition to Paypal, Stripe, 2Checkout and Payu providers.
  • ABP Suite supports the new microservice template creation, public website and DBMS selection options.
  • Swagger authorization and other features mentioned in the ABP Framework section are already implemented for the ABP Commercial too.

ABP Community News

Sharing Video Contents

community.abp.io is a place to share ABP related contents. It started with publishing articles. Now, it supports to publish video contents. See this example. All you need to do is to create a video and upload to YouTube. Then you can submit the YouTube link to the ABP Community website.

Multi-language support

We planned ABP Community to publish English-only contents. However, we see that people want to share contents in other languages too. Now, it is possible to submit a content in any language. Just select the Language option while submitting your content.

When you submit a non-English content, it is not visible to all the visitors by default. Visitors can see a non-English content only if their browser language or the selected language matches to the content language (there is a language selection at the end of the website).

External Contents

If you want to publish your content anywhere else, but want to post a link of your content, you can select External Content option while submitting the post. For example, this article is an external article and also written in Chinese language.

About the Next Release

The next feature version will be 4.3.0. It is planned to release the 4.3 RC (Release Candidate) on March 11 and the final version on March 25, 2021.

We decided to slow down the feature development for the next milestone. We will continue to improve the existing features and introduce new ones, sure, but wanted to have more time for the planning, documentation, creating guides and improving the development experience.

Feedback

Please check out the ABP Framework 4.2.0 RC and provide feedback to help us to release a more stable version. The planned release date for the 4.2.0 final version is January 28, 2021.

abp

1 comments

Leave Comment
User Avatar
936016093@qq.com 3 years ago

👍

More From Hikalkan

Announcing ABP Studio (beta) General Availability

ABP Studio (beta) is generally available to everyone and ready for download. Continue Reading

hikalkan July 2024

Unifying the ABP Platform

Some big changes and improvements are coming to the ABP.IO Platform soon Continue Reading

hikalkan April 2024

ABP.IO Platform 7.1 Final Has Been Released

Introducing the ABP.IO Platform version 7.1! Continue Reading

hikalkan March 2023

ABP.IO Platform 5.2 Final Has Been Released

Introducing the ABP.IO Platform version 5.2.0! Continue Reading

hikalkan April 2022

ABP.IO Platform 5.2 RC Has Been Published

Introducing the new features and changes coming with ABP Framework and ABP Commercial version 5.2. Continue Reading

hikalkan March 2022

ABP.IO Platform v5.1 Has Been Released

Introducing the new features and changes coming with ABP Framework and ABP Commercial version 5.1. Continue Reading

hikalkan January 2022

ABP.IO Platform 5.0 RC.1 Has Been Released

Introducing the ABP v5.0 RC and the new features coming with this version. Continue Reading

hikalkan November 2021

ABP.IO Platform 4.4 Final Has Been Released!

ABP Framework and ABP Commercial 4.4 versions have been released. Continue Reading

hikalkan August 2021

ABP Platform 4.4 RC Has Been Released

This post covers the new features and changes coming with the ABP.IO platform version 4.4. Continue Reading

hikalkan June 2021

ABP.IO Platform v4.3 Has Been Released!

Introducing the ABP.IO Platform version 4.3.0! Continue Reading

hikalkan April 2021

ABP Commercial 4.3 RC Has Been Published

Introducing the ABP Commercial v4.3 RC and the new features coming with this version Continue Reading

hikalkan April 2021

ABP Framework 4.3 RC Has Been Published

Introducing the ABP v4.3 RC and the new features coming with this version Continue Reading

hikalkan April 2021

ABP.IO Platform 4.2 Final Has Been Released!

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

hikalkan January 2021

ABP.IO Platform v4.1 Final Has Been Released!

ABP Framework and ABP Commercial 4.1 versions have been released. Continue Reading

hikalkan January 2021

ABP.IO Platform v4.1 RC Has Been Released!

Released ABP.IO Platform v4.1 RC. Some new features: Module Entity Extensions, Blazor UI Improvements, Spanish Language Translation etc. Learn more... Continue Reading

hikalkan December 2020

ABP.IO Platform 4.0 with .NET 5.0 in the 4th Year!

Released ABP.IO Platform v4.0 Final. Some new features: Migrated to .NET 5.0, Stable Blazor UI, Identity Server 4 Upgrade, Moved to System.Text.Jso... Continue Reading

hikalkan December 2020

ABP.IO Platform v4.0 RC Has Been Released based on .NET 5.0!

Released ABP.IO Platform v4.0 RC. Some new features: Migrated to .NET 5.0, Stable Blazor UI, Identity Server 4 Upgrade, Moved to System.Text.Json, ... Continue Reading

hikalkan November 2020

ABP Framework & ABP Commercial 3.3 Final Have Been Released

Released ABP v3.3. Some new features: New modules & features for the Blazor UI, Automatic Validation for AntiForgery Token for HTTP APIs, Rebus Int... Continue Reading

hikalkan October 2020

ABP Framework & ABP Commercial v3.3 RC Have Been Released

Released ABP v3.3 RC. Some new features: New modules & features for the Blazor UI, Automatic Validation for AntiForgery Token for HTTP APIs, Rebus ... Continue Reading

hikalkan October 2020

ABP Framework v3.2 Final Has Been Released

Released ABP v3.2 final. Some new features: The Blazor UI, MongoDB ACID Transactions, Kafka Integration for the Distributed Event Bus etc. Learn mo... Continue Reading

hikalkan October 2020

ABP Framework & ABP Commercial 3.2 RC With The New Blazor UI 🚀

Released ABP v3.2 RC. Some new features: The Blazor UI, MongoDB ACID Transactions, Kafka Integration for the Distributed Event Bus etc. Learn more ... Continue Reading

hikalkan September 2020

Introducing the Angular Service Proxy Generation

ABP Framework has introduced the new Angular Service Proxy Generation system with the version 3.1. This post introduces the service proxy generatio... Continue Reading

hikalkan September 2020

ABP Framework v3.1 Final Has Been Released

Released ABP v3.1 final. Some new features: Angular Service Proxies, Authorization Code Flow for the Angular UI, Global Feature System etc. Learn m... Continue Reading

hikalkan September 2020

ABP Framework v3.1 RC Has Been Released

Released ABP v3.1 RC. Some new features: Angular Service Proxies, Authorization Code Flow for the Angular UI, Global Feature System etc. Learn more... Continue Reading

hikalkan August 2020

ABP Framework v3.0 Has Been Released

Released ABP v3.0. Some new features: Angular 10, The Oracle Integration Package, Azure BLOB Storage Provider etc. Learn more about what's new with... Continue Reading

hikalkan July 2020

ABP Framework v2.9.0 Has Been Released

Released ABP v2.9.0. Some new features: Organization Units System, Blob Storing Package, EF Core Oracle Integration Package, Chat Module Angular UI... Continue Reading

hikalkan June 2020

ABP v2.8.0 Releases & Road Map

Released ABP Framework and ABP Commercial v2.8. Some new features: SignalR Integration Package, RTL Support for the MVC UI, New Lepton Theme Styles... Continue Reading

hikalkan May 2020

ABP Framework v2.7.0 Has Been Released!

Released ABP Framework v2.7. Some new features: Object Extending System, Text Templating Package, Subscribing to the Exceptions etc. Learn more abo... Continue Reading

hikalkan May 2020

ABP Framework v2.3.0 Has Been Released!

Released ABP Framework v2.3. Some new features: React Native Mobile App, Angular TypeScript Proxy Generator, CRUD app service etc. See the GitHub m... Continue Reading

hikalkan March 2020

ABP Framework v2.0 and the ABP Commercial

Released ABP Framework v2.0 and ABP Commercial. See the release notes for changes. Create a demo to see application startup template of ABP Commerc... Continue Reading

hikalkan January 2020

ABP v1.0 Has Been Finally Released

Released the first stable ABP v1.0, after ~3 years of continuous development! Start playing with the new ABP framework now. See the GitHub mileston... Continue Reading

hikalkan October 2019

ABP v0.21 Has Been Released based on the ASP.NET Core 3.0

Released ABP v0.21 with no new feature. The release is just upgrade to the stable AspNet Core 3.0. Check v0.20 release notes for new features, and ... Continue Reading

hikalkan September 2019

ABP v0.19 Release With New Angular UI

Released ABP v0.19 with 90+ issues resolved and 650+ commits pushed. Some new features: Angular UI, Widget System. See the roadmap for all upcomings. Continue Reading

hikalkan August 2019

ABP CLI, New Templates & Features v0.18 Release

Released ABP v0.18 with 80+ issues resolved and 550+ commits pushed. Changes: ABP CLI command line tool, and new startup templates. See the roadmap... Continue Reading

hikalkan June 2019

Microservice Demo, Projects Status and Road Map

See microservice solution demo documentation for a detailed explanation of the solution. It aims to demonstrate a simple yet complete microservice ... Continue Reading

hikalkan February 2019