Spot-on with the WASM comments! Two projects to save the user a few microseconds of pain at initial load is hard to justify for most scenarios, but it's great to see Microsoft putting so much resource and developments into Blazor. The Auto mode is great to see, but not viable in production, IMHO. Suspect it'll be iterated down to having a single project in future releases. For me it'll be Server mode all the way, and Razor components shoving cshtml aside is another nice tidying up exercise. I have one MVC site in maintenance, and I think that'll be replaced with SSR for the most part, so at long last I can leave WebForms and MVC and focus on one framework. Great video - thank you!
One thing that would be cool to see added to Blazor is something like asp-append-version where it appends a hash in a query string for cache-busting of assets in script and link tags.
I am going to agree with something here: webassembly is not looking good in the programing model. To be honest I like what they have done with Blazor as it simplifies a lot of code that needed an RPC "API", but the webassembly part is becoming crumble some unless you go to full SPA (the same can be say for the server side interactivity) I am seeing things like HTMX as the real companion to the updated programing model, especially now we can render blazor components "anywhere" and deliver them through minimal API. Personally, I am moving an SPA webassembly to server side to webassembly interactivity and so far, I find it simpler than having an RPC API for everything. Definitely going to try HTMX in the mix at some point, perhaps I can end diching webassembly...which will be funny as it was the part that brought the most interest to blazor
@@dustee2680 I am in initial phases of playing with that stack. I am using blazor SSR, minimal api and the rendering function they introduced in net 8. The idea of the api is respond with rendered blazor components (html) instead of json. Still you need to use js for interactivity and you need to rely in standard HTML forms for data and validation
That's interesting, I wondered why the Hosted Wasm Template was removed from VS. Years ago I was told to stick with HTML/Javascript/CSS as the only 3 topics I would ever need to study to become a successful developer. I wish I'd listened.
Hi, my questions are: -SSR is the new default mode for blazor apps, so the old server mode interactivity should be used only when I need interactivity and don't want to download code in the client? -the auto mode should be used always, I mean it has the best world of all two old modes, or should be used when there is at least a component with interactivity? Should I always start with the automode project that create two different projects? -should I choose automode over old blazor server mode even there isn't interactivity? Thanks in advance.
For me too many changes to what I thought was a solid foundation developers could build on. With the way Blazor is going the learning time outweighs actual productivity time. With the likes of Angular this is not the case, new functionalities are a subtle introduction. However I think I'll stick with the API/Blazor Wasm model for the time being until I can afford the time to re-learn Blazor for what it is now.
It would be great to see how you can have multiple constructors in the dbcontext and use adddbcontextfactory. At the moment it says you cant have multiple constructors when adding migrations.... But it works with adddbcontext()
Blazor WASM and Blazor Server still exist in .NET 8. So, if you want you can still create projects using old hosting model. But I would stronglt advise against it, ast the new Blazor seems to be the main focus on Microsoft right now and probably the older hosting models will get less attention in the future.
@@Codewrinkles I agree that the "new" Blazor will likely be Microsoft's focus, but I'm still not convinced that a pure wasm solution doesn't make sense in some scenarios - LOB apps, for example. I had really good luck with wasm in .net 5/6, so it is somewhat disheartening to see that perhaps the wasm model is either being deprecated or shunned. I also agree with you that mixing render modes and adding a second project seems less than ideal, to say the least.
Not really he's causing more confusion with his answers because he's not experienced with anything but the Blazor Server. He doesn't even know the difference between a template and a hosting model.
Hey thx again for your video. One question regarding the authentication: Is there a reason why the authetication type Windows is missing in the new template?
I'm not sure about that. Tbh there's only the individual user accounts there. I think one possible explanation would be that auth actually behaves exactly like in regular MVC apps.
The webassembly hate is a bit harmful and not at all helpful. If you don't need it, don't use it. How hard is that? I work in a space where I'm often developing offline-available web applications that later need to synchronize with a server as a user goes in and out of areas with limited internet connectivity. Seeing technologies like this be developed and included in the latest framework offerings is encouraging to me. In the scenarios I'm working in, I'd almost never choose SSR as it would rarely if ever satisfy my needs. You don't see me out here calling it the ugly jerk cousin nobody wants to invite to thanksgiving though. Different workplaces have different needs and the world doesn't revolve around you. I don't care if you're working at the biggest tech company on the planet.
I am a bit confused with the identity feature. So far I’ve used azure aadb2c in my .net 7 blazor apps. Am I supposed to use this new identity components? Do they connect to aadb2c? Or should keep using b2c as usual? What is the difference here? If you could elaborate a bit i’d appreciate it, i’m quite confused. Thanks a lot!
I will do more videos on auth. The idea is essentially that you would connect to Azure AD B2C exactly the same way you would connect in a regular Asp.Net MVC app or Razor Pages app.
First off, thank you very much for your videos. Is there any chance I can get you to figure out or tell us how we can add dynamic content to the PageTitle in Dotnet8? Adding something like in forecasts.Count() or int Count() => return forecasts.Count(); does not update the PageTitle. I tried adding @rendermode="InteractiveServer" to the pagetitle component, but it must be a different rendermode I need to add there. Any hints, tips or insight? It seems like this breaks what we could do i .net7.
@@Codewrinkles as kis.stupid said: add @render-mode="InteractiveServer" to in app.razor and it works as in .net 7. I was close with adding it to pagetitle 😅
Well, it can be accessed, but it might be null or have oudated information. The core idea, I believe, is to access the HttpContext only in SSR components and in as few occasions as possible.
And what is the estimate usage of the app? An average of users per second, how often would peeks occurr? In peek times how many users per second would use the app?
I think you are placing components in a folder different than the "Components" default folder. Notice that you have an _Imports.razor in the Components folder. You need to also add in your components folder. Obviously also copy over the contents of the original _imports.razor.
I'm not sure it's about replicating NextJs. I've worked with the NextJS appRouter and I agree that adding interactivity there is much easier with just "use-client". On the other side I think that the Interactive Server Mode is a winner for Blazor, because it makes things more secure and easier to process on the backend without the need of an API. Also the StreamRendering is definitely a winner and something that's not there in NextJs.
@@Codewrinkles I am probably missing something. I thought Suspense in NextJS serves the same purpose as StreamRendering. At least they seem to be accomplishing the same thing.
A newbie can never understand what you are telling in your videos....i wish the youtube instructors teach in a simple way that a newbiew could understand what is going on
I have plenty of videos (and entire playlists) that contain only content tailored for absolute beginners. This one is certainly not one of it. I'm sorry this video didn't match your expectations. I'll try to improve in future videos.