Shouldn't the .NET 8 Blazor Web App template show client-server communication for WebAssembly SPAs? #52285
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
feature-templates
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Status: Resolved
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Prior to converting my .NET 7 ASP.NET-hosted Blazor WebAssembly apps (three of them) to .NET 8, I created some new apps using the new Blazor Web App template.
In no variation of creating an app did I end up with the client project actually communicating with the server project over HTTP (if there can be said to be a server project... the
Server
designation seems to have gone away).Instead, the Weather page in the client fakes it:-
Did I miss something? What is the magic combination of choices that shows me genuine client-server communication?
Now, I can probably work out what to do... rename the first project to say "Server", add a "Shared" project, add controllers to the Server, set up the calls from the Client etc.
But really: shouldn't the template have these features?
If I'm right and the template simply doesn't include this stuff, then all I can say is that I'm glad I started with Blazor WebAssembly for creating SPAs in May 2020 and aren't starting now. It seems to me that if you're starting now, using the new template won't help you any.
You're a new adopter.. you create a new Blazor WebAssembly solution with the new template... you get what is probably a Server project and you definitely get a Client project... and the two don't even communicate with each other! It's bizarre and totally unhelpful.
Describe the solution you'd like
The new .NET 8 Blazor Web App project template shows a clear "Blazor WebAssembly SPA with Client and Server" option, and includes code that demonstrates the client getting data from the server thru a shared model... instead of not doing so and "faking" a load of some data after a delay, purely in the client.
Additional context
The changes need to be communicated better for users migrating solutions from .NET 5, 6, 7 - and more especially the new project template needs to show genuine client-server communication for people new to Blazor.
E.g when I migrate, should I keep the
Shared
project? Or should I add shared DTOs to theClient
project? Is theShared
project deprecated now? Or what? The new project template is causing confusion, and not providing clear answers.I was hoping (even expecting!) the template to take a major step forwards, and include a gRPC-instead-over-Http-communication-between-client-and-server option... instead it's taken a regrettable major step backwards by not showing any communication.
The text was updated successfully, but these errors were encountered: