@ -0,0 +1,60 @@ |
|||||
|
# .NET Conf China 2025: Changing the World, Changing Ourselves - See You Again in Shanghai |
||||
|
|
||||
|
 |
||||
|
|
||||
|
.NET Conf China 2025 is an annual community event for developers, celebrating the release of .NET 10 (LTS) and the achievements of the past year in China. As an extension of .NET Conf 2025, this event brings together local tech communities, well-known companies, and open-source organizations. It has become the largest .NET online and offline conference in China, dedicated to spreading .NET technology in Chinese and fostering collaboration and exchange. |
||||
|
|
||||
|
## Event Highlights: Key Topics and Takeaways |
||||
|
|
||||
|
This year’s conference focused on three main themes: performance improvements, AI integration, and cross-platform development. Topics covered how to achieve performance gains while maintaining engineering quality, balancing between multi-platform consistency and native capabilities, and taking generative AI from “demo-level” to “production-ready.” On the community and ecosystem side, the event showcased the .NET Foundation’s and domestic and international companies’ progress in supporting architectures like ARM, LoongArch, and RISC-V. It also highlighted best practices in DevOps, observability, and engineering toolchains, creating a complete path from ideas to implementation. |
||||
|
|
||||
|
### Opening Keynote |
||||
|
|
||||
|
Scott Hanselman kicked off .NET Conf China 2025 with a video keynote, announcing that .NET 10 is now available on the official website. He framed the release around four pillars—AI, cloud-native, cross-platform, and performance—including integration with the Microsoft Agent Framework for building and orchestrating multi-agent systems in .NET/C#, industry-leading container and Kubernetes support with .NET Aspire simplifying local containerized development, a richer cross-platform desktop ecosystem (.NET MAUI, Avalonia, Uno Platform), and major performance gains such as Native AOT and single-file publishing for faster startup and easier distribution across platforms. |
||||
|
|
||||
|
He underscored China’s importance as .NET’s second-largest market, with roughly 13% of users, and noted that generative AI usage in China has doubled in 2025. The local community is seeing strong momentum around ML.NET, .NET Aspire, and the C# Dev Kit in VS Code. Reflecting on his Baby Smash game written 20 years ago, which now runs cross-platform on .NET 10, he called on developers to modernize: move existing Web, WinForms, and WPF apps to the cloud, improve performance, ship as a single executable, and weave in AI capabilities. |
||||
|
|
||||
|
On AI, he emphasized a human-centered stance: AI and agents should augment, not replace, developers. In the future, developers will orchestrate and govern agents, and human judgment will matter more than ever. He closed by thanking the open-source community for its many proposals and pull requests, stressing that .NET is an open-source platform built together by Microsoft and the community, and wishing everyone an inspiring conference and a joyful journey with .NET 10. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Roundtable Discussion |
||||
|
|
||||
|
The roundtable discussion, titled “Empowering with AI, Breaking Through Cross-Platform Barriers, and Ecosystem Innovation,” focused on practical implementation. It explored typical paths for large models and intelligent agents in enterprises, key considerations for choosing cross-platform UI frameworks, and the evolution of these frameworks. Panelists discussed questions like: How can AI capabilities be integrated into existing business processes instead of creating an “experimental” pipeline? How should cross-platform solutions be evaluated in terms of performance, ecosystem, and team skillsets? What are the unique opportunities for domestic ecosystems in the global tech landscape? And how can community collaboration help developers quickly adopt best practices? A shared consensus emerged: in the short term, focus on running scenarios; in the long term, return to engineering fundamentals. Both toolchains and methodologies are equally important. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### In-Depth Sessions |
||||
|
|
||||
|
The afternoon featured four breakout sessions, covering a wide range of topics with deep dives into both foundational technologies and real-world project reviews: |
||||
|
|
||||
|
- **Frontend and Cross-Platform:** Focused on the progress of Avalonia, Blazor, and WebAssembly, as well as the integrated experience of .NET Aspire in multi-service applications. Speakers shared insights on reusing core logic between desktop and web, shortening cold start times with incremental compilation and resource trimming, and performance profiling and optimization in WASM scenarios. |
||||
|
- **AI Agents and Enterprise Adoption:** Discussed multi-agent orchestration, the MCP plugin ecosystem, and enterprise data compliance. From common pitfalls of “demo-level” AI to the “five-step method” for moving from POC to production, the session covered use cases like knowledge retrieval, process automation, intelligent customer service, and developer assistants, emphasizing evaluation metrics, prompt engineering, and monitoring governance. |
||||
|
- **.NET Practices and Engineering:** Focused on the latest capabilities and performance practices of EF Core, the boundaries of NativeAOT, automated testing strategies, and observability implementation. Discussions included database migration strategies, caching and concurrency control for hot paths, end-to-end tracing, and structured logging. |
||||
|
- **Solutions and Case Studies:** From Clean Architecture/DDD to AI-powered business evolution, topics included application modernization, SaaS transformation, and edge-cloud collaboration in AIoT. Speakers broke down modular governance, team collaboration, and release strategies for complex systems, putting “delivering value continuously” at the center stage. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## ABP Booth Highlights: Showcases, Conversations, and Fun |
||||
|
|
||||
|
The story of ABP began with a promise to create a better starting point. From the frustration of “copy-pasting boilerplate code,” we crafted a modular, opinionated framework. We chose open source and community collaboration. We founded Volosoft to turn our vision into reality with professional tools. Today, tens of thousands of developers explore the ABP framework, and thousands of teams rely on the ABP platform to deliver production-grade .NET applications faster and more securely. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
At .NET Conf China 2025, we brought our “developer platform built for developers” to every visitor. Our booth demonstrations started with “a production-ready skeleton from the start”: modular layered architecture, built-in authentication and authorization systems, multi-tenancy support, audit logging, and localization—all out of the box. On the frontend and backend, ABP offers diverse options like MVC, Blazor, and Angular, enabling teams to quickly implement solutions on familiar stacks while maintaining flexibility for future evolution. We also showcased how ABP integrates with containerization, CI/CD, and observability, emphasizing “engineering built into the framework, not reinvented by every team.” |
||||
|
|
||||
|
 |
