Browse Source

Abp-4_0-Blazor.md updates

pull/6139/head
Halil İbrahim Kalkan 6 years ago
parent
commit
2613d02467
  1. 9
      docs/en/Blog-Posts/2020-11-12 v4_0_Preview/POST.md
  2. 48
      docs/en/Migration-Guides/Abp-4_0-Blazor.md

9
docs/en/Blog-Posts/2020-11-12 v4_0_Preview/POST.md

@ -52,6 +52,15 @@ Removed JQuery & Bootstrap JavaScript dependencies for the Blazor UI.
>There are some other changes in the startup template and some public APIs. Follow the [Migration Guide](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0) to apply changes for existing solutions that you're upgrading from the version 3.3. While we will continue to make improvements add new features, we no longer make breaking changes on the existing APIs until the version 5.0. >There are some other changes in the startup template and some public APIs. Follow the [Migration Guide](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0) to apply changes for existing solutions that you're upgrading from the version 3.3. While we will continue to make improvements add new features, we no longer make breaking changes on the existing APIs until the version 5.0.
#### Others
A lot of minor and major improvements have been done for the Blazor UI. Some of them are listed below:
* Implemented `IComponentActivator` to resolve the component from the `IServiceProvider`. So, you can now inject dependencies into the constructor of your razor component.
* Introduced the `AbpComponentBase` base class that you derive your components from. It has useful base properties that you can use in your pages/components.
* Introduced `IUiNotificationService` service to show toast notifications on the UI.
* Improved the `IUiMessageService` to show message & confirmation dialogs.
### System.Text.Json ### System.Text.Json
ABP Framework 4.0 uses the System.Text.Json by default as the JSON serialization library. It, actually, using a hybrid approach: Continues to use the Newtonsoft.Json when it needs to use the features not supported by the System.Text.Json. ABP Framework 4.0 uses the System.Text.Json by default as the JSON serialization library. It, actually, using a hybrid approach: Continues to use the Newtonsoft.Json when it needs to use the features not supported by the System.Text.Json.

48
docs/en/Migration-Guides/Abp-4_0-Blazor.md

@ -2,15 +2,55 @@
## Startup Template Changes ## Startup Template Changes
### wwwroot/index.html
There are some changes made in the index.html file;
* Removed JQuery & Bootstrap JavaScript dependencies
* Replaced Bootstrap and FontAwesome imports with local files instead of CDN usages.
* Re-arranged some ABP CSS file locations.
* Introduced the `abp bundle` CLI command to manage global Style/Script file imports.
Follow the steps below to apply the changes;
1. Remove all the `<link...>` elements and replace with the following comment tags:
````html
<!--ABP:Styles-->
<!--/ABP:Styles-->
````
2. Remove all the `<script...>` elements and replace with the following comment tags:
````html
<!--ABP:Scripts-->
<!--/ABP:Scripts-->
````
3. Execute the following command in a terminal in the root folder of the Blazor project (`.csproj`) file (ensure that you're using the ABP CLI version 4.0):
````bash
abp bundle
````
This will fill in the `Styles` and `Scripts` tags based on the dependencies.
### The Root Element
This change is optional but recommended.
* Change `<app>...</app>` to `<div id="ApplicationContainer">...</div>` in the `wwwroot/index.html`. * Change `<app>...</app>` to `<div id="ApplicationContainer">...</div>` in the `wwwroot/index.html`.
* Change `builder.RootComponents.Add<App>("app");` to `builder.RootComponents.Add<App>("#ApplicationContainer");` in the *YourProjectBlazorModule.cs*.
## AbpCrudPageBase Changes ## AbpCrudPageBase Changes
- `OpenEditModalAsync` method requires `EntityDto` instead of id (`Guid`) parameter. If you've derived your pages from the `AbpCrudPageBase` class, then you may need to apply the following changes;
- `DeleteEntityAsync` method doesn't display confirmation dialog anymore. You can use the new `EntityActions` component in DataGrids to show confirmation messages. You can also inject `IUiMessageService` to your page or component and call `ConfirmAsync` explicitly.
- Added `GetListInput`. - `OpenEditModalAsync` method gets `EntityDto` instead of id (`Guid`) parameter. Pass `context` instead of `context.Id`.
- `DeleteEntityAsync` method doesn't display confirmation dialog anymore. You can use the new `EntityActions` component in Data Grids to show confirmation messages. You can also inject `IUiMessageService` to your page or component and call the `ConfirmAsync` explicitly.
- Added `GetListInput` as a base property that is used to filter while getting the entities from the server.
## Others ## Others
- Refactored namespaces for some Blazor components ([#6015](https://github.com/abpframework/abp/issues/6015)). - Refactored namespaces for some Blazor components ([#6015](https://github.com/abpframework/abp/issues/6015)).
- Remove Async Suffix from IUiMessageService ([#6123](https://github.com/abpframework/abp/pull/6123)). - Removed Async Suffix from IUiMessageService ([#6123](https://github.com/abpframework/abp/pull/6123)).
Loading…
Cancel
Save