Blazor Improvements in .NET 5 - Browser Storage, Virtualization, and More

  Рет қаралды 55,993

IAmTimCorey

IAmTimCorey

3 жыл бұрын

There are a ton of great changes to Blazor in .NET 5. The speed has been improved dramatically and the product has been further stabilized, but there are also a lot of additional features and options in Blazor. In this video, we are going to look at running Blazor inside of an MVC project, we are going to look at the new file input, we are going to see our changes hot reload, we are going to load 50,000 records on the screen without a problem, we are going to use encrypted browser storage, and a lot more. This is going to be a full video so get ready.
Blazor courses:
www.iamtimcorey.com/p/blazor-...
www.iamtimcorey.com/p/explori...
Source Code: leadmagnets.app/?Resource=Bla...
Mailing List: signup.iamtimcorey.com/
More Info:
Blazor in MVC: docs.microsoft.com/en-us/aspn...
InputFile: docs.microsoft.com/en-us/aspn...
Virtualize: docs.microsoft.com/en-us/aspn...
Browser Storage: docs.microsoft.com/en-us/aspn...

Пікірлер: 220
@larrymcfarlane6202
@larrymcfarlane6202 3 жыл бұрын
Thanks Tim! You covered everything I wanted to know about what's new in Blazor. Sure beats spending an hour or 2 just searching for sites, cross refencing, bookmarking and finally taking the time to reading them.
@Otonium
@Otonium 3 жыл бұрын
Thank you very much, the 2 hours seemed 10 minutes. Your enthusiasm is contagious Tim, and makes us learn even more.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent! I'm glad.
@oncalldev
@oncalldev 3 жыл бұрын
As always, a great explanation of the new Blazor features. I'm glad I'm not the only one that had some confusion over "hot reloads".
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad to help!
@JoeBonez
@JoeBonez 3 жыл бұрын
Thank you, sir. That virtualization thing alone was worth the watch time.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it helped!
@billcarpenter1844
@billcarpenter1844 3 жыл бұрын
Agree that virtualization thing is awesome, I have a couple tools I made at work I am thinking of rewriting in Blazor as that virtualize would really speed up and/or make some of my tools have much simpler code (kind of a pain to do all that paging manually)
@spacemanjack777
@spacemanjack777 2 жыл бұрын
Great walkthrough, as usual. Thank you! The direction in which Blazor is moving forward is just fantastic. It makes JS based UI-frameworks look like something clunky from the past.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks!
@shahzshafie
@shahzshafie 3 жыл бұрын
Love all these features in Blazor.. CSS Isolation and Virtualize component are awesome! thanks Tim! looking forward for more Blazor in .NET 5.. Exciting stuff!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
My pleasure!
@dickybird08
@dickybird08 3 жыл бұрын
Awesome! Looking forward to the Blazor Authentication video!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Coming soon!
@billcarpenter1844
@billcarpenter1844 3 жыл бұрын
Thanks for another great video Tim! Blazor just keeps getting better.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I agree.
@skbell821
@skbell821 3 жыл бұрын
Thanks for a great video, Tim! You mention doing a video on authentication; will that include tying the Blazor Server app into CAS authentication?
@davidkeeley1516
@davidkeeley1516 3 жыл бұрын
super stuff Tim - virtualization is very useful!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@abdallabenomran6809
@abdallabenomran6809 3 жыл бұрын
The best Man in USA ..Thanks a lot .
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome!
@nove1398
@nove1398 3 жыл бұрын
Nice video, learned a few bits I didn't know before. Looking out for authentication changes video.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it was helpful!
@billcarpenter1844
@billcarpenter1844 3 жыл бұрын
I have been taking Tim's Blazor server in Depth course and it is awesome, covers Authentication and authorization, db etc... really will give you a great foundation for building Blazor Apps
@Vulgamag
@Vulgamag 3 жыл бұрын
Wow! Thanks Tim, so helpful the "dotnet watch run" that's the killer trick of the year for me... the Virtualize in the 2nd place for chatting messages, I can now grow up my mongoDB cursor batch size without having to do crazy DB pumping back and forth each 20 messages... but while not losing sight of the memory management with to many records...
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm glad it was so helpful.
@dvstd
@dvstd 3 жыл бұрын
Thank you for the video and explanation of the improvements. I was wondering if there is support in Blazor for MultiSelect? Or at least a way to do it?
@thepunisher2330
@thepunisher2330 3 жыл бұрын
Thanks so much sir, i was looking for that..
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Most welcome
@baradongkamatis
@baradongkamatis 3 жыл бұрын
Awesome tutorial, thanks!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You're welcome!
@mustafasuyi3151
@mustafasuyi3151 Жыл бұрын
Hi Tim, actually it was okay when you used OnAfterRenderAsync. After you go to another page and come back, you initiate the counter page, set its parameters, then you render it. (OnAfterRender) After this, you set the currentCount with the local storage value, but rendering has already happened. So if you use StateHasChanged(preferably if firstRender == true) you will see that it works fine. Also, thank you for these wonderful videos. They offer great overviews that we couldn't find anywhere else.
@ajazahmad2386
@ajazahmad2386 3 жыл бұрын
So Much Thanks.vERY clEARLY AND PATIENCE Y ELABORATING THE CRITICAL TOPIC.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You arE wELCOME!
@peteroganwu951
@peteroganwu951 3 жыл бұрын
Thanks Tim for your wonderful videos. Just wanted to ask for clarification, the Enum.GetValues returns Array of enum values, is there a need to type cast again to Array?
@harvey2010yt
@harvey2010yt 3 жыл бұрын
Simpler: @foreach(var car in Enum.GetValues()) { ...
@setiadisudrajat5031
@setiadisudrajat5031 3 жыл бұрын
it is cool, thanks Mr Tim
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@mcvanstaaden7325
@mcvanstaaden7325 3 жыл бұрын
I am glad I waited till now to take a good look at Blazor but something tells me I should wait for .Net 6 before considering using Blazor for projects. Anyway thanks for the work you do Tim. It is appreciated.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Up to you, but it is production-ready and stable so there isn't really a reason to wait.
@mcvanstaaden7325
@mcvanstaaden7325 3 жыл бұрын
@@IAmTimCorey I'm aware that Blazor is production ready but for me personally it feels that there needs to be a little bit more maturing. Wish Canvas was a little more of a first class citizen but it is what it is. Don't get me wrong, from the day Blazor was announced I was more excited than I was about anything in the coding world since Silverlight but something is still telling me to hold off till .Net 6 to see where all this is going. As a side note, when you do your Authentication stream, please do not use the "out of the box' solution. In fact since you are a Dapper fan, do a cookie, Auth0 and JWT stream using dapper for authentication and authorization management. That should be a good one.
@mcvanstaaden7325
@mcvanstaaden7325 3 жыл бұрын
@@IAmTimCorey Hi Tim. After my last post I decided to take a real good look at Blazor. This last week I spend my time developing three projects to the left of the instructional path. Two in server side and one in web assembly. I have never been so frustrated by any framework in all my life. Not even old fashioned MVC with its learning curve was this frustrating.
@knssoftware6018
@knssoftware6018 2 жыл бұрын
Great video, thanks. However, I don't understand why the session storage error you got went away - even MS says this will happen in pre-render mode. Do you know why it is working for you? Don't really want to go to server mode if it is going to feel laggy. Also, is session storage a good place to do small amounts of data caching (just small bits that I would need to keep going back to the DB for), or are there better options. Thanks again.
@keithmiller31
@keithmiller31 3 жыл бұрын
Very nice video. I second a request for a video on the authentication changes.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Sounds good.
@ericsavoy7004
@ericsavoy7004 3 жыл бұрын
Thank you Tim. I love you videos! Is there a way to do the same thing a MVC with blazor mobile bindings?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm not sure what you are asking, sorry. What are you looking to do where?
@Baby4Ghost
@Baby4Ghost 3 жыл бұрын
Hi Tim, another great vid! Quick question, couldnt find a good answer on google. Is it possible to use SignalR on Blazor WASM (non-hosted)? If so, can you direct me to some good docs for it? I get the basics but not for WASM. Im using Blazor WASM and a Web Api for the website. What I want is to update an blazor page when the status of an object changes. Lets say for example you have an Verification Page and want to redirect the user as soon as the status changes server-side. Can I set this up with an Blazor WASM non-hosted? I've implemented the poor-man way, using a timer, but its not ideal. Please advise. Thank you.
@redengallera8305
@redengallera8305 3 жыл бұрын
Million thanks!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome!
@sipi41
@sipi41 2 жыл бұрын
Tim quick question... tried to make experiments around here... in the first project (MvcDemo), I tried to create a page using blazor, in other words, a component with the @page directive like this: @page "/mytest" but when I go to the URL, it shows a 404... am I missing something? :-( by the way, super awesome video! Other things I noticed... I created a db context with a single table with person names, as a test... I noticed that I can't inject the dbcontext in the blazor component if I don't use an interface and also, when accessing the tables, in this case a list of names, I can't use ToListAsync() method, just ToList()... but maybe these are for later.
@jaygiles5783
@jaygiles5783 3 жыл бұрын
Might be a daft question but as you did with an MVC project, could Razor components be used in an Angular project? I know very little about Angular but our other dev team use it so it would give me a good in with them when I want to work on their project :-)
@marklynch6530
@marklynch6530 Жыл бұрын
Hi Tim, just watched this. How would I use ProtectedBrowserStorage (session) with an event? I have a dropdown in my navbar and need to refresh a page's data when that dropdown selection is changed.
@cryptodapps3340
@cryptodapps3340 3 жыл бұрын
About 3 months now I was trying to use razor components in my MVC app but was getting an error which I tried everything stackoverflow recommended but end up giving up. Now that I watched this video I was missing the which resolve my error lol. I been through so much pain writing most of it in JS just because I don't want the page to refresh. I can now finish the last part of it using razor components! Thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it helped. Be sure to update in Stackoverflow to save someone else the pain.
@pilotboba
@pilotboba 3 жыл бұрын
1:13:06 "... a blazing two minute tutorial..." I see what you did there. :)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Seeing if you were still awake.
@kevincordell9539
@kevincordell9539 3 жыл бұрын
I like the css isolation. Just like Angular!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yes sir
@Aphradity
@Aphradity 3 жыл бұрын
Sorry if I am asking this poorly... Is there a way for the BlazorServer to send an update to the client, perhaps a data point plotting some kind of a graph or the state of some device on the serverside changes. In WCF you would subscribe to a callback event. Are there such events that can do the same thing where the server would send an update to a page and the page would automatically re-render?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Sure. Technically, anything you do in code is the server telling the client to re-render (if you change value it depends on). You could put an event handler in your code that gets triggered on a class's event or you could listen for changes, etc.
@YousefSh
@YousefSh 3 жыл бұрын
@51:05, I believe dotnet watch run has been out for a while. Not new. Also, a down side is that debugging no longer works when u use this. Posting this while I'm watching so idk if it's clarified later in the video.
@neopickaze
@neopickaze 3 жыл бұрын
Not strictly true - you can still attach to the process for debugging.
@swankyshivy
@swankyshivy 3 жыл бұрын
great video as always. can you do a videon on file upload with all its bells and whistle including security? interested in how accept pdf or images from customers and security goes with it. web assembly
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for the suggestion. I have added it to Tim's list of possible future topics.
@TheJessejunior
@TheJessejunior 3 жыл бұрын
hey tim, i´m trying to figure out wich aprouch would be better for seo, mvc with blazor components vs blazor server side vs blazor client side as static page in azure. what do you have any guidance in tthat way? thanks for always answering.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You can do SEO well with any of those approaches.
@santoshanjani3860
@santoshanjani3860 Жыл бұрын
Hi Tim, your explanation is more beautiful than the tech blazor. We all thanking you! I have one doubt for my current blazor project. Can you please help me to understand the reason Tim. Doubt: When user log in and at other pages as well, we are storing some data into the browser local storage. Now in one page when I am fetching some records from this browser local storage it is taking too much time to execute the C# line which is fetching the record from storage. Also in debug mode sometime Task fails to fetch. I have used the same class which you have explained. Waiting for your kind reply Tim.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I'm not sure what the issue is, but it sounds like something in your code that needs to be addressed.
@santoshanjani3860
@santoshanjani3860 Жыл бұрын
ProtectedLocalStorageObject.GetAsync("userid").ConfigureAwait(false); This line of code taking too much time.
@aimanemeish3482
@aimanemeish3482 3 жыл бұрын
brilliant
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks
@cleancoder3838
@cleancoder3838 3 жыл бұрын
Great video. But some "corrections" for it: 1) 44:05 => use parentheses to avoid wrong "0+1", "1+1", etc. display 2) 1:02:47 => you can ommit the protected keyword and just write override to get the same intellisense examples 3) 1:03:44 => You don't need to cast, just use Value property. Or simply use "currentCount = StartCount ?? 0";
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@cryptodapps3340
@cryptodapps3340 3 жыл бұрын
Is the virtualization only for blazor? Or can that be used with MVC if setup for razor components?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It is a Blazor feature but if you used a Razor component in MVC, you could use it in the component.
@captkalik
@captkalik 2 жыл бұрын
For that virtualize tag, how do you get the index or row number to display in the table
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Make the record ID part of the model.
@vovasipen4514
@vovasipen4514 3 жыл бұрын
Hi Time, thanks for the video. I am using the latest VS 16.8.3 with the corresponding .Net 5 version. Just following in your steps on the very first part when you configured and ran Blazor based Counter component - code is one to one to yours. Once I run the Counter is on the screen, but click event is not being processed and the value is not being updated. I wonder what could be different?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Download my code and compare it to yours. You may have missed something small.
@vovasipen4514
@vovasipen4514 3 жыл бұрын
I rebuilt MvcDemo project without RuntimeCompilation option and without AddRazorRuntimeCompilation() in startup.cs - now it works. I confirmed by re-enabling both - it stopped working.
@MarkoMijuskovic
@MarkoMijuskovic 3 жыл бұрын
Maybe I'm not seeing it but where is the link to the tutorial on how to set up client side Blazor in an existing MVC application? I thought I heard you in the video that you will post a link to it bellow...
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Just click the 'SHOW MORE' link under the video frame and look for "Blazor in MVC"
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
Great video as usual. Have you considered doing an updated "Server vs WASM" comparison? What is this yellow warning I keep hearing about in Server Side? Are there more pitfalls to SignalR that we should know about? I don't wan't to end up being forced to using Azure. Would be nice to know what the max recommended client number is for server side. I have not really gone into Blazor yet but following it with interest so that explains my strange Q ;). I mean if you do LOB apps where you don't expect 50k simultaneous users. Isn't server side to be prefered due to better security and better data access scenarios? (as you explained here)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm not sure I'll update the head to head video since not much has changed on that front. Not sure what you mean by the yellow warning. As for the pitfalls with SignalR, no, there aren't. The only thing to remember is that it keeps open a tiny connection to the server so it doesn't work well in disconnected environments or environments where the signal is lost for large periods of time (it has a retry mechanism built in for short-term glitches). As for scalability, that is hard because it depends on your server. An Azure instance with just 3.5GB of memory can handle 5,000 concurrent connections, for example. That's a LOT.
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
@@IAmTimCorey Thanx. I saw some issue where the signalr just stopped working for some reason. Just a bit afraid of such things :). Ah yes it had to do with what you described, when you were idling for a while. Where is the previous head to head video? I have not seen it.
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
@@IAmTimCorey Sorry to ask but what would your recommendations being for IIS running on VM? Do you need the SignalR service or is that for larger situations?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It is for larger situations. The good news is that adding it in later won't be difficult.
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
@@IAmTimCorey Btw, here is an idea. How to add blazor seamlessly into existing mvc apps. Where and how :). Also thanx for producing these great videos. I found this though. One of the legends :). kzbin.info/www/bejne/qJezgqyqo5ynnM0 but maybe you can do something that fits into your long running series?
@Aphradity
@Aphradity 3 жыл бұрын
Oh Oh... One thing. The enums are very cool, but what about enum Flags where they can represent multiple. Is there anything controls for those:?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Not sure what you mean by representing multiple. Do you mean a multi-select or something else?
@Aphradity
@Aphradity 3 жыл бұрын
@@IAmTimCorey My apologies for being unclear. For state machines (particularly in Manufacturnig) they often use one or more (u)int (32-bit) values as Enum Flags that typically represents up to 32 bools (bit[0] - bit[31]), that can have 1 to all 32 flags set/unset (often represented as a uint32). The RadioGroup control you showed can only have 1 set at a time. What I would ideally like to see would be a similar control that could dynamically show the Enum Name and indicator, but there could be multiple flags set. I hope that makes what I am asking more clear. That you are aware of, are there any existing controls for Blazor that support displaying an Enum Flag (even if transported as an int32 and converted back to Enum Flag), that would display "on/off" state for each respective enum value. For readers who may not understand the difference of an enum vs enum flag. below is an example of how I define an enum flag. A normal enum would not have the [Flags] attribute, and would typically number values as 0, 1, 2... instead of using Bits (left shifted, as illustrated) or numbered in their base-2 equivalent. [Flags] public enum SystemInitializationFlag { None = 0, InitializedDAQ = (1
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Ah, gotcha. I don't believe Blazor has something like that natively, but you can definitely write a component that does it for you. Then, you could design it so that you pass in the uint32 to the component and it handles setting up the UI for the flags and outputting the correct value.
@getcomann
@getcomann 3 жыл бұрын
Thanks for the video. It is very helpful. However I received the same runtime exception for localstorage when reload the page: "InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method." I guess OnInitializedAsync should not use local or session storage. I have the same error with your project too. I bypassed it in try catch block. But I think there should be better solution. I test it on Elementary OS.
@seancpp
@seancpp 3 жыл бұрын
I'm also facing this.
@seancpp
@seancpp 3 жыл бұрын
I found a solution that seems to work well protected async override Task OnAfterRenderAsync(bool firstRender) { var userData = await storage.GetAsync("Counter.currentCount"); currentCount = userData.Success ? userData.Value : 0; this.StateHasChanged(); } The problem with OnAfterRender is it is called *after* the component is rendered, which is why the behavior is weird. If we notify blazor that the component has changed, then it will re render with the updated state
@captkalik
@captkalik 2 жыл бұрын
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage @inject ProtectedLocalStorage ProtectedLocalStore @if (isConnected) { Current count: @currentCount Increment } else { Loading... } @code { private int currentCount; private bool isConnected; protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { isConnected = true; await LoadStateAsync(); StateHasChanged(); } } private async Task LoadStateAsync() { var result = await ProtectedLocalStore.GetAsync("count"); currentCount = result.Success ? result.Value : 0; } private async Task IncrementCount() { currentCount++; await ProtectedLocalStore.SetAsync("count", currentCount); } }
@uttamhj
@uttamhj 2 жыл бұрын
Hey Tim, I’m working on Blazor server app but I want to understand how we can achieve the global exception in blazor app?? Can you help us understand
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 2 жыл бұрын
I noted your recommendation by adding it to Tim's list of possible future topics, thanks.
@ShawnHepworth
@ShawnHepworth 3 жыл бұрын
You can also add the dotnet watch run to your launch settings and it will do it automatically for you. Under profiles, make the following change: "profiles": { "Live Reload (dotnet watch run)": { "commandName": "Executable", "executablePath": "dotnet.exe", "commandLineArgs": "watch run", "workingDirectory": "$(ProjectDir)", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }
@ShawnHepworth
@ShawnHepworth 3 жыл бұрын
I'm not sure if this existed when you made this video, but it works on the latest version of VS.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for the tip!
@paulrosemberg3763
@paulrosemberg3763 3 жыл бұрын
Is the encryption for session storage good enough to store public keys like Stripe, without having to resort to AWS Keys or Azure Keys?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You shouldn't be storing any keys on the client, encrypted or not. I would highly recommend storing those on the server and accessing them via secured access.
@paulrosemberg3763
@paulrosemberg3763 3 жыл бұрын
@@IAmTimCorey I am using only Blazor server - when you mention secured access are you talking about a key vault?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Session storage is on the client side (as is browser storage). Web terms can get tricky, though, in that session also might mean session on the server, which is fairly secure. However, this video demonstrates storing data on the client. As for where to store keys, Azure KeyVault is a great option.
@anarhistul7257
@anarhistul7257 3 жыл бұрын
If I were to go with Blazor webassembly, for better scalability... After my users pay for the initial page load, what kind of performance should they except compared to more traditional solutions? I keep reading "latency issues" What about server side cost?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Blazor WebAssembly runs locally so there isn't really latency issues. It will be a fast solution. Blazor Server is the one that people could be concerned about latency since it maintains a SignalR connection to the server constantly. That can scale to 20,000 concurrent users or more on one box (and can scale well beyond that using load balancing, etc. but almost no situation needs something that large).
@anarhistul7257
@anarhistul7257 3 жыл бұрын
@@IAmTimCorey it's not actually 20K users, but opened tabs. I expect (if my startup will be a success) that many of them will have a few tabs opened all day since it's a wholesale eCommerce app, in other words "for daily work" + typical visitors. So I am a bit worried about this limit since it looks expensive to scale
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Then use Blazor WebAssembly with an API and you won’t have a problem.
@anarhistul7257
@anarhistul7257 3 жыл бұрын
@@IAmTimCorey yes, thanks
@SixHatSolutions
@SixHatSolutions 3 жыл бұрын
Probably a no brainer for you but I discovered the hard way that the Razor Runtime Component is not for WASM applications. I installed tried to install the package and it blew up my project. Even though the package would not install I had to do clean-up in the .csproj file so that it would compile again.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Not fun, sorry to hear of the struggle. TY for sharing as it may help others who get impacted by the same issues.
@ufoursitsolutionpvtltd6664
@ufoursitsolutionpvtltd6664 3 жыл бұрын
Wish you happy pongal to all
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
May you have a great new year also.
@maxlin2905
@maxlin2905 3 жыл бұрын
thanks for the great video lesson, wondering if the emailing source code is work or not. I request it from multiple email address but received none.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
@chen gao - email me at Help@IAmTimCorey.com and tell me the specific source code you are wanting, including the video name, and I will get it to you.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Send an email to help@iamtimcorey.com after checking your spam filter. Make sure to mention which video it is and we will get the code to you a different way.
@maxlin2905
@maxlin2905 3 жыл бұрын
@@IAmTimCorey Thanks, I decided to take your advice which is to code along with videos. :) more funs
@khwezimngoma
@khwezimngoma 3 жыл бұрын
Tim! Tim! Tim! Tim!!!!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Khwezi! Khwezi! Khwezi!
@dontcomply3976
@dontcomply3976 3 жыл бұрын
Thank you Microsoft Blazor Team for making me hate having to go back to work on legacy Angular projects.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Attitude and perspective - the only two things we truly control.
@ryanspaindev
@ryanspaindev 3 жыл бұрын
I wonder what happens if you use virtualization and tried to print the web page?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It would only print what is displayed, I believe.
@iyadshobaki4263
@iyadshobaki4263 3 жыл бұрын
Thank you for the great tutorials. I would like to share a little trick to fix the code format faster. after you create for example " OnInitializedAsync " the cursor will be at the end of " return base.OnInitializedAsync(); ". With Backspace delete the semicolon and put it back again will format the code. Note: If you create the override method and there is no any field, property or a method before it ( You created the first thing after @code). the trick will not work properly. Note: You can write Override and look for your method without writing " Protected ".
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for the tips
@landanparker911
@landanparker911 3 жыл бұрын
is virtualize Blazor Server specific?
@gbthakkar
@gbthakkar 2 жыл бұрын
Hi Tim, I try following and it happens that if I pass integer, it goes into integer and if I pass something which is not integer then it goes in catch-all. So it just become smarter now. @page "/OptionalParameterTest/{StartCount:int?}" @page "/OptionalParameterTest/{*CustomRoute}"
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Great! I'm not sure that is something you want to rely on, though. It seems like that isn't as intuitive to the caller as it should be.
@gbthakkar
@gbthakkar 2 жыл бұрын
@@IAmTimCorey Thanks for reply. Actually I was trying this all with your video and then trying to let you know my experience. one more thing about _localValue = (await storage.GetAsync("Counter2.CurrentCount")).Value; is not working in side OnInitializedAsync it only work when I change render-mode to "Server". This is again just to let you know as my Guru, and let me know if you have specific intruction for me on the issue. Thanks for making our life easy with such nice video.
@OldCumbria
@OldCumbria 3 жыл бұрын
Hi, I've tried to download this video from youtube to view at my leisure and follow along but it fails, saying the video is not available. Any ideas?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Pretty sure that violates KZbin's terms to download videos.
@OldCumbria
@OldCumbria 3 жыл бұрын
@@IAmTimCorey Thank you. I didn't realise that.
@MikeLyncheski
@MikeLyncheski 3 жыл бұрын
There is a watch offline/download option (within youtube) for youtube premium customers (like $10/month).
@OldCumbria
@OldCumbria 3 жыл бұрын
@@MikeLyncheski Thank you; that's helpful.
@OldCumbria
@OldCumbria 3 жыл бұрын
@@MikeLyncheski Thank you; that's helpful.
@andywalter7426
@andywalter7426 3 жыл бұрын
I saw in the video you were planning a course on html and css. One topic I would love discussed here is indexdb and web sql. I see from using developer tools those are options. Would love to see how they work. Can be good options for some cases.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@hrvojevoda4910
@hrvojevoda4910 3 жыл бұрын
I ask for source but I didn't get mail for it. I cannot get it or?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
I regret you are having trouble with that. Please email me at HELP@IAmTimCorey.com and tell me which video's source code you want. I will help you get access.
@darklen14
@darklen14 3 жыл бұрын
Just want to point out that the razor runtime compilation does not work in Blazor yet. You have to compile and load each time. A big letdown when you have to work on styling and you are forced to restart the application to check your changes. There are a few paid services out there that can mimic runtime compilation.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
That is coming this fall.
@morhebbek
@morhebbek 3 жыл бұрын
hello master Tim i have a suggestion for a topic it is RabbitMQ, this is the first time i dont find something on your channel! can you make something that combines Redis, Mongodb and RabbitMQ? it would be great to enforce your previous lessons and learn something new, and showinig us how the tools work together and as always, thank you
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks, added to the suggestions list.
@ibrahimhussain3248
@ibrahimhussain3248 3 жыл бұрын
🤩
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
👍
@nvnYT26
@nvnYT26 3 жыл бұрын
👍
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks
@sipi41
@sipi41 2 жыл бұрын
I can't wait for the next video, on authentication... I will buy your Blazor course, any discount coupons? ( I'm poor :-(, at least now... )
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Not right now there are not, no.
@RelevantDad
@RelevantDad 3 жыл бұрын
What's the point of "is not null" vs "!= null"?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Readability.
@user-dm4cz6sg1t
@user-dm4cz6sg1t 3 жыл бұрын
Thank you so much for your efforts. Here is SouthKorea. Is Above Source Code working well? No matter how much send to me sad then. Still, my email is nothing from there.........
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm sorry, I don't have time to review code for you, if that is what you are asking. Work the problem through and break it down into small chunks. Work each chunk. You can do it.
@user-dm4cz6sg1t
@user-dm4cz6sg1t 3 жыл бұрын
@@IAmTimCoreyThank's for your reply! and sorry for my clumsy writing! But my meaning is I couldn't get the Source Code. Anyway... I will make the code my own after watching your video... one by one. Thank you so much!
@andywalter7426
@andywalter7426 3 жыл бұрын
I tried the sample for webassembly but could not get protectedlocalstorage to work. I try to use the namespace but the .server does not show up. Would be disappointing if this does not work on webassembly. Actually in many cases webassembly is better because you now have static sites which allow unlimited for free. For app services, a person is limited to only 10 free sites so if a person already created 10 of them, they can't ever create any more sites.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Check out the link to the documentation for more information.
@andywalter7426
@andywalter7426 3 жыл бұрын
@@IAmTimCorey I did but nothing even showed about protectedlocalstorage though. I already knew how to do local storage unprotected with webassembly.
@mctainshcom
@mctainshcom 3 жыл бұрын
The first project does not work. The Counter does not update when button is pressed
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Debugging is a skill every developer must develop. Break the problem down and address it in small part, making sure each part works before going to the next. You can do this!
@selahattinkaradogan2744
@selahattinkaradogan2744 3 жыл бұрын
Why you didnt choose blazor server as project type
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I did choose Blazor Server to show off these topics.
@selahattinkaradogan2744
@selahattinkaradogan2744 3 жыл бұрын
But at first of the video you have chosen asp.core(model view controller ) project type isnt it
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yes, and I stated the reason - we were showing off how to integrate Blazor into MVC (and Razor Pages).
@RelevantDad
@RelevantDad 3 жыл бұрын
I've never heard it pronounced "enooms" before, but I guess it makes sense considering the word it derives from.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yep.
@jondolar64
@jondolar64 3 жыл бұрын
If you edit the file that you moved and then save it, I think intellisense will work.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for the tip.
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
Have you looked into AlpineJS btw? I use it quite a bit with Tailwindcss (which you should look into as well, it is awesome, especially with UI). The question is whether AlpineJS and Blazor could work well together? Alpine is quite lightweight and might augument some elements perhaps? I actually got an example here from a friendly guy. (Blazor+Alpine+Tailwind) gist.github.com/ethylon/66a8b5a387017ab3c2820a33e7d6022c
@Coeur85
@Coeur85 3 жыл бұрын
CTR+D to duplicate a line tim 😘
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yep, I just forget it because I don't use it that often.
@u1234dwn
@u1234dwn 3 жыл бұрын
Hi Tim, would also be great if you could add time stamps. Nice video :))
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Actually, the viewer Community often contributes that type information for many of my videos. If you notice a video is timestamped, give a shout out to the contributor, since likely you can find their contribution in the video comments. If that truly helps you, feel free to capture and share the timestamps as a new comment and I will try to update it to the video.
@GameDevNerd
@GameDevNerd Жыл бұрын
*Micro optimization:* Instead of: *if( n % 2 == 0 )* Use this faster binary op: *if( n & 1 == 0 )* Binary operators are usually a single instruction for a processor, whereas modulus is a couple CPU instructions, at least. I'm a game developer by trade, and was curious about how Blazer works ... I've always avoided the web like the plague because I hate Javascript, Python and so-called "dynamic" (*cough* _weakly_ typed!) languages. C# instead of Javascript made a web page/app sound like it might be fun rather than masochistic suffering, lol. But I figured I'd share a tiny optimization for fast code from the game dev and low-level code world. 🌎
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks for sharing.
@chrisjohansson9971
@chrisjohansson9971 3 жыл бұрын
Interesting, I'm using syncfusion controls and when I run dotnet watch. run and make a change. it times out and cannot connect to server.
@marcusmaunula5018
@marcusmaunula5018 3 жыл бұрын
How are they in general? I signed up for the community edition but have not tried yet. Sadly not all clients qualify for it :).
@chrisjohansson9971
@chrisjohansson9971 3 жыл бұрын
@@marcusmaunula5018 I'm using them for blazor.. they have alot of cool stuff you can do and coming compared to others currently out there. still working through the bugs but support is pretty good
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Maybe try a reboot of Visual Studio. It sounds more like a glitch than a problem with the controls.
@selahattinkaradogan2744
@selahattinkaradogan2744 3 жыл бұрын
Can we use. Net core 5.0 also
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm not sure what you are asking. We did use .NET 5 in this video.
@selahattinkaradogan2744
@selahattinkaradogan2744 3 жыл бұрын
@@IAmTimCorey but you have chosen.core 5.0 at video
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
This is just UI options. We chose .NET Core instead of .NET Framework. Then we chose ASP.NET Core 5.0 for our MVC project because ASP.NET Core is still the name so ASP.NET Core 5.0 is .NET 5. Think of .NET 5 as the next version of .NET Core. They just dropped off the Core since it will all be unified.
@selahattinkaradogan2744
@selahattinkaradogan2744 3 жыл бұрын
Ok tim i Got it
@mtranchi
@mtranchi 3 жыл бұрын
i like this vid, however, apologizing in advance for offering unsolicited advice, i feel you spend too much time explaining tangential stuff, for example, the modulus operator. If stuff like that is important to your audience, it prolly woulda been faster for you to gloss over it while providing a link in the description. Me, i'm here for the Blazor stuff. Other than that, i do like your vid, very informative, and even tangential stuff like the new() operator is great because you don't slow down the vid with a full explanation. Keep up the great vids!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for the feedback. I believe in giving context for what I am teaching and that takes time. My goal is not entertainment but true education. Based on the hundreds of positive responses vs the rare critique, I think I'm in about the right balance for my audience, still I need to hear both sides to be sure I keep that balance. Thanks!
@mtranchi
@mtranchi 3 жыл бұрын
@@IAmTimCorey Yeah... i apologize if i somehow came across as someone who wants to be entertained. Was just saying the tangentials can be a bit annoying as i'm here for the title of the vid: Blazor, not to learn about the modulus operator. But hey, you know your audience, i'm just some schmuck (that happens to be subscribed)
@andywalter7426
@andywalter7426 3 жыл бұрын
@@mtranchi I actually liked how he explained the mod operator. I did not know too much of it until now. I personally like it when he adds extras to it. It actually adds more to the video so a person can actually get more value from the video.
@m0n3ysh0t
@m0n3ysh0t 3 жыл бұрын
@@IAmTimCorey Tim this is what I most love about your training. Sure they are long but it is very nice for the less proficient to fully understand the why and how of things. There are plenty of sources out there for more advanced users but I love that you give the underlying understanding of why you did what you did etc. it really helps the Junior people out here get a better understanding of the choices made. Keep it up.
@SayWhaaaaaaaaaaaaaaaaaaaaaaat
@SayWhaaaaaaaaaaaaaaaaaaaaaaat 3 жыл бұрын
AMAZING... FIRST TIME EVER MICROSOFT DID SOMETHING FIRST AND BEST
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Interesting perspective.
@GeoAI-55
@GeoAI-55 3 жыл бұрын
Blazor SERVER Improvements in .NET 5?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Most of these are for both Blazor Server and Blazor WebAssembly. I note the differences when there are any.
@loudfiero
@loudfiero 3 жыл бұрын
is not null ... C# becomes more like VB bliss... ;-)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
LoL 👍
@bobweiram6321
@bobweiram6321 2 жыл бұрын
Blazor has the danger of looking like 1990s PHP.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 2 жыл бұрын
Maybe sorta...
@FishHeadswg
@FishHeadswg 3 жыл бұрын
Sometimes I wonder how dumb he thinks we are when he explains modulo or how to open command prompt. BTW, "modulo" is the operator, "modulus" describes the 5 in "modulo 5".
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I try to teach to as wide an audience as possible. You weren't born knowing these things. Just because you know something doesn't mean everyone else knows it. Every time you assume your audience knows something, you shrink down the number of people you can help. I try to help as many people as possible without making it overly tiresome for anyone.
@FishHeadswg
@FishHeadswg 3 жыл бұрын
@@IAmTimCorey Oh yeah I get it, I was saying it jokingly. I probably should have worded it better. I actually like how dumbed-down you make a lot of your videos, that's why I'm here. Keep it up.
@pzoneapp7023
@pzoneapp7023 3 жыл бұрын
.NET 5 is slow.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Slow is a relative statement. Slower than what? .NET 3.1? That is incredibly incorrect. Also, what part of .NET 5? For example, gRPC in .NET 5 is faster than Go, C++, and Java's implementation of gRPC.
Blazor Server Components - Making Razor Components Easy to Use
42:23
Intro to ASP.NET Core Razor Pages - From Start to Published
1:16:44
IAmTimCorey
Рет қаралды 348 М.
Can you beat this impossible game?
00:13
LOL
Рет қаралды 69 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 126 МЛН
When Jax'S Love For Pomni Is Prevented By Pomni'S Door 😂️
00:26
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 3,2 МЛН
Intro to Redis in C# - Caching Made Easy
1:27:29
IAmTimCorey
Рет қаралды 172 М.
3 Ways Every Developer Fails And How To Avoid Them
26:16
IAmTimCorey
Рет қаралды 4,2 М.
10 C# Libraries To Save You Time And Energy
33:59
IAmTimCorey
Рет қаралды 204 М.
Top 5 Free Blazor Resources (plus a couple of extras)
17:32
IAmTimCorey
Рет қаралды 73 М.
Can you beat this impossible game?
00:13
LOL
Рет қаралды 69 МЛН