||||
|
|
||||
|
**Interaction and Prizes:** Sharing technology should also be warm and engaging. We hosted a QR code raffle at the booth, with prizes including ABP stickers, the book *Mastering ABP Framework*, and Bluetooth headphones. Multiple rounds of raffles and group photos made the interactions more memorable. Many developers shared their ABP experiences and plans for improvement right at the booth, and a few impromptu “code walkthroughs” naturally happened. The love and joy for technology were captured in every handshake and discussion. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Looking Ahead: Building the Ecosystem Together |
||||
|
|
||||
|
From an open-source journey to a complete development platform for the future, we’ve always believed that developers deserve a better starting point. Around performance, intelligence, and cross-platform capabilities, we will continue investing in engineering, ecosystem collaboration, and best practice sharing. We also welcome more partners to contribute through documentation and examples, share your experiences, and submit your ideas. Together, let’s make “useful infrastructure” more stable, efficient, and business-friendly. |
||||
|
|
||||
|
We look forward to exchanging ideas, sharing practices, and building the ecosystem together at the next gathering. Technology meets creativity, and the possibilities are endless. We’re on the road and waiting for you at the next event. |
||||
|
|
||||
|
See you next year at .NET Conf China 2026! |
||||
|
|
||||
|
 |
||||
|
After Width: | Height: | Size: 396 KiB |
|
After Width: | Height: | Size: 502 KiB |
|
After Width: | Height: | Size: 432 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 524 KiB |
|
After Width: | Height: | Size: 378 KiB |
|
After Width: | Height: | Size: 671 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 103 KiB |
@ -0,0 +1,280 @@ |
|||||
|
```json |
||||
|
//[doc-seo] |
||||
|
{ |
||||
|
"Description": "Learn how to configure Server-Side Rendering (SSR) for your Angular application in the ABP Framework to improve performance and SEO." |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
# SSR Configuration |
||||
|
|
||||
|
[Server-Side Rendering (SSR)](https://angular.io/guide/ssr) is a process that involves rendering pages on the server, resulting in initial HTML content that contains the page state. This allows the browser to show the page to the user immediately, before the JavaScript bundles are downloaded and executed. |
||||
|
|
||||
|
SSR improves the **performance** (First Contentful Paint) and **SEO** (Search Engine Optimization) of your application. |
||||
|
|
||||
|
## 1. Install ABP Angular SSR |
||||
|
|
||||
|
The ABP Framework provides a schematic to easily add SSR support to your Angular application. |
||||
|
|
||||
|
Run the following command in the root folder of your Angular application: |
||||
|
|
||||
|
```shell |
||||
|
yarn ng generate @abp/ng.schematics:ssr-add |
||||
|
``` |
||||
|
|
||||
|
Alternatively, you can specify the project name if you have a multi-project workspace: |
||||
|
|
||||
|
```shell |
||||
|
yarn ng generate @abp/ng.schematics:ssr-add --project MyProjectName |
||||
|
``` |
||||
|
|
||||
|
This command automates the setup process by installing necessary dependencies, creating server-side entry points, and updating your configuration files. |
||||
|
|
||||
|
## 2. What Changes? |
||||
|
|
||||
|
When you run the schematic, it performs the following actions: |
||||
|
|
||||
|
### 2.1. Dependencies |
||||
|
|
||||
|
It adds the following packages to your `package.json`: |
||||
|
|
||||
|
- **express**: A minimal and flexible Node.js web application framework. |
||||
|
- **@types/express**: Type definitions for Express. |
||||
|
- **openid-client**: A library for OpenID Connect (OIDC) relying party (RP) implementation, used for authentication on the server. |
||||
|
|
||||
|
```json |
||||
|
{ |
||||
|
"dependencies": { |
||||
|
"express": "^4.18.2", |
||||
|
"openid-client": "^5.6.4" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@types/express": "^4.17.17" |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
**For Webpack projects only:** |
||||
|
- **browser-sync** (Dev dependency): Used for live reloading during development. |
||||
|
|
||||
|
### 2.2. Scripts & Configuration |
||||
|
|
||||
|
The changes depend on the builder used in your project (Application Builder or Webpack). |
||||
|
|
||||
|
#### Application Builder (esbuild) |
||||
|
|
||||
|
If your project uses the **Application Builder** (`@angular/build:application`), the schematic: |
||||
|
|
||||
|
- **Scripts**: Adds `serve:ssr:project-name` to serve the SSR application. |
||||
|
- **angular.json**: Updates the `build` target to enable SSR (`outputMode: 'server'`) and sets the SSR entry point. |
||||
|
|
||||
|
```json |
||||
|
{ |
||||
|
"projects": { |
||||
|
"MyProjectName": { |
||||
|
"architect": { |
||||
|
"build": { |
||||
|
"options": { |
||||
|
"outputPath": "dist/MyProjectName", |
||||
|
"outputMode": "server", |
||||
|
"ssr": { |
||||
|
"entry": "src/server.ts" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
- **tsconfig**: Updates the application's `tsconfig` to include `server.ts`. |
||||
|
|
||||
|
#### Webpack Builder |
||||
|
|
||||
|
If your project uses the **Webpack Builder** (`@angular-devkit/build-angular:browser`), the schematic: |
||||
|
|
||||
|
- **Scripts**: Adds `dev:ssr`, `serve:ssr`, `build:ssr`, and `prerender` scripts. |
||||
|
- **angular.json**: Adds new targets: `server`, `serve-ssr`, and `prerender`. |
||||
|
- **tsconfig**: Updates the server's `tsconfig` to include `server.ts`. |
||||
|
|
||||
|
### 2.3. Files |
||||
|
|
||||
|
- **server.ts**: This file is the main entry point for the server-side application. |
||||
|
- **Standalone Projects**: Generates a server entry point compatible with `bootstrapApplication`. |
||||
|
- **NgModule Projects**: Generates a server entry point compatible with `platformBrowserDynamic`. |
||||
|
|
||||
|
```typescript |
||||
|
import { |
||||
|
AngularNodeAppEngine, |
||||
|
createNodeRequestHandler, |
||||
|
isMainModule, |
||||
|
writeResponseToNodeResponse, |
||||
|
} from '@angular/ssr/node'; |
||||
|
import express from 'express'; |
||||
|
import { dirname, resolve } from 'node:path'; |
||||
|
import { fileURLToPath } from 'node:url'; |
||||
|
import { environment } from './environments/environment'; |
||||
|
import { ServerCookieParser } from '@abp/ng.core'; |
||||
|
import * as oidc from 'openid-client'; |
||||
|
|
||||
|
// ... (OIDC configuration and setup) |
||||
|
|
||||
|
const app = express(); |
||||
|
const angularApp = new AngularNodeAppEngine(); |
||||
|
|
||||
|
// ... (OIDC routes: /authorize, /logout, /) |
||||
|
|
||||
|
/** |
||||
|
* Serve static files from /browser |
||||
|
*/ |
||||
|
app.use( |
||||
|
express.static(browserDistFolder, { |
||||
|
maxAge: '1y', |
||||
|
index: false, |
||||
|
redirect: false, |
||||
|
}), |
||||
|
); |
||||
|
|
||||
|
/** |
||||
|
* Handle all other requests by rendering the Angular application. |
||||
|
*/ |
||||
|
app.use((req, res, next) => { |
||||
|
angularApp |
||||
|
.handle(req) |
||||
|
.then(response => { |
||||
|
if (response) { |
||||
|
res.cookie('ssr-init', 'true', {...secureCookie, httpOnly: false}); |
||||
|
return writeResponseToNodeResponse(response, res); |
||||
|
} else { |
||||
|
return next() |
||||
|
} |
||||
|
}) |
||||
|
.catch(next); |
||||
|
}); |
||||
|
|
||||
|
// ... (Start server logic) |
||||
|
|
||||
|
export const reqHandler = createNodeRequestHandler(app); |
||||
|
``` |
||||
|
- **app.routes.server.ts**: Defines server-side routes and render modes (e.g., Prerender, Server, Client). This allows fine-grained control over how each route is rendered. |
||||
|
|
||||
|
```typescript |
||||
|
import { RenderMode, ServerRoute } from '@angular/ssr'; |
||||
|
|
||||
|
export const serverRoutes: ServerRoute[] = [ |
||||
|
{ |
||||
|
path: '**', |
||||
|
renderMode: RenderMode.Server |
||||
|
} |
||||
|
]; |
||||
|
``` |
||||
|
|
||||
|
- **app.config.server.ts**: Merges the application configuration with server-specific providers. |
||||
|
|
||||
|
```typescript |
||||
|
import { mergeApplicationConfig, ApplicationConfig, provideAppInitializer, inject, PLATFORM_ID, TransferState } from '@angular/core'; |
||||
|
import { isPlatformServer } from '@angular/common'; |
||||
|
import { provideServerRendering, withRoutes } from '@angular/ssr'; |
||||
|
import { appConfig } from './app.config'; |
||||
|
import { serverRoutes } from './app.routes.server'; |
||||
|
import { SSR_FLAG } from '@abp/ng.core'; |
||||
|
|
||||
|
const serverConfig: ApplicationConfig = { |
||||
|
providers: [ |
||||
|
provideAppInitializer(() => { |
||||
|
const platformId = inject(PLATFORM_ID); |
||||
|
const transferState = inject<TransferState>(TransferState); |
||||
|
if (isPlatformServer(platformId)) { |
||||
|
transferState.set(SSR_FLAG, true); |
||||
|
} |
||||
|
}), |
||||
|
provideServerRendering(withRoutes(serverRoutes)), |
||||
|
], |
||||
|
}; |
||||
|
|
||||
|
export const config = mergeApplicationConfig(appConfig, serverConfig); |
||||
|
``` |
||||
|
- **index.html**: Removes the loading spinner (`<div id="lp-page-loader"></div>`) to prevent hydration mismatches. |
||||
|
|
||||
|
## 3. Running the Application |
||||
|
|
||||
|
After the installation is complete, you can run your application with SSR support. |
||||
|
|
||||
|
### Application Builder |
||||
|
|
||||
|
To serve the application with SSR in development: |
||||
|
|
||||
|
```shell |
||||
|
yarn start |
||||
|
# or |
||||
|
yarn ng serve |
||||
|
``` |
||||
|
|
||||
|
To serve the built application (production): |
||||
|
|
||||
|
```shell |
||||
|
yarn run serve:ssr:project-name |
||||
|
``` |
||||
|
|
||||
|
### Webpack Builder |
||||
|
|
||||
|
**Development:** |
||||
|
|
||||
|
```shell |
||||
|
yarn run dev:ssr |
||||
|
``` |
||||
|
|
||||
|
**Production:** |
||||
|
|
||||
|
```shell |
||||
|
yarn run build:ssr |
||||
|
yarn run serve:ssr |
||||
|
``` |
||||
|
|
||||
|
## 4. Authentication & SSR |
||||
|
|
||||
|
The schematic installs `openid-client` to handle authentication on the server side. This ensures that when a user accesses a protected route, the server can validate their session or redirect them to the login page before rendering the content. |
||||
|
|
||||
|
> Ensure your OpenID Connect configuration (in `environment.ts` or `app.config.ts`) is compatible with the server environment. |
||||
|
|
||||
|
## 5. Deployment |
||||
|
|
||||
|
To deploy your Angular SSR application to a production server, follow these steps: |
||||
|
|
||||
|
### 5.1. Build the Application |
||||
|
|
||||
|
Run the build command to generate the production artifacts: |
||||
|
|
||||
|
```shell |
||||
|
yarn build |
||||
|
# or if using Webpack builder |
||||
|
yarn run build:ssr |
||||
|
``` |
||||
|
|
||||
|
### 5.2. Prepare Artifacts |
||||
|
|
||||
|
After the build is complete, you will find the output in the `dist` folder. |
||||
|
For the **Application Builder**, the output structure typically looks like this: |
||||
|
|
||||
|
``` |
||||
|
dist/MyProjectName/ |
||||
|
├── browser/ # Client-side bundles |
||||
|
└── server/ # Server-side bundles and entry point (server.mjs) |
||||
|
``` |
||||
|
|
||||
|
You need to copy the entire `dist/MyProjectName` folder to your server. |
||||
|
|
||||
|
### 5.3. Run the Server |
||||
|
|
||||
|
On your server, navigate to the folder where you copied the artifacts and run the server using Node.js: |
||||
|
|
||||
|
```shell |
||||
|
node server/server.mjs |
||||
|
``` |
||||
|
|
||||
|
> [!TIP] |
||||
|
> It is recommended to use a process manager like [PM2](https://pm2.keymetrics.io/) to keep your application alive and handle restarts. |
||||
|
|
||||
|
```shell |
||||
|
pm2 start server/server.mjs --name "my-app" |
||||
|
``` |
||||
@ -0,0 +1,22 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection.Extensions; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Volo.Abp.Options; |
||||
|
|
||||
|
namespace Microsoft.Extensions.DependencyInjection; |
||||
|
|
||||
|
public static class ServiceCollectionOptionsExtensions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// You should only use this method to register options if you need to continue using the ServiceProvider to get other options in your Options configuration method.
|
||||
|
/// Otherwise, please use the default AddOptions method for better performance.
|
||||
|
/// </summary>
|
||||
|
/// <param name="services"></param>
|
||||
|
/// <typeparam name="TOptions"></typeparam>
|
||||
|
/// <returns></returns>
|
||||
|
public static OptionsBuilder<TOptions> AddAbpOptions<TOptions>(this IServiceCollection services) |
||||
|
where TOptions : class |
||||
|
{ |
||||
|
services.TryAddSingleton<IOptions<TOptions>, AbpUnnamedOptionsManager<TOptions>>(); |
||||
|
return services.AddOptions<TOptions>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
using Microsoft.Extensions.Options; |
||||
|
|
||||
|
namespace Volo.Abp.Options; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// This Options manager is similar to Microsoft UnnamedOptionsManager but without the locking mechanism.
|
||||
|
/// Prevent deadlocks when accessing options in multiple threads.
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="TOptions"></typeparam>
|
||||
|
public class AbpUnnamedOptionsManager<TOptions> : IOptions<TOptions> |
||||
|
where TOptions : class |
||||
|
{ |
||||
|
private readonly IOptionsFactory<TOptions> _factory; |
||||
|
private TOptions? _value; |
||||
|
|
||||
|
public AbpUnnamedOptionsManager(IOptionsFactory<TOptions> factory) |
||||
|
{ |
||||
|
_factory = factory; |
||||
|
} |
||||
|
|
||||
|
public TOptions Value |
||||
|
{ |
||||
|
get |
||||
|
{ |
||||
|
if (_value is { } value) |
||||
|
{ |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
_value = _factory.Create(Microsoft.Extensions.Options.Options.DefaultName); |
||||
|
return _value; |
||||
|
} |
||||
|
} |
||||
|
} |
||||