You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: aspnetcore/blazor/call-web-api.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ This article describes how to call a web API from a Blazor app.
23
23
:::zone pivot="webassembly"
24
24
25
25
> [!NOTE]
26
-
> This article has loaded **WebAssembly**render mode coverage for calling web APIs. The [Server render mode coverage](?pivots=server) addresses the following subjects:
26
+
> This article has loaded **WebAssembly**client-side rendering (CSR) coverage for calling web APIs. The [coverage for **Server** interactive server-side rendering (interactive SSR)](?pivots=server) addresses the following subjects:
27
27
>
28
28
> * Use of the `HttpClient` factory infrastructure to provide an `HttpClient` to the app.
29
29
> * Cross-Origin Resource Sharing (CORS) pertaining to server-side components.
@@ -61,7 +61,7 @@ The Blazor examples that demonstrate obtaining weather data from a server API ar
61
61
62
62
:::moniker range=">= aspnetcore-8.0"
63
63
64
-
For server-side components in Blazor Web Apps that require interactivity, add Interactive Server rendering to the component:
64
+
For server-side components in Blazor Web Apps that require interactivity, add interactive server-side rendering (interactive SSR) to the component:
65
65
66
66
```razor
67
67
@rendermode InteractiveServer
@@ -750,7 +750,7 @@ For more information, see <xref:blazor/fundamentals/handle-errors>.
750
750
:::zone pivot="server"
751
751
752
752
> [!NOTE]
753
-
> This article has loaded **Server**render mode coverage for calling web APIs. The [WebAssembly render mode coverage](?pivots=webassembly) addresses the following subjects:
753
+
> This article has loaded **Server**interactive server-side rendering (interactive SSR) coverage for calling web APIs. The [**WebAssembly** client-side rendering (CSR) coverage](?pivots=webassembly) addresses the following subjects:
754
754
>
755
755
> * Client-side examples that call a web API to create, read, update, and delete todo list items.
Copy file name to clipboardexpand all lines: aspnetcore/blazor/components/cascading-values-and-parameters.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ Wrap the markup of the `Routes` component in a [`CascadingValue`](xref:Microsoft
151
151
}
152
152
```
153
153
154
-
In the `App` component (`Components/App.razor`), adopt an interactive render mode for the entire app. The following example adopts Interactive Server rendering:
154
+
In the `App` component (`Components/App.razor`), adopt an interactive render mode for the entire app. The following example adopts interactive server-side rendering (interactive SSR):
155
155
156
156
```razor
157
157
<Routes @rendermode="InteractiveServer" />
@@ -317,10 +317,10 @@ Similar to a regular component parameter, components accepting a cascading param
317
317
318
318
Cascadingparametersdon't pass data across render mode boundaries:
319
319
320
-
*InteractivesessionsruninadifferentcontextthantheStaticServer-renderedpages. There's no requirement that the server producing the page is even the same machine that hosts some later Interactive Server session, including for WebAssembly components where the server is a different machine to the client. The benefit of Static Server rendering is to gain the full performance of pure stateless HTML rendering.
320
+
*Interactivesessionsruninadifferentcontextthanthepagesthatusestaticserver-siderendering (staticSSR). There's no requirement that the server producing the page is even the same machine that hosts some later Interactive Server session, including for WebAssembly components where the server is a different machine to the client. The benefit of static server-side rendering (static SSR) is to gain the full performance of pure stateless HTML rendering.
*ViatheBlazorframework, parameterspassedacrossaStaticServerrenderingtointeractiveboundaryareserializedautomaticallyifthey're JSON-serializable, or an error is thrown.
*ViatheBlazorframework, parameterspassedacrossastaticSSRtointeractiverenderingboundaryareserializedautomaticallyifthey're JSON-serializable, or an error is thrown.
Cascadingparametersaren'tJSON-serializebecausethetypicalusagepatternsforcascadingparametersaresomewhatlikeDIservices. Thereareoftenplatform-specificvariantsofcascadingparameters, soitwouldbeunhelpfultodevelopersiftheframeworkstoppeddevelopersfromhavingserver-interactive-specificversionsorWebAssembly-specificversions. Also, manycascadingparametervaluesingeneralaren't serializable, so it would be impractical to update existing apps if you had to stop using all nonserializable cascading parameter values.
Copy file name to clipboardexpand all lines: aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This article provides guidance for component library authors considering support
20
20
21
21
Blazor encourages the development of an ecosystem of open-source and commercial component libraries, formally called *Razor class libraries (RCLs)*. Developers might also create reusable components for sharing components privately across apps within their own companies. Ideally, components are developed for compatibility with as many hosting models and rendering modes as possible. Static SSR introduces additional restrictions that can be more challenging to support than interactive rendering modes.
22
22
23
-
## Understand the capabilities and restrictions of Static SSR
23
+
## Understand the capabilities and restrictions of static SSR
24
24
25
25
Static SSR is a mode in which components run when the server handles an incoming HTTP request. Blazor renders the component as HTML, which is included in the response. Once the response is sent, the server-side component and renderer state is discarded, so all that remains is HTML in the browser.
Components can specify route parameters in the route template of the [`@page`][9] directive. The [Blazor Router](xref:blazor/fundamentals/routing) uses route parameters to populate corresponding component parameters.
910
+
Components can specify route parameters in the route template of the [`@page`][9] directive. The [Blazor router](xref:blazor/fundamentals/routing) uses route parameters to populate corresponding component parameters.
*[Enable interactive automatic (Auto) or client-side rendering (CSR)](#enable-interactive-automatic-auto-or-client-side-rendering-csr)
36
36
37
37
> [!NOTE]
38
38
> For the examples in this section, the example app's name and namespace is `BlazorSample`.
39
39
40
-
### Add Static Server Razor component rendering
40
+
### Add static server-side rendering (static SSR)
41
41
42
42
Add a `Components` folder to the app.
43
43
@@ -60,7 +60,7 @@ Add the following `_Imports` file for namespaces used by Razor components.
60
60
61
61
Change the namespace `BlazorSample` in the preceding example to match the app.
62
62
63
-
Add the Blazor Router (`<Router>`, <xref:Microsoft.AspNetCore.Components.Routing.Router>) to the app in a `Routes` component, which is placed in the app's `Components` folder.
63
+
Add the Blazor router (`<Router>`, <xref:Microsoft.AspNetCore.Components.Routing.Router>) to the app in a `Routes` component, which is placed in the app's `Components` folder.
64
64
65
65
`Components/Routes.razor`:
66
66
@@ -113,7 +113,7 @@ For the `<link>` element in the preceding example, change `BlazorSample` in the
113
113
114
114
Add a `Pages` folder to the `Components` folder to hold routable Razor components.
115
115
116
-
Add the following `Welcome` component to demonstrate Static Server rendering.
116
+
Add the following `Welcome` component to demonstrate static SSR.
117
117
118
118
`Components/Pages/Welcome.razor`:
119
119
@@ -162,27 +162,25 @@ In the ASP.NET Core project's `Program` file:
162
162
163
163
When the app is run, the `Welcome` component is accessed at the `/welcome` endpoint.
Follow the guidance in the [Add Static Server Razor component rendering](#add-static-server-razor-component-rendering) section.
167
+
Follow the guidance in the [Add static server-side rendering (static SSR)](#add-static-server-side-rendering-static-ssr) section.
168
168
169
-
Make the following changes in the app's `Program` file:
169
+
In the app's `Program` file, add a call to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents%2A> where Razor component services are added with <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>:
170
170
171
-
* Add a call to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents%2A> where Razor component services are added with <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>:
172
-
173
-
```csharp
174
-
builder.Services.AddRazorComponents()
175
-
.AddInteractiveServerComponents();
176
-
```
171
+
```csharp
172
+
builder.Services.AddRazorComponents()
173
+
.AddInteractiveServerComponents();
174
+
```
177
175
178
-
* Add a call to <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> where Razor components are mapped with <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>:
176
+
Also in the `Program` file, add a call to <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> where Razor components are mapped with <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>:
179
177
180
-
```csharp
181
-
app.MapRazorComponents<App>()
182
-
.AddInteractiveServerRenderMode();
183
-
```
178
+
```csharp
179
+
app.MapRazorComponents<App>()
180
+
.AddInteractiveServerRenderMode();
181
+
```
184
182
185
-
Add the following `Counter` component to the app that adopts the Interactive Server render mode.
183
+
Add the following `Counter` component to the app that adopts interactive server-side rendering (interactive SSR).
186
184
187
185
`Components/Pages/Counter.razor`:
188
186
@@ -210,16 +208,16 @@ Add the following `Counter` component to the app that adopts the Interactive Ser
210
208
211
209
When the app is run, the `Counter` component is accessed at `/counter`.
212
210
213
-
### Enable interactive Auto and WebAssembly rendering
211
+
### Enable interactive automatic (Auto) or client-side rendering (CSR)
214
212
215
-
Follow the guidance in the [Add Static Server Razor component rendering](#add-static-server-razor-component-rendering) section.
213
+
Follow the guidance in the [Add static server-side rendering (static SSR)](#add-static-server-side-rendering-static-ssr) section.
216
214
217
-
Components using the Auto render mode initially use Interactive Server rendering, but then switch to render on the client after the Blazor bundle has been downloaded and the Blazor runtime activates. Components using the WebAssembly render mode only render interactively on the client after the Blazor bundle is downloaded and the Blazor runtime activates. Keep in mind that when using the Auto or WebAssembly render modes, component code downloaded to the client is ***not*** private. For more information, see <xref:blazor/components/render-modes>.
215
+
Components using the Interactive Auto render mode initially use interactive SSR, but then switch to render on the client after the Blazor bundle has been downloaded and the Blazor runtime activates. Components using the Interactive WebAssembly render mode only render interactively on the client after the Blazor bundle is downloaded and the Blazor runtime activates. Keep in mind that when using the Interactive Auto or Interactive WebAssembly render modes, component code downloaded to the client is ***not*** private. For more information, see <xref:blazor/components/render-modes>.
218
216
219
217
After deciding which render mode to adopt:
220
218
221
-
* If you plan to adopt the Auto render mode, follow the guidance in the [Enable Interactive Server rendering](#enable-interactive-server-rendering) section.
222
-
* If you plan to only adopt Interactive WebAssembly rendering, continue without adding Interactive Server rendering.
219
+
* If you plan to adopt the Interactive Auto render mode, follow the guidance in the [Enable interactive server-side rendering (interactive SSR)](#enable-interactive-server-side-rendering-interactive-ssr) section.
220
+
* If you plan to only adopt Interactive WebAssembly rendering, continue without adding interactive SSR.
223
221
224
222
Add a package reference for the [`Microsoft.AspNetCore.Components.WebAssembly.Server`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Server) NuGet package to the app.
225
223
@@ -300,7 +298,7 @@ Make the following changes to the ASP.NET Core app's `Program` file:
300
298
301
299
* Add the Interactive WebAssembly render mode (<xref:Microsoft.AspNetCore.Builder.WebAssemblyRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveWebAssemblyRenderMode%2A>) and additional assemblies for the `.Client` project where Razor components are mapped with <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>.
For more information on adding support for Interactive Server and WebAssembly components, see <xref:blazor/components/render-modes>.
432
430
433
-
In the `Program` file immediately after the call to map Razor Pages (<xref:Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapRazorPages%2A>), call <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> to discover available components and specify the app's root component (the first component loaded). By default, the app's root component is the `App` component (`App.razor`). Chain a call to `AddInteractiveInteractiveServerRenderMode` to configure the Server render mode for the app:
431
+
In the `Program` file immediately after the call to map Razor Pages (<xref:Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapRazorPages%2A>), call <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> to discover available components and specify the app's root component (the first component loaded). By default, the app's root component is the `App` component (`App.razor`). Chain a call to `AddInteractiveInteractiveServerRenderMode` to configure interactive server-side rendering (interactive SSR) for the app:
For more information on adding support for Interactive Server and WebAssembly components, see <xref:blazor/components/render-modes>.
757
755
758
-
In the `Program` file immediately after the call to map Razor Pages (<xref:Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapRazorPages%2A>), call <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> to discover available components and specify the app's root component. By default, the app's root component is the `App` component (`App.razor`). Chain a call to <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> to configure the Server render mode for the app:
756
+
In the `Program` file immediately after the call to map Razor Pages (<xref:Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions.MapRazorPages%2A>), call <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> to discover available components and specify the app's root component. By default, the app's root component is the `App` component (`App.razor`). Chain a call to <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> to configure interactive server-side rendering (interactive SSR) for the app:
759
757
760
758
```csharp
761
759
app.MapRazorComponents<App>()
@@ -851,4 +849,3 @@ For more information, see <xref:blazor/components/index#class-name-and-namespace
Copy file name to clipboardexpand all lines: aspnetcore/blazor/components/quickgrid.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ For example, add the following component to render a grid.
80
80
}
81
81
```
82
82
83
-
The preceding example specifies server rendering (`@rendermode InteractiveServer`), which enables the `QuickGrid`'s interactive features. In this case, the only interactive feature is sortable columns.
83
+
The preceding example specifies interactive server-side rendering (interactive SSR) with `@rendermode InteractiveServer`, which enables the `QuickGrid`'s interactive features. In this case, the only interactive feature is sortable columns.
84
84
85
85
For an example that uses an <xref:System.Linq.IQueryable> with Entity Framework Core as the queryable data source, see the [`SampleQuickGridComponent` component in the ASP.NET Core Basic Test App (`dotnet/aspnetcore` GitHub repository)](https://github.com/dotnet/aspnetcore/blob/main/src/Components/test/testassets/BasicTestApp/QuickGridTest/SampleQuickGridComponent.razor).
0 commit comments