.NET 8 Blazor: Render Modes + Demo App Download

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • What are render modes in Blazor? When should you use them? We built an app you can download and see how each render mode works.
    Link to GitHub repo:
    github.com/Cod...
    -------------------------------------------------------------------------------------------------------
    👨‍🏫 Self-Paced .NET Bootcamp Course (Includes FREE courses)
    learn.coderfou...
    🙌 Support the channel and become a channel member
    / @coderfoundry
    📖 Buy the Book: Breaking the Code
    geni.us/breaki...
    👕 Grab some CF merch
    teespring.com/...
    🗣 Join us on Discord
    ​ / discord
    👓 Buy the blue-light blocking glasses we use at CF. Pixel Eyewear Glasses ($5 off with coupon code CODERFOUNDRY)
    www.pixeleyewe...
    💻 How to get your first coding job
    coderfoundry.co...
    🎥 The equipment we use at Coder Foundry
    kit.co/CoderFo...
    DISCLAIMER: This video and description may contain affiliate links, which means that if you click on one of the product links, we’ll receive a small commission. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

КОМЕНТАРІ • 54

  • @betterlifeexe4378
    @betterlifeexe4378 Рік тому +5

    My wife is starting to learn C# and HTML at the same time, and i've already got her making a blazor shopping cart. It's really amazing how much you can accomplish with go tutorial and a good framework like blazor.

  • @emcwealth
    @emcwealth 9 місяців тому +1

    i've been using blazor professionally since .NET Core 3.1.... ever since I first saw it, I knew in my gut that this was going to be the future for web development (i've been writing software for 25+ years)... it was that good back then... and now it's pretty phenomenal...!

  • @DarkOutsideNow
    @DarkOutsideNow 8 місяців тому

    Amazing video. As a new coder, I'm making a professional web app by myself. I understand the different modes better, their limitation, and how Auto places it's role in Blazor. The video covers the render modes , understanding the communication per rendermode, and helpful visuals. I am so excited that I found your video. Its what I needed.

  • @nickmillerable
    @nickmillerable 3 місяці тому

    This is a great idea for a sample app, great job.

  • @adnerb4307
    @adnerb4307 2 місяці тому

    Awesome video, thanks!!! Suppose you have a huge web application and you want to use Auto Render Mode, can you do or leverage lazy loading? If yes, can you share some video and codes for this one? Thanks

  • @MrFEMGM
    @MrFEMGM 9 місяців тому

    Very useful video and example, thanks a lot. Blazor is really an excellent choice for many cases.

  • @waleedbensumaidea3947
    @waleedbensumaidea3947 8 місяців тому +1

    Thank you so much.
    I'm learning Blazor for the first time on NET 8.
    I start working on enterprise application using blazor net8, but I got confused by those render modes.
    Like which render mode should i choose for each page in my project.
    Also because there is two projects Server and Client. Here comes new questions about pages location.
    Where should i put my pages.
    Because there is two folders called Pages in Both Server project and client Project.
    😂 Sorry, but i feel like i lost in Blazor.
    And if i put most my pages in client project but i let their render mode to interactiveServer
    Does that mean no matter where pages are located, the important thing is render mode

    • @CoderFoundry
      @CoderFoundry  8 місяців тому +1

      You need client and server projects. We are releasing a course soon that will help.

  • @tk5782
    @tk5782 Місяць тому

    Thank you for a good explanation of the differences. Just one question about the code, why do you separate the client and server code in separate projects when they could live in one? Afterall, it's not likely that you're going to replace one or the other with something different so what's the benefit of this separation of concerns?

    • @CoderFoundry
      @CoderFoundry  Місяць тому

      Client code executes on the client. Server code executes and runs on the server.

    • @tk5782
      @tk5782 Місяць тому

      @@CoderFoundry Understood, but what benefit is there in separating them in 2 projects?

  • @mohammadmz1058
    @mohammadmz1058 Рік тому

    Excellent video, very good explanation.

  • @coderbdev
    @coderbdev Рік тому +1

    Very helpful. Thanks :)

  • @enriquesneffels3053
    @enriquesneffels3053 Рік тому +1

    ​ Hello, @CoderFoundry ! Do you have any plans to update your self-paced bootcamp online to .net 8 and the latest version of C#, and Blazor? I saw the course, but it looks outdated. It doesn't have Blazor, and it shows .Net 6. I would like to learn C# and Xamarin with you, sir.

    • @CoderFoundry
      @CoderFoundry  Рік тому +3

      We have a .net 7 blazor course that builds an app called ai chef. It uses blazor wasm, c# web api, and the open ai api. The very latest production version of .net.
      .Net 6 mvc is still relevant. There are no real changes to mvc under .net7. So we kept it the same.
      .Net 8 has not been released yet. It's still in preview. We will create new .net 8 content in early 2024. Since .net 8 will not be released until November 2023. We have to wait until it's ready before we can record new content. I hope that helps.

    • @enriquesneffels3053
      @enriquesneffels3053 Рік тому

      @@CoderFoundry thanks so much for clarifying. I

  • @ProDevelopmentPK
    @ProDevelopmentPK 10 місяців тому

    What If entire Application is Server Side Interactive but I want to make one Component like Login a Static Server. As it doesn't have any attribute how can I do this ?

    • @CoderFoundry
      @CoderFoundry  10 місяців тому

      Yes. Login would be interactive. But you could for example have a static home page. That is just html and links. The sample actually does this out of the box. So you can mix any of the render modes.

  • @FearGod123
    @FearGod123 10 місяців тому

    Thank you very much !

  • @sammynava5357
    @sammynava5357 9 місяців тому

    When testing the SSR - Stream page on my development PC (after uncommenting the delay), I noticed that the "placeholder effect" only works when using Kestral to run the solution. If I use IIS Express, the page does not load at all until the delay is over. Is that expected behavior?

    • @CoderFoundry
      @CoderFoundry  9 місяців тому

      I just tried it and that seems to be the case. In production, it works as expected.

  • @maacpiash
    @maacpiash Рік тому

    Can we do AOT build for auto mode, i.e. initialize with SSR, then download WASM files (instead of DLL files and the Mono runtime) in the background?

    • @CoderFoundry
      @CoderFoundry  Рік тому

      So auto mode will run the component first with SignalR. The reason that it does not use SSR is because interactivity has to be coded with js. SignalR and Wasm will use identical code base. The only difference is the render mode attribute. With Auto mode the component first runs with SignalR then in the background the files needed for WASM are downloaded.

    •  11 місяців тому

      ​@@CoderFoundryIs there an automatic hand-off between server and wasm versions when the files are ready? Or is the component stuck on server mode until navigation/refresh?

  • @richardc215
    @richardc215 9 місяців тому

    Good stuff.

  • @tjf7101
    @tjf7101 Рік тому

    Possibly dumb Q. This is something the September cohort will be building?

  • @dawiemos
    @dawiemos 10 місяців тому

    I keep on getting this error: Severity Code Description Project File Line Suppression State Details
    Error CS1061 'IRazorComponentsBuilder' does not contain a definition for 'AddServerComponents' and no accessible extension method 'AddServerComponents' accepting a first argument of type 'IRazorComponentsBuilder' could be found (are you missing a using directive or an assembly reference?) Server C:\Users\XXXX\source
    epos\EmboBlazorRenderModes\Server\Program.cs 9 Active

    • @CoderFoundry
      @CoderFoundry  10 місяців тому

      This built with rc1 and rc2 has been released. We have a rc2 branch on github

    • @dawiemos
      @dawiemos 10 місяців тому +1

      Thank you for the video and the reply@@CoderFoundry

  • @Blr046
    @Blr046 9 місяців тому

    @attribute [RenderModeServer] is giving compile error in MovieListSignalR.razor
    Error (active) CS0246 The type or namespace name 'RenderModeServerAttribute' could not be found (are you missing a using directive or an assembly reference?)

    • @CoderFoundry
      @CoderFoundry  9 місяців тому

      This changed with rc2 to
      @attribute [RenderModeInteractiveServer]

    • @Blr046
      @Blr046 9 місяців тому

      @@CoderFoundry Thanks a lot. I liked the LIVE Coding video to keep the razor files clean.
      Could you please demonstrate the API project as well for this series along with a basic CRUD operations?

    • @CoderFoundry
      @CoderFoundry  9 місяців тому

      We will do more coding focused videos. We also have a new course coming out in Jan 2024 that will cover everything.

  • @kvelez
    @kvelez 9 місяців тому +1

    Cool

  • @Sladeofdark
    @Sladeofdark Рік тому

    Does WASM have the same problems as Silverlight?

    • @CoderFoundry
      @CoderFoundry  Рік тому +4

      Silverlight was a plug-in technology. So they are not the same in any way. The reason silverlight was deprecated along with flash was plugins were removed by the browser venders. Wasm is an approved language for all browsers. Its a standard the same as javascript is. We build wasm apps with all api endpionts, CSS and html. Wasm sits in the middle and updates the dom so we don't have write dom update code in js. We will build apps in a modern stack and it is part of the specification for browsers. It is going to be fantastic.

    • @mouradaissani8957
      @mouradaissani8957 Рік тому

      not the same at all

    • @ericblankenburg
      @ericblankenburg Рік тому

      Blazor is not a plugin. It uses web assembly, which is a standard part of all modern browsers.

  • @ProDevelopmentPK
    @ProDevelopmentPK 10 місяців тому

    Using .NET8 RC2 I created a Blazor Server App with Global Interactivity and with Identity Authentication, then I added MudBlazor to Make it look better and Layout worked but not the Interactivity until I set it up in App > Routes and If I do that then Identity's Login component stops working. This is a total mess there is no documentation on how to solve this, Without Interactivity I can't validate Register/Login Components and Can't show Snackbar Message or Check Boxes. I think you should make your next video playing with Authentication and Interactivity with Blazor Server App.

    • @CoderFoundry
      @CoderFoundry  10 місяців тому

      We are doing a live coding session Monday but authentication is not this code along. We are building the course now that does include auth.

    • @ProDevelopmentPK
      @ProDevelopmentPK 10 місяців тому

      @@CoderFoundry Looking forward to that Session and course. There is also CustomAuthenticationState thing in Blazor may be include that as well in your course. So, we don't use Identity stuff at all (Its Tables and Code First thing)

    • @CoderFoundry
      @CoderFoundry  9 місяців тому

      The course will cover indentity in detail. And it will also build a visual studio template, so instead of using the web app as a starting you start with web app plus db and indentity. Makes it easy to start new projects.

    • @CoderFoundry
      @CoderFoundry  9 місяців тому

      At the time I'm writing this, you can not use global interactivity with identity. But this is a good thing it makes these pages really fast.

  • @AmirImam-ir5gb
    @AmirImam-ir5gb Рік тому

    Blazor is the best front end framework, but it is not popular here in the middle east (Egypt for example). I think we need some support to replace flutter with Blazor