Update the .NET 8 Blazor Web App project template to show client-server communication over HTTP, with shared models, for Blazor WebAssembly #52474
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-templates
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Priority:2
Work that is important, but not critical for the release
Status: Resolved
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
The .NET 8 Blazor Web App project template is a major step backwards in that it doesn't show - for an ASP.NET-hosted Blazor WebAssembly project (with interactive render mode = WebAssembly, applied globally) - communication between the Client project and the Server project, where the client gets a shared model from the server using JSON-over-HTTP.
(Almost as bad: the Server project isn't identified as such.)
New adopters of Blazor WebAssembly need this very much, and existing users like me need this for when we start a new .NET 8 project.
As it is, the new Client project fakes a data load from the server by waiting for half a second, and then internally generates the data it's going to display. Now, we don't expect a WebAssembly app to do this... we expect it to get data from the server! The project templates used to show this, and very useful it was too. The .NET 8 project template needs to bring this back. We do want new adopters for Blazor WebAssembly, don't we?
Describe the solution you'd like
Please update the .NET 8 Blazor Web App project template to redress this serious omission. Include clearly delineated
Server
,Client
andShared
projects, like we had before. Don't remove the "Server" indicator from the server project name (it doesn't help). Generate the weather forecast data on the server, and pull that data down via a shared model in the client (like we had before).Additional context
Imagine a new adopter starting Blazor WebAssembly development with .NET 8. The existing books and web resources refer to a Server, Client, Shared solution structure that the new project template doesn't emit. You're not sure which is the server project. You have no idea how to get data from the server to the client. You are confused as to why the client project is itself generating the source data... surely the server should supply this? Why doesn't the template-emitted project show that? The existing resources for .NET 6 and 7 show such a thing, but it doesn't seem possible in .NET 8. Is this obvious way of working not supported in .NET 8? Surely that can't be! Then why does the newly emitted project from the template not show this simple and obvious way of working?
The text was updated successfully, but these errors were encountered: