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

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024
  • 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.iamtimcore...
    www.iamtimcore...
    Source Code: leadmagnets.ap...
    Mailing List: signup.iamtimc...
    More Info:
    Blazor in MVC: docs.microsoft...
    InputFile: docs.microsoft...
    Virtualize: docs.microsoft...
    Browser Storage: docs.microsoft...

Комментарии • 220

  • @larrymcfarlane6202
    @larrymcfarlane6202 3 года назад +5

    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.

  • @JoeBonez
    @JoeBonez 3 года назад +8

    Thank you, sir. That virtualization thing alone was worth the watch time.

    • @IAmTimCorey
      @IAmTimCorey  3 года назад +1

      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)

  • @Otonium
    @Otonium 3 года назад +1

    Thank you very much, the 2 hours seemed 10 minutes. Your enthusiasm is contagious Tim, and makes us learn even more.

  • @codecomposer88
    @codecomposer88 3 года назад +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.

  • @dickybird08
    @dickybird08 3 года назад +3

    Awesome! Looking forward to the Blazor Authentication video!

  • @mustafasuyi3151
    @mustafasuyi3151 2 года назад

    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.

  • @nove1398
    @nove1398 3 года назад +6

    Nice video, learned a few bits I didn't know before. Looking out for authentication changes video.

    • @IAmTimCorey
      @IAmTimCorey  3 года назад +1

      Glad it was helpful!

    • @billcarpenter1844
      @billcarpenter1844 3 года назад +1

      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

  • @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".

  • @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!!

  • @abdallabenomran6809
    @abdallabenomran6809 3 года назад +8

    The best Man in USA ..Thanks a lot .

  • @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 года назад +1

      I'm glad it was so helpful.

  • @cleancoder3838
    @cleancoder3838 3 года назад +1

    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";

  • @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 года назад +1

      @@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.

  • @billcarpenter1844
    @billcarpenter1844 3 года назад

    Thanks for another great video Tim! Blazor just keeps getting better.

  • @cryptodapps3340
    @cryptodapps3340 3 года назад +1

    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 года назад +2

      Glad it helped. Be sure to update in Stackoverflow to save someone else the pain.

  • @pilotboba
    @pilotboba 3 года назад +3

    1:13:06 "... a blazing two minute tutorial..." I see what you did there. :)

    • @IAmTimCorey
      @IAmTimCorey  3 года назад +3

      Seeing if you were still awake.

  • @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"
    }
    }

  • @mtranchi
    @mtranchi 3 года назад +5

    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 года назад +4

      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 года назад +2

      @@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 года назад +1

      @@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.

  • @davidkeeley1516
    @davidkeeley1516 3 года назад +1

    super stuff Tim - virtualization is very useful!

  • @skbell821
    @skbell821 3 года назад +2

    Thanks for a great video, Tim! You mention doing a video on authentication; will that include tying the Blazor Server app into CAS authentication?

  • @getcomann
    @getcomann 3 года назад +1

    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 года назад +2

      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);
      }
      }

  • @sipi41
    @sipi41 3 года назад

    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.

  • @YousefSh
    @YousefSh 3 года назад +1

    @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.

  • @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.

  • @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.

  • @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.

  • @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 ".

  • @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.

  • @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 года назад +2

      Attitude and perspective - the only two things we truly control.

  • @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.

  • @peteroganwu951
    @peteroganwu951 3 года назад +1

    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()) { ...

  • @keithmiller31
    @keithmiller31 3 года назад

    Very nice video. I second a request for a video on the authentication changes.

  • @kevincordell9539
    @kevincordell9539 3 года назад

    I like the css isolation. Just like Angular!

  • @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...

  • @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. 🌎

  • @ajazahmad2386
    @ajazahmad2386 3 года назад

    So Much Thanks.vERY clEARLY AND PATIENCE Y ELABORATING THE CRITICAL TOPIC.

  • @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?

  • @knssoftware6018
    @knssoftware6018 3 года назад

    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.

  • @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.

  • @uttamhj
    @uttamhj 3 года назад

    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

  • @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.

  • @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 :-)

  • @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.

  • @ufoursitsolutionpvtltd6664
    @ufoursitsolutionpvtltd6664 3 года назад

    Wish you happy pongal to all

    • @IAmTimCorey
      @IAmTimCorey  3 года назад

      May you have a great new year also.

  • @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

  • @setiadisudrajat5031
    @setiadisudrajat5031 3 года назад

    it is cool, thanks Mr Tim

  • @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.

  • @thepunisher2330
    @thepunisher2330 3 года назад

    Thanks so much sir, i was looking for that..

  • @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 года назад +1

      Thanks, added to the suggestions list.

  • @andywalter7426
    @andywalter7426 3 года назад +1

    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 года назад +1

    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.

  • @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

  • @sipi41
    @sipi41 3 года назад

    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  3 года назад

      Not right now there are not, no.

  • @RelevantDad
    @RelevantDad 3 года назад

    I've never heard it pronounced "enooms" before, but I guess it makes sense considering the word it derives from.

  • @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?

  • @baradongkamatis
    @baradongkamatis 3 года назад

    Awesome tutorial, thanks!

  • @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.

  • @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 года назад +1

      You can do SEO well with any of those approaches.

  • @maxlin2905
    @maxlin2905 3 года назад +1

    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

  • @redengallera8305
    @redengallera8305 3 года назад

    Million thanks!

  • @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.

  • @Coeur85
    @Coeur85 3 года назад +2

    CTR+D to duplicate a line tim 😘

    • @IAmTimCorey
      @IAmTimCorey  3 года назад

      Yep, I just forget it because I don't use it that often.

  • @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!

  • @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 года назад +1

      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 года назад +1

      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 :). ruclips.net/video/rfPQytn7tfk/видео.html but maybe you can do something that fits into your long running series?

  • @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.

  • @khwezimngoma
    @khwezimngoma 3 года назад +1

    Tim! Tim! Tim! Tim!!!!!

  • @aimanemeish3482
    @aimanemeish3482 3 года назад

    brilliant

  • @0x7273
    @0x7273 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.

  • @RelevantDad
    @RelevantDad 3 года назад

    What's the point of "is not null" vs "!= null"?

  • @jondolar64
    @jondolar64 3 года назад

    If you edit the file that you moved and then save it, I think intellisense will work.

  • @u1234dwn
    @u1234dwn 3 года назад

    Hi Tim, would also be great if you could add time stamps. Nice video :))

    • @IAmTimCorey
      @IAmTimCorey  3 года назад +1

      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.

  • @selahattinkaradogan2744
    @selahattinkaradogan2744 3 года назад +1

    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).

  • @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.

  • @SayWhaaaaaaaaaaaaaaaaaaaaaaat
    @SayWhaaaaaaaaaaaaaaaaaaaaaaat 3 года назад +1

    AMAZING... FIRST TIME EVER MICROSOFT DID SOMETHING FIRST AND BEST

  • @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 RUclips'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.

  • @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!

  • @landanparker911
    @landanparker911 3 года назад

    is virtualize Blazor Server specific?

  • @nvnYT26
    @nvnYT26 3 года назад +1

    👍

  • @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

  • @ibrahimhussain3248
    @ibrahimhussain3248 3 года назад

    🤩

  • @loudfiero
    @loudfiero 3 года назад

    is not null ... C# becomes more like VB bliss... ;-)

  • @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 года назад +1

      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 года назад +1

      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

  • @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.

  • @bobweiram6321
    @bobweiram6321 3 года назад

    Blazor has the danger of looking like 1990s PHP.

  • @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 года назад +5

      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 года назад +1

      @@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 года назад +12

      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.