diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index ddf9d1e4fc..fd8e1e358e 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -578,7 +578,7 @@ "CreatePostCoverInfo1": " Accepted file types : JPEG, JPG, PNG", "CreatePostCoverInfo2": " Max file size : 1 MB", "CreatePostCoverInfo3": " Image proportion : 16:9", - "CreatePostCoverInfo4": " Download a sample cover image ", + "CreatePostCoverInfo4": " Download a sample cover image ", "ThisExtensionIsNotAllowed": "This extension is not allowed.", "TheFileIsTooLarge": "The file is too large.", "GoToThePost": "Go to the Post", @@ -977,6 +977,8 @@ "UISupportExplanation": "ABP Framework itself is UI framework agnostic and can work with any UI framework. However, startup templates, module UIs and themes were not implemented for all UI frameworks. Check out the Getting Started document for the up-to-date list of UI options.", "MicroserviceSupport": "Does it support the microservice architecture?", "WhereCanIDownloadSourceCode": "Where can I download the source-code?", + "HowCanIUpgradeMyProjectToCommercialTemplate": "How can I upgrade my open-source project to the commercial PRO templates?", + "HowCanIUpgradeMyProjectToCommercialExplanation": "You can check out our documentation at Migrating from open source templates to upgrade your open-source projects to the paid PRO templates.", "ComputerLimitation": "How many computers can a developer login when developing ABP?", "ComputerLimitationExplanation": "We specifically permit {0} computers per individual/licensed developer. Whenever there is a need for a developer to develop ABP based products on a third machine, an e-mail should be sent to license@abp.io explaining the situation, and we will then make the appropriate allocation in our system.", "RefundPolicy": "Do you have a refund policy?", diff --git a/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/cover.png b/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/cover.png new file mode 100644 index 0000000000..2c1048c5ce Binary files /dev/null and b/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/cover.png differ diff --git a/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/post.md b/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/post.md new file mode 100644 index 0000000000..bc73c13210 --- /dev/null +++ b/docs/en/Community-Articles/2024-09-18-Blazor-9-New-Features/post.md @@ -0,0 +1,149 @@ +# ASP.NET Core Blazor 9.0 New Features Summary 🆕 + +In this article, I'll highlight .NET 9's Blazor updates and important features for ASP.NET Core 9.0. These features are based on the latest .NET 9 Preview 7. + +![Cover](cover.png) + +## .NET MAUI Blazor Hybrid App and Web App solution template + +There's a new solution template to create .**NET MAUI native** and **Blazor web client** apps. This new template allows to choose a Blazor interactive render mode, it uses a shared Razor class library to maintain the UI's Razor components. + +For more info: + +* [learn.microsoft.com > maui blazor web app tutorial](https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/maui-blazor-web-app?view=aspnetcore-9.0) +* [reddit.com/r/Blazor/comments/1dabyzk/net_8_blazor_hybrid_maui_app_web_hosting/](https://www.reddit.com/r/Blazor/comments/1dabyzk/net_8_blazor_hybrid_maui_app_web_hosting/) + + + +## A new middleware: `MapStaticAssets` + +This new middleware optimizes the delivery of static assets in any ASP.NET Core app, also for Blazor. Basically it compresses assets via [Gzip](https://datatracker.ietf.org/doc/html/rfc1952), [fingerprints](https://developer.mozilla.org/docs/Glossary/Fingerprinting) for all assets at build time with a Base64 and removes caches when Visual Studio Hot Reload (development time) is in action. + +For more info: + +* [learn.microsoft.com > optimizing static web assets](https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-9.0?view=aspnetcore-8.0#optimizing-static-web-asset-delivery) +* [learn.microsoft.com > fundamentals of static files](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-9.0#static-asset-middleware) + + + +## Simplifying the process of querying component states at runtime + +1. Finding the component's current execution location: This can be especially helpful for component performance optimization and debugging. +2. Verifying whether the component is operating in a dynamic environment by checking: This can be useful for parts whose actions vary according to how their surroundings interact. +3. Obtaining the render mode allocated to the component: Comprehending the render mode can aid in enhancing the rendering procedure and augmenting the component's general efficiency. + +For more info: + +* [learn.microsoft.com > detect rendering location interactivity & render mode runtime](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-9.0#detect-rendering-location-interactivity-and-assigned-render-mode-at-runtime) + + + +## Detecting component's location, interactivity support and render mode + +The `ComponentBase.RendererInfo` and `ComponentBase.AssignedRenderMode` now allows to detect the following actions: + +* `RendererInfo.Name` returns the location where the component is executing +* `RendererInfo.IsInteractive` indicates if the component supports interactivity at the time of rendering. +* `ComponentBase.AssignedRenderMode` exposes the component's assigned render mode + + + +## Better server-side reconnection + +* When the previous app is disconnected and the user navigates to this app, or browser put this app in sleep mode, Blazor runs reconnection mechanism. + +* When reconnection is not successful because your server killed connection, it automatically makes a full page refresh. + +* With the new below config, you can adjust your reconnection retry time: + + * ```csharp + Blazor.start({ + circuit: { + reconnectionOptions: { + retryIntervalMilliseconds: (previousAttempts, maxRetries) => + previousAttempts >= maxRetries ? null : previousAttempts * 1000 + }, + }, + }); + ``` + + + +## Simple serialization for authentication + +The new APIs in ASP.NET make it easier to add authentication to existing Blazor Web Apps. These APIs, now part of the Blazor Web App project template, allow authentication state to be serialized on the server and deserialized in the browser, simplifying the process of integrating authentication. This removes the need for developers to manually implement or copy complex code, especially when using WebAssembly-based interactivity. + +For more info: + +- [learn.microsoft.com > blazor Identity UI individual accounts](https://learn.microsoft.com/en-us/aspnet/core/blazor/security/server/?view=aspnetcore-9.0#blazor-identity-ui-individual-accounts) +- [learn.microsoft.com > manage authentication state](https://learn.microsoft.com/en-us/aspnet/core/blazor/security/server/?view=aspnetcore-9.0#manage-authentication-state-in-blazor-web-apps) + + + +## Easily add static server-side rendering pages + +With .NET 9, adding static server-side rendering (SSR) pages to globally interactive Blazor Web Apps has become simpler. The new `[ExcludeFromInteractiveRouting]` attribute allows developers to mark specific Razor component pages that require static SSR, such as those relying on HTTP cookies and the request/response cycle. Pages annotated with this attribute exit interactive routing and trigger a full-page reload, while non-annotated pages default to interactive rendering modes like `InteractiveServer`. This approach enables flexibility between static and interactive rendering depending on the page's requirements. + +For more info: + +* [learn.microsoft.com > render-modes](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-9.0#static-ssr-pages-in-a-globally-interactive-app) + + + +## Constructor Injection in Razor Components + +Razor components support constructor injection, allowing services like `NavigationManager` to be injected directly into a component's constructor. This can be used to manage navigation actions, such as redirecting the user upon an event like a button click. + +For more info: + +* [learn.microsoft.com> dependency-injection](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/dependency-injection?view=aspnetcore-9.0#request-a-service-in-a-component) + + + +## Configuring WebSocket Compression and Frame-Ancestors CSP in Interactive Server Components + +By default, Interactive Server components enable WebSocket compression and set a `frame-ancestors` Content Security Policy (CSP) to `self`, restricting embedding the app in `