Intro to Blazor in .NET 8 - SSR, Stream Rendering, Auto, and more...

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 276

  • @OujouMon
    @OujouMon ปีที่แล้ว +36

    Already Blazor dev here, but still learning new every moment. Big thank you for Tim !! Been giving links your videos to everybody when people asks where to learn blazor. Keep up the good work.

  • @FrankTank7777
    @FrankTank7777 8 หลายเดือนก่อน +2

    Hi Tim, awesome tutorial. Getting into blazor now and LOVE it. The projects layout has been refined so much it is so clean, love it, no extra fluff, just what you need. Thank you so much for explaining the difference between SSR and WASM, especially the gotchas (with examples), so good to know for future projects.

    • @IAmTimCorey
      @IAmTimCorey  8 หลายเดือนก่อน

      Glad it was helpful!

  • @arnotek
    @arnotek ปีที่แล้ว +3

    "I was THIS close chief!!!" (I wonder is how many people get the reference?) I just completed the older Blazor course last month and unfortunately, I am outside the refund window by several weeks. Oh well. (I still plan to purchase the new Blazor course. But hey, putting these courses together is a LOT of work - especially when they are done at this level. They are well worth the money.) Ironically, I was just about to start a new Blazor project in the beginning of December. I am going to delay the start of the project until after I finish the new Blazor course. Thanks for getting this course out in a timely manner!

  • @guyincognito1985
    @guyincognito1985 ปีที่แล้ว +53

    It's 2023 and the number of frameworks for creating "todo lists" and "+1 counters" is overwhelming!

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +28

      It is an easy way to show off how things work without making a complex app that confuses people with irrelevant details. I'm curious how you would show off a Blazor Web App. What would you build to show off what it can do without making a complex app? As a person who builds demos to show off technologies, I'm always looking for new demo ideas.

    • @binks3371
      @binks3371 ปีที่แล้ว +3

      @@IAmTimCoreyits not about what it can do, but what it cannot do. If you're looking for ideas, do something more complex like a gantt chart. It is also a ToDo list of sorts but with a kink.

    • @Salvotation
      @Salvotation ปีที่แล้ว +1

      @@IAmTimCorey I’m totally new to programming so these suggestions might not be practical but perhaps some ideas:
      restaurant ordering, no billing just table number and what they want
      Good inwards: scans product received to a warehouse and adds them to stock levels
      TV guide for the week: shows some TV channels and what is on throughout the week

    • @headcode
      @headcode 10 หลายเดือนก่อน

      @@IAmTimCoreyIt's too bad OP didn't respond to your question, but I didn't read his comment as a slant toward your content, but rather the overwhelming number of frameworks/libraries out there for developers to choose from (React, Angular, Next.JS, Vue, Blazor, etc.). How are new developers to know which framework to choose and why? Outside of "whatever your employer is using, learn that," if a developer wants to make an app in their free time, at home, there are too many "React is the best! No, Vanilla JS is and always will be king! Angular, bro! Vue is the slimmest, especially when paired with Vite! Na, Blazor is good because you can create the whole webpage in C#." Then come the Python kids who only ever learn Python and want to do everything with Python, because that's all they've learned and that's all they're willing to learn...
      Personally, I've worked with React, Angular, Vue, .Net (for API's only) and SQL, Vanilla JS and TS, and my favorite coding language, by far, is C#, but I've never worked somewhere that had a Blazor app, so I'm learning simply due to my affinity for C# and Visual Studio, but not because I've learned of any particular performance/security benefit with Blazor over the other options... I think maybe OP just wanted to know "why Blazor."

    • @clarkflavor
      @clarkflavor 10 หลายเดือนก่อน +14

      ​@@IAmTimCorey I'd argue that watching another "+1 counter" being made IS being "confused by irrelevant details". Creating a simple CRUD app, would be relevant. Hooking it up to a database, would be relevant. Making some form of login functionality, would be relevant. I'm sure you agree.

  • @shootingblueyes
    @shootingblueyes 6 หลายเดือนก่อน +1

    Finally understand the value of dependency injection, honestly I've mostly just been doing it because of convention and style.

    • @IAmTimCorey
      @IAmTimCorey  6 หลายเดือนก่อน

      I am glad it was helpful.

  • @svierregger
    @svierregger 11 หลายเดือนก่อน

    I've been following Blazor for several years and have been put off having to select brittle Signal R or bloated WASM. I was pleased to see SSR is the default in .Net 8 Blazor. - no WASM or Signal R required. Also, interactivity is accomplished using standard Javascript. Brilliant. You get the benefits of Razor Components, the performance of SSR and industry standard interactivity support. I frankly don't understand why SSR isn't the preferred approach to Blazor apps. The magic associated with WASM and SignalR comes at a significant cost, even if the cost has been lessened somewhat in .Net 8.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      I don't know that the cost for SignalR/WASM was quite as high as you are saying, but SSR does make the whole experience more efficient for sure.

  • @XXnickles
    @XXnickles ปีที่แล้ว +4

    I like the new models they are proposing. SSR and enhanced navigation are a most welcome improvement. I am moving my web assembly project to the new model, and I am noticing way less complexity doing what makes sense in the server and using Wasm with minimal API (within the same project) for interactivity. I am even considering if I really want to use Wasm and instead go with HTMX taking advantage of the new "render anywhere" feature; that is something that I am planning to try at some point. I think what is going to be a BIG problem for most devs is get around on what happens in the client and what happens in the server, the two-project separation tried to be the approach to guide people on it, which to me was and straight forward easy to understand approach, but it seems people are getting even more confused. Great introductory video btw!

  • @christiantricarico
    @christiantricarico 9 หลายเดือนก่อน

    Great introduction. I got all the main differences with .NET 7 Blazor. It would be interesting to demonstrate how to migrate a Blazor project from .NET 7 to .NET 8. Thank you Tim.

    • @IAmTimCorey
      @IAmTimCorey  9 หลายเดือนก่อน +1

      Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/

  • @Patrick-il3uy
    @Patrick-il3uy 3 หลายเดือนก่อน

    Total Blazor beginner here. I like the server + client style with WebSocket. It's so much more fun and often people split their projects in frontend/backend when they don't have to. For example you can use Django + htmx or the Phoenix framework.
    I'm really looking forward for .NET 9 updates regarding Blazor Server

    • @IAmTimCorey
      @IAmTimCorey  3 หลายเดือนก่อน +1

      The biggest downside of Server is the need for a constant WebSocket connection. As long as you are ok with that and the resources it costs you, it is a great option.

  • @NicholasStein
    @NicholasStein 8 หลายเดือนก่อน

    I was trying to get up the default new Blazor app up and running. This episode was very helpful in getting up to speed with the new stuff, and the better component models in particular. Of course you have not talked about many of the other challenges: data storage, auth, state, APIs, etc. I am pretty excited about SSR because that means you can run the front end from a Azure Static Web Site or even from a blob storage account. I have also been looking into other ways to do the interactivity like HTMX.

  • @jollyvoqar195
    @jollyvoqar195 7 หลายเดือนก่อน +1

    This may finally help me convince the powers that be to let me rewrite "my baby" - I've managed a backend intranet piece for 20+ years that is still in framework web forms and is beyond pasta due to how many people worked on it for so long before the concept of code reviews and such were ever "things." I'm used to it all and have always been effective despite the mess but it's increasingly brutal to make sophisticated things happen. That and no other dev is ever effective in "my" code base because it's such a disaster - and most devs produced in the past 10 years that I've encountered seem to only be able to understand code they author themselves or that's Azure oriented as apparently MS has won the war and now most c# devs only learn how to do anything Azure and are oblivious to the history of coding and/or the fact that one can produce code without paying MS by the nanosecond for all things.

  • @waynehawkins654
    @waynehawkins654 ปีที่แล้ว +1

    Amazing Tim, yet another great video and you always seem to show something new (or forgotten and a reminder). And it's worth a call out to Microsoft, you guys' rock and the framework you have develop here is incredible.
    One thing you said Tim in this video on the lines of something like "Blazor Web part is kind of a API". Keen to know more on this and around authentication and do we need to now use API for a Auto (server\WASM) web project? I know you said your going to do a video on Authentication in .NET 8 soon. Look forward to it.

  • @ionutb123
    @ionutb123 ปีที่แล้ว +1

    With Blazor in .NET 8 I would guess that more and more start-ups will adopt this tech stack. It would be GOLD if you find time to create a course on building a full production SaaS App with Microsoft technologies like Blazor, Azure and so on. I think it is going to be a best seller :)), but maybe it's just me and you don't see a market fit for a course like this :P. All the best

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +6

      I'll definitely be building a full application with Blazor. I'm actually working through ideas now, before I pitch them to sponsors so that hopefully we can get a full course here on TH-cam for free. Maybe even a couple of them.

    • @ionutb123
      @ionutb123 ปีที่แล้ว +2

      @@IAmTimCorey thanks for the reply. You shoud pitch Syncfusion to sponsor the course :P and use their UI library :)

    • @mrt7948
      @mrt7948 9 หลายเดือนก่อน

      Syncfusion guys are very annoying, I had it once they're keep calling me to purchase it's product though I said I am no way close to their limit to buy it. And it kept me giving notification for activation. So I abandoned it finally.

  • @chrisjohansson9971
    @chrisjohansson9971 ปีที่แล้ว +2

    Took a look at your new blazor course. I noticed when you create the blazor web app with both interactivity types, in the wasm client for counter it has @rendermode InteractiveAuto instead of what you had in your .net 8 preview

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Yep, they changed that right before launch.

  • @maxamundsen
    @maxamundsen ปีที่แล้ว +3

    I really like the concept of Blazor in .NET 8, but I feel like it would get too confusing to track what belongs in each project. Like you said in the video, the wasm application does not have access to many of the things that the server has. Of course this can be managed, but there isn't much developer protection from this pitfall (warnings, errors etc). I believe a solution to this is in development already for .NET 9 to merge the 2 projects into 1. Awesome video regardless. Keep up the good work :)

    • @DigitalNomadOnFIRE
      @DigitalNomadOnFIRE ปีที่แล้ว

      Conceptually that wouldn't work, you can't do CRUD calls from the client to the server in the same 'project' (unless that whole thing could be automated somehow?!)

    • @maxamundsen
      @maxamundsen ปีที่แล้ว

      @@DigitalNomadOnFIRE Yeah obviously you couldnt call the db from the wasm assembly, but I think they are going to do some syntactic magic to blend them together into one project.

  • @alexmadnix
    @alexmadnix หลายเดือนก่อน

    Gorgeous Blazor .Net8!

  • @timohermans
    @timohermans ปีที่แล้ว +2

    Loved the explanation, Tim! Great job.
    Still not sure if this replaces my normal setup with razor pages, htmx and alpinejs. I think I've worked with Blazor too little to know how Blazor stacks up to plain old html/css/js websites (built with MVC or other web framework sprinkeled with some JavaScript)

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      You are welcome.
      I definitely think you should check it out with SSR and Stream Rendering. I think you will be surprised at how easy it is to do everything in one UI, rather than mixing multiple UI types together.

  • @rizwansoomro3275
    @rizwansoomro3275 ปีที่แล้ว

    Updated to 17.8 :D cant wait to try new blazor

  • @MrUniq
    @MrUniq 2 หลายเดือนก่อน

    My job …as is many jobs… are a Microsoft shop so I anticipate this being a big opportunity. We had to do some of our projects in Angular to utilize modern features but alot of our devs are still more comfortable with .net and the Visual Studio environment. My only concern is MS fully supporting this long term because MVC web and web forms in general fell behind and did not make development easier without the usage of a secondary process such as Jquery.

    • @IAmTimCorey
      @IAmTimCorey  2 หลายเดือนก่อน

      I’m not sure what you mean by MVC falling behind. It is .NET 8 and it has been updated with every new release. MVC is a server side framework (like PHP or Blazor SSR). You don’t modernize it by adding client-side code (like jQuery). You leave that to other projects (like jQuery, Angular, React, etc.) That’s what they have done. They even have templates for how to use MVC with those frameworks.

  • @satyabratamohapatra3397
    @satyabratamohapatra3397 ปีที่แล้ว +1

    Thank you TIM. As always great video. Precise and to the point. Also watched the Blazor demo from Daniel and steve on Dotnet Conf. With dotnet 8 , Blazor looks really really good. Any plan for making a dedicated video on C#12?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I'll be making multiple videos on the features of C# 12 that I find most relevant to most people.

  • @wijlini
    @wijlini 9 หลายเดือนก่อน

    Have nice day Tim, I wanna know more about using a JavaScript library or plugin into a Blazor component... you mention that at the end of this video, do you have a specific video about it or you are planning to explain that in a separate video ? thank you very much

    • @IAmTimCorey
      @IAmTimCorey  9 หลายเดือนก่อน +1

      Not yet, but thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/

  • @jacobphillips9235
    @jacobphillips9235 ปีที่แล้ว +1

    Nice overview. Thanks man!

  • @techno7761
    @techno7761 3 หลายเดือนก่อน

    Nice video.
    The question : how to get access to static files on Client site ?
    Suppose I want to read some data from json files.

  • @goverdhanjayaram3683
    @goverdhanjayaram3683 ปีที่แล้ว

    Thank you very much for sharing this valuable knowledge !

  • @Tetsukeii
    @Tetsukeii หลายเดือนก่อน

    The dual rendering happening with Auto seems super cool, but I'm curious what that means in the context of Dependency injection that aren't default.
    Let's say I add to my Services a DI container for an HttpClient in the Server Project. That DI will work on the server side render but will immediately break if WASM kicks in? so what, we need to duplicate injections across projects?
    Appreciated the nice demo here for Blazor. We're still using old Frameworks at my job, so it's always nice to see new stuff.

    • @IAmTimCorey
      @IAmTimCorey  หลายเดือนก่อน

      The crossover from server to WASM can be tricky. It can use the same dependencies (essentially a copy of them) as long as they don't access resources that are on the server such as appsettings, etc. That's why it is often better to go through an API for both so that you get the same experience.

  • @JibinMN
    @JibinMN ปีที่แล้ว +1

    Neat and clean explanation. Just one doubt How we going to Publish the files for release? Since there are 2 projects created if we choose Interactivity type as Auto. So when it comes to deployment / when we publish the files to IIS , do we need to publish these 2 projects separately?

  • @andres5203
    @andres5203 ปีที่แล้ว +1

    The question I have is if we use streamrendering Google will be able to read the data from the weather page?

  • @maxiphobos
    @maxiphobos 9 หลายเดือนก่อน +2

    Hello. Do you maybe know if in .Net 8 Blazor is there any elegant way how to fix SignalR disconnection issue? After browser sleep on mobile or just leave open page on desktop for a long time, for example... Auto re-connect or somehow else to avoid out-of-the-box message with the Reload button?
    This issue is one of the biggest Blazor SSR disadvantages, in my opinion😢

  • @jerryjeremy4038
    @jerryjeremy4038 11 หลายเดือนก่อน +1

    hey Tim, do you have a video tutorial on how to use Bootstrap modal with blazor? thanks

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      Not specifically, but it works just like it does in any Bootstrap site.

  • @camerontangen2957
    @camerontangen2957 ปีที่แล้ว

    Thank you Mr. Corey for the great video. Any advice on how to migrate existing Blazor projects (server and webassembly) to this new Auto project?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      I'll be doing a video on it as soon as I can.

  • @wilteage567
    @wilteage567 ปีที่แล้ว

    Awesome video! I hope you'll do a video also about auth with identity in .NET 8, I had some trouble with it in the rc versions, especially in server + webassembly projects trying to implement it on my own without using the preset.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I'll be doing a video on it at some point. There's a lot to cover in the new changes, so I'm not sure when.

  • @ErickCastrilloArroyo
    @ErickCastrilloArroyo 2 หลายเดือนก่อน

    Great explanation

    • @IAmTimCorey
      @IAmTimCorey  2 หลายเดือนก่อน

      Thank you!

  • @vraja6812
    @vraja6812 3 หลายเดือนก่อน

    Excellent start

  • @seniorjunior8023
    @seniorjunior8023 ปีที่แล้ว +4

    Damn, you're fast :')

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +7

      I try. I've been busting my butt for the past month on .NET 8.

    • @seniorjunior8023
      @seniorjunior8023 ปีที่แล้ว

      @@IAmTimCorey good stuff is coming :)

    • @markharwood6794
      @markharwood6794 ปีที่แล้ว +1

      @@IAmTimCorey We all appreciate the work your butt has done Tim 😁

  • @maltonic42
    @maltonic42 5 หลายเดือนก่อน

    How would you structure an auto project in an "appropriate" MVC-style? Since WASM needs to communicate with the Blazor Server over Web API in an auto project (afaik), would you add a (api-)controller-folder in the server project? Would you add a model-folder to the server project, for models with only server concerns? Would you add a model-folder to the WASM project, for only client concerns (which are accessable to server as well)? Thank you

  • @RomeGibson
    @RomeGibson ปีที่แล้ว +2

    So does this mean we can use blazor in a similiar way the Next.js 13 works? The concept of client side components for interactivity looks very similiar

  • @mq9032
    @mq9032 9 หลายเดือนก่อน +1

    Hi Tim, How to deal with authentication and authorization in this kind of project?

  • @jadenmoore
    @jadenmoore ปีที่แล้ว

    Thank you, very helpful video! Is there an appropriate way to handle the shift from server to wasm as discussed at 36:00, without losing server resources? Especially when setting up the project with "Auto" and "Global" interactivity types, where that shift is always happening?

  • @StateHasChanged
    @StateHasChanged ปีที่แล้ว +1

    Great video!. In classic Blazor server, a frequently used practice was to maintain temporary user state in a Scoped state service of some kind. With static rendering, scoped dependencies only live for the life of the single page render. So that said, what mechanism do we have to store per user "session" state that can be accessed by both InteractiveServer and Static Blazor components?

    • @MiningForPies
      @MiningForPies 10 หลายเดือนก่อน +1

      Reddis. Storing “session” state in a scoped service is bad for a couple of reasons
      * it is lost with a hard refresh
      * it is not scalable horizontally as you can create another site instance

    • @StateHasChanged
      @StateHasChanged 10 หลายเดือนก่อน +1

      ​@@MiningForPies Agreed that a distributed cache is the best place to store, but we still need at least a session key of some kind that can be persisted across all render modes. This key has to be stored in and passed by the browser. The only way I have found to do this is a session cookie which, in the case of interactive server, is difficult to set/get (not impossible). My point is this should be easier.

  • @josephlatouf7798
    @josephlatouf7798 11 หลายเดือนก่อน

    Great video - thank you for sharing.
    I do have one question about the images folder. You mentioned that it could be placed under wwwroot at the server, however, would it be better to place it at the server or client?
    Thanks again.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      Place it where everyone has access to the images (server) rather than where only Auto and WebAssembly components have access (Client).

    • @josephlatouf7798
      @josephlatouf7798 11 หลายเดือนก่อน

      Thanks, I know understand this structure better. Just one more question, being on the server, will images rendered on pages put more stress on the server, or would they be cached, including if using Cloudflair?@@IAmTimCorey

  • @MB-nw5sz
    @MB-nw5sz 11 หลายเดือนก่อน

    Always look to your channel and training first Tim, thank you for great information and courses. The new identity additions to Blazor are great, espscially since they filter through to the WASM pages. There is a definate lack of information at the moment in regards to A) Blazor with identity using Dapper instead of EF and B) Using Azure B2C.
    As these are not a simple upgrade from earlier .net versions - Do you have any plans to cover these in a course or video? (I did check the new Blazor course, but it seems to be EF only). Many thanks

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      I don't use Dapper with Identity because I'm not a big fan of making big changes to an existing authentication system. Doing so means you take on responsibility for lots of testing and validation of data security and safety. As for using B2C, the Suggestion Site playlist shows you how to use B2C (I also have a full course covering it).

  • @DarkInsanePyro
    @DarkInsanePyro ปีที่แล้ว

    For the demo where you expected WebAssembly render mode to not show server configuration data (37:00), I wonder if that is the prerender system that is still firing.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      Yes, it was.

    • @ogiel5501
      @ogiel5501 11 หลายเดือนก่อน

      I have an odd feeling that this is a bug. Tim specifically said WebAssembly so I don't get it why it got downloaded on the server. Unless I am missing a crucial part

  • @gahshunker
    @gahshunker 7 หลายเดือนก่อน

    thank you for sharing this for free

    • @IAmTimCorey
      @IAmTimCorey  7 หลายเดือนก่อน

      You are welcome.

  • @alfonsdeda8912
    @alfonsdeda8912 10 หลายเดือนก่อน

    Hi Tim, great video!
    I haven't understood some parts:
    -why if you create the demo component in client project and use it in home component, it uses the server mode, because components inherit parent's render mode?
    -I have a blazor server app in new .net 8 and either I use stream rendering or not,it works like the stream rendering set at true, why?
    -should I use auto mode only if there is interactivity?
    Sorry for my english and thanks in advance.

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      No, components don’t inherit from their parent.
      Stream Rendering is for non-interactive components. Server will perform similar actions because that is how it operates.
      If the interactivity is simple, SSR might be enough. Otherwise, Auto is a good choice.

    • @alfonsdeda8912
      @alfonsdeda8912 10 หลายเดือนก่อน

      @@IAmTimCoreythank you very much for response, but when should I prefer the old blazor server over automode?

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      Only if your component needs interactivity and you cannot access the data from WebAssembly. Your goal would be never.

  • @jo.si_911
    @jo.si_911 3 หลายเดือนก่อน

    Hey guys,
    are there any good resources/books you can recommend in order to learn BLAZOR? Thanks and Greetings from Germany 😌

    • @IAmTimCorey
      @IAmTimCorey  3 หลายเดือนก่อน

      I don't have a book recommendation, but I did create a course fully on the .NET 8 version of Blazor: www.iamtimcorey.com/courses/blazor-from-start-to-finish/

  • @zikkrype
    @zikkrype ปีที่แล้ว

    I hoped that you would show how to share updated counter in all components when you click increment button: both on left menu and content page

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      That's outside the scope of an intro topic. I have shown how to get data in and out of a component, though. Maybe I'll do that in a future demo.

    • @zikkrype
      @zikkrype ปีที่แล้ว

      Yeap. That would be very helpful

  • @JacobHarley-lv7nd
    @JacobHarley-lv7nd 5 หลายเดือนก่อน

    Just getting started on blazor. This is a great heads up to get me started. Nicely paced.

    • @IAmTimCorey
      @IAmTimCorey  5 หลายเดือนก่อน

      Great to hear!

  • @Babaelow
    @Babaelow 11 หลายเดือนก่อน +1

    Danke!

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      Thank you!

  • @kiwicodes
    @kiwicodes ปีที่แล้ว

    Great video and explanation of the new .net blazor templates etc. One question I have not seen answered anywhere else is how does setting up a PWA now work? Just the same?

    • @SouleyThiam-oj3rk
      @SouleyThiam-oj3rk ปีที่แล้ว

      It looks like the only possibility to be PWA compatible is to go full WASM mode (i.e no SSR, auto, or interactive server rendering).
      PWA is nice but it seems that Microsoft is pushing its signal R stuff...

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      If you want a PWA, you want to use the Blazor WebAssembly Stand-alone project type. The reason for that is because a PWA cannot have mixed mode. In the Blazor Web App template, components are rendered on the server before being sent down, even in WebAssembly mode (this speeds things up). You can turn all of that off, but you still then have all of the architecture of the server code and you are running on the server project. The stand-alone WASM template cuts out all of the server code so that it can function as a PWA if/when you want.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      @SouleyThiam-oj3rk - They aren't "pushing its SignalR stuff". In fact, they are pushing to get away from the need for it. That's why it isn't used by default. That's why auto uses it only the first time. The problem with PWAs is that they have to be fully client-side from the start. That means you have to download the full source code before running any of it. That's a downside that cannot be negated if you want to have a PWA. The Blazor Web App template defaults to SSR, which means the client gets the web app as fast as possible. Even when you make components auto, so that they will use SignalR first and then WebAssembly, components get rendered on the server for speed, then displayed with SignalR for speed, then once the WebAssembly version has been downloaded in the background (for speed), then it is displayed with WebAssembly. All of those speed improvements are ones that cannot be done when you are running fully on the client.

    • @kiwicodes
      @kiwicodes ปีที่แล้ว

      @@IAmTimCorey Thank you very much for the explanation. Makes perfect sense. Love your videos.

  • @Me_Sam_Sepi0l
    @Me_Sam_Sepi0l ปีที่แล้ว

    thanks man, i appreciate this! :) self made software architect ;)

  • @kandycan
    @kandycan 11 หลายเดือนก่อน

    38:14
    Don't u think u just found a bug in this one ? Interactive webassembly initially rendered as interactive mode server.
    Do u think it's fixed? That seems like a Bug to be honest. 😅😅😅😅

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      No, I still had server rendering turned on. My bad. Not Blazor Server. It renders once on the server to make things appear to load faster.

  • @sebastian.cardozo
    @sebastian.cardozo 7 หลายเดือนก่อน

    Thank you very much for your videos .I need MainLayout to be interactive, it works correctly until I use the "Account" pages, it is because they need a HttpContext and lose interactivity (This is explained in AccountLayout). How can I keep the interactivity of MainLayout? Can you help me please?

  • @buildtolove
    @buildtolove 8 หลายเดือนก่อน

    if you run into problem on first run, i had to uninstalled the .net 8.0 sdk, switched back to .net 7, the back again to .net 8 for it to compile and run.

    • @IAmTimCorey
      @IAmTimCorey  8 หลายเดือนก่อน

      Interesting.

  • @UnknownShepard
    @UnknownShepard ปีที่แล้ว

    Great vids mate, keep it up!

  • @abrahamlukwesa4116
    @abrahamlukwesa4116 ปีที่แล้ว

    Great vid Tim and thank you for this. I have always worked wth Blazor WASM and my client always calls an API to get data etc. With the new Blazor, will I actually need an API anymore? I mean it's looking like the server side can talk directly to the database and serve the pages that require the data. Am ok in thinking like this?

    • @markharwood6794
      @markharwood6794 ปีที่แล้ว

      I mainly write business systems so I tend to just use Server and I always USED to talk to the backend through an API but just gave up as it wasn't giving me anything much. Felt wrong at first but Carl Franklin (BlazorTrain) did a video and gave me "permission" to talk directly to my backend so that's the way I go now. Of course "It Depends" still counts and where you need something else to access your backend via API you are still going to need one but in that case it's easy to setup some endpoints and get them to talk to your backend, so you go Blazor > Backend or [something else] > API > Backend. So TLDR IMHO yes it's perfectly OK.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      If you don't use the Blazor WebAssembly or Auto components, you don't need an API.

  • @WolfieDad67
    @WolfieDad67 10 หลายเดือนก่อน

    Thanks, and I don't know how you keep up with the comments... but...
    I'm using VSCode w/ DotNet 8 and the only options I see in doing a "dotnet new list" are blazor and blazorwasm. No matter which I choose, I'm not given an @attribute option of "RenderModeInteractiveAuto". In fact I'm only given a RenderMode with dot attribute options, none Auto or Interactive... all are "server" something. I assume this is a recent video given dotnet 8 so I must be missing something.

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      If you run it from the command line, you can use the "-int WebAssembly" or "-int Auto" or "-int Server" or "-int None" to set the RenderMode. I'm not sure about why VS Code isn't allowing you to see those options. However, you can also change this quite easily after you create the project. Just go into the Program.cs file and the App.razor file to make the changes (I don't have it in front of me, but they are in one of those locations).

  • @RandyMagruder
    @RandyMagruder ปีที่แล้ว +2

    My question is simple. What Microsoft sites are written in Blazor? My biggest problem with Blazor is Microsoft doesn't seem to want to dogfood it by building their own web based applications using it. It doesn't build any trust in the platform that it's not good enough for Microsoft applications.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      That's not really a good litmus test. How many companies switch their enterprise applications over to a new technology without a really good reason? Bing runs on .NET. The Microsoft websites run on .NET. Requiring them to re-architect major systems to a new UI to "prove" that it works isn't a good test. Besides, up until now, Blazor had a very specific set of use-cases. Now with Blazor in .NET 8, it is finally entering a phase where it is broadly usable in almost any scenario. So now is when companies, including Microsoft, can start considering Blazor for that wider range of projects. Since major projects, like building full-scale applications like you want to see from Microsoft, take years to complete, it will be a bit before we see something like that from Microsoft. That doesn't mean they don't believe in it, though, nor does it mean that we can't trust it.

    • @RandyMagruder
      @RandyMagruder ปีที่แล้ว

      @@IAmTimCorey I'm speaking from having a HORRIBLE experience with Blazor server. Even going to consulting companies specializing in Blazor who were MS partners were asking what we were even thinking trying it. It didn't scale and was a massive flop, and webassembly wasn't ready (and I still keep up to date on a not so good debugging experience on webAssembly). Our management team said "enough" and we had to rewrite it all in angular because a) no shortage of commercially successful web applications are written in Angular and b) easy to find competent devs who can code typescript/angular sites. A key performance indicator is looking at who is deploying successful commercial web-based applications with Blazor, client or server, and that was a needle in a haystack. You're telling me ok now at .net 8, it is "finally" entering a phase where it's usable for these projects. I understand it takes time to make large scale applications and I'm not trying to sound like a jerk, but it doesn't sound like Microsoft itself has embraced and adopted it for Microsoft projects, or announced any roadmaps of any applications that will be written with it. So it gives the appearance that Blazor is good enough for us, but not for Microsoft.

  • @monirahmad133
    @monirahmad133 ปีที่แล้ว

    31:41 i hope when adding route, adding it in separate file as json to link route name with component like: Demo /demo>/route> to see all routes in one place

  • @christosbinos8467
    @christosbinos8467 8 หลายเดือนก่อน

    Since this doesn't use JavaScript, would the logic and dynamic elements work with JS completely disabled on the browser?
    Since we are doing server side rendering... The final question is, can this be hosted on Tor network?

    • @IAmTimCorey
      @IAmTimCorey  8 หลายเดือนก่อน

      It does use JavaScript. We just don't have to use JavaScript. If you note, Microsoft adds one JavaScript file onto the template page.
      As for hosting it on a Tor network, I'm not sure.

  • @Sander-Brilman
    @Sander-Brilman ปีที่แล้ว

    great video. i want to point out however the method of declaring a render mode has changed in the final release. it is now done using @rendermode directives not attributes

  • @billymartin6497
    @billymartin6497 ปีที่แล้ว

    Very informative, but how do I convert an existing Blazor Server app?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      It depends. An in-place upgrade seems to be as simple as changing the version to .NET 8 (I haven't tried it yet, but someone else reported that's what they did). However, if you want the new auto, SSR, etc. features then you will need to do some more work. I'll be doing a video on it as soon as I can.

  • @OBabchenko
    @OBabchenko 10 หลายเดือนก่อน

    Is it possible to cover Blazor Client code with Tests? We React and Jest now, and Cypress for E2E tests. I want to try Blazor for some new projects.

    • @MiningForPies
      @MiningForPies 10 หลายเดือนก่อน

      Yes. Component code can be unit tested (they’re just classes after all). UI can be tested quite easily with something like playwrite

  • @banan13231
    @banan13231 7 หลายเดือนก่อน

    Hi Tim!
    I have a question. Would Blazor be suitable for gallery/blog-type websites as well? To be honest, I'm a bit uncertain about maintaining a persistent SignalR connection when users receive content and don't do anything else on the site besides consuming it.
    Have nice day!

    • @IAmTimCorey
      @IAmTimCorey  7 หลายเดือนก่อน

      It sure would. But I would recommend .NET 8 Blazor Web App. Most of your site would probably work as a SSR site, without the need for any client-side rendering. But, for the few areas that need client-side code, you could use Auto mode, where the component starts out as Blazor Server (for speed) and then transitions in the background to Blazor WebAssembly (for next-run speed and no SignalR connection).

  • @benjamininkorea7016
    @benjamininkorea7016 ปีที่แล้ว

    Tim I'm dying for your opinion on something. After following your early courses and getting used to Dapper, I'm 100% comfortable with my SQL workflow as is. Do you think EF is so powerful / good now that I should learn how to work with it, or am I fine carrying on as is? I will be updating / upgrading to .net 8 either way, so just curious about EF specifically.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Here's the debate that I wrestle through. On one hand, you are probably better off in the long run using Dapper in your projects. I've seen too many projects fail because they decided to make their development easier by using EF. On the other hand, if you use EF right, it can make your development easier and be fine in the long run. Finally, if you aren't in control of the application's architecture, you may need to know EF in order to work for a company. So the answer is that you should probably learn EF (really well) and practice it a lot, in case you need to use it at an organization where you don't control the architectural decisions.

  • @matrixlukan
    @matrixlukan ปีที่แล้ว

    In which project should we have to install the nuget libraries?

  • @Rynohoopty
    @Rynohoopty 8 หลายเดือนก่อน

    Would it be correct to think of stream rendering as just a virtual dom replacement?

  • @Arverick
    @Arverick 11 หลายเดือนก่อน

    Hey, how would I go about into creating one of this apps, but having a Client-side page (like the Demo one) and have it call a component available in the other project to fetch data? In a traditional MVC server side, I'd just set the Mongo client components right into the server project and have the controllers call those. I thought the server side Blazor would be able to provide that but I don't see how.

  • @orionnebula3487
    @orionnebula3487 4 หลายเดือนก่อน

    Hi Tim, somehow the Streamrendering is not working for me. I did not touch the code after is has been generated by VS, but as i open the Weather tab, it always loads at first and after the 500ms it directly displayes the weather. i never see the "Loading..."

  • @ukasz-xn8kn
    @ukasz-xn8kn ปีที่แล้ว +1

    shall we drop JS frameworks in favor of Blazor for new projects, or not yet? AFAIK at the moment no one is using Blazor for something more than small scale apps or dashboards.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      I always encourage people not to make radical moves, especially if you already have something in place. Going forward, I think this will make it easier to drop the JavaScript frameworks in favor of just Blazor. As far as people using Blazor in larger projects, they are out there but there aren't any that really advertise as case-studies. But don't forget, up until now Blazor fit a smaller niche. Now, it a platform that can handle a wide variety of use-cases. I think adoption for "regular" sites is going to skyrocket in the next year or two.

  • @nopinareorganiktarim
    @nopinareorganiktarim 5 หลายเดือนก่อน

    Rendering does not work when created in Razor Componet dll, how can I solve this?

  • @_miranHorvat
    @_miranHorvat ปีที่แล้ว

    What about state management in blazor? What will happen to the clients when I upgrade the web app.

  • @markharwood6794
    @markharwood6794 ปีที่แล้ว

    Really nice video :)

  • @thefattysplace
    @thefattysplace ปีที่แล้ว

    I have a question about any JS or styles declared on the server project, I'm assuming that gets used by the client control when it switches to wasm? I.e Is the uri path maintained when it switches to wasm and it doesn't just run as an independent 'offline' control? Or do we need to declare styles in both places?
    Also it's stream rendering using the same technology as signalR but without maintaining the connection once rendering is completed?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      It switches the styling and JavaScript over to the WASM side.
      No, Stream Rendering does not use a WebSocket connection. It uses JavaScript to await a fetch command.

  • @geoffroyadnet
    @geoffroyadnet 11 หลายเดือนก่อน

    hi,
    When i'm working with SSR, if a component is in @rendermode InteractiveWebAssembly , is there some DLL download on the user machine?
    I want to besure 'cause of the problem link to some security environment who's blocking the DLL downloading even with the new .webcil extension
    nice video

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      Yes, it uses web assembly to load the source code on the client.

  • @jackramirez6461
    @jackramirez6461 9 หลายเดือนก่อน

    Is the Blazor Start to Finish course on your website geared around .NET 8? I noticed a piece that references .net 8 in the title. Wondering if thats a recent addendum to modernize an older course or if the entire course is .net 8 based? I'm a new subscriber and would really like to get up to speed with Blazor.

    • @IAmTimCorey
      @IAmTimCorey  9 หลายเดือนก่อน +1

      It was built entirely with .NET 8.

  • @nezqwe4818
    @nezqwe4818 ปีที่แล้ว

    Hi,
    I got a question. When I start the project with IIS Express. The weather page (with streamrendering on) does not show the loading... msg before it show the data? Works fine if u start the project with https. What's the difference?

  • @ZAWhatever
    @ZAWhatever 11 หลายเดือนก่อน +1

    I regret investing so much into Blazor. Like that old saying goes, it is simple until it is not.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      I think the new Blazor is really simple. I think you are confusing simplicity with lack of functionality. There is a difference. A car is simple enough to use that a 16-year-old can use it, yet it is incredibly complex. We don’t need to stick with bicycles because they are simple.
      The Blazor you learned fully translates to this new version and you can stick with Server or WebAssembly if you want. What you have, though, are additional features that can make your app more powerful when you are ready.

    • @ZAWhatever
      @ZAWhatever 11 หลายเดือนก่อน +2

      ​@@IAmTimCoreyI think I might have expected too much from Blazor 8. I hate to point this out but just like when you where demonstrating client side rendering. You were expecting client side rendering and was surprised that the code first rendered on the server and then "refreshed" on the client when it was supposed to be exclusively client side. I have been surprised by a few things myself. It all started with the appsettings.json in the App project template to be honest. Like in this case, if the code is marked for client side rendering it should be executed like that, client side only. One would design logically around this assumption only to have it turn out that that is not exactly the case. Could talk for hours if not days about the gotchas but probably does not count for much. Thank you for reading my comment.

  • @chris-c4c1n
    @chris-c4c1n ปีที่แล้ว +1

    is Blazor now the future? should i learn JS and react or Blazor if i am begnner?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +4

      If you are a beginner learning C#, learn C# really well first. Then learn Blazor. Then decide if you want to expand into JavaScript and React. The biggest mistake you can make as a newer developer is to spread yourself thin and not concentrate on any one area. You need depth of knowledge before you need breadth of knowledge.

    • @chris-c4c1n
      @chris-c4c1n ปีที่แล้ว

      @@IAmTimCorey do you belive that Blazor is the future and will replace soon React and JS for front developer? is Blazor also more easy than React?

    • @adinwashere
      @adinwashere ปีที่แล้ว

      @@chris-c4c1nThere is no one "future". Devs will probably continue to develop using different stacks just like they have been doing up to now. Many may move to just using Blazor while others will prefer to continue with React or even JQuery.

    • @MiningForPies
      @MiningForPies 10 หลายเดือนก่อน

      @@chris-c4c1n blazor is “easier” than react when you know c# really well.

  • @paulgehrman
    @paulgehrman 11 หลายเดือนก่อน

    Thanks for the video. .NET 8 looks great. The only disheartening aspect is that I've spent 2+ years in .NET 6 using Wasm (which I like and works well). Obviously, the architectural considerations are now different, and perhaps a bit more complex in light of the additional functionality in .NET 8. I'm hoping that it all comes together after a bit more study and experimentation.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      You haven't lost anything, and if you want to continue just with WASM (so you can do PWAs), you can do that as well. There is a WASM-only template in .NET 8. If you decide to use full Blazor, though, all of your skills transfer. You just get extra features and ways of doing things.

  • @thedude6810
    @thedude6810 ปีที่แล้ว

    Thanks for video. Maybe is just me but I am not a fan Blazor, probably mostly cause I prefer using react for frontend.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +6

      If you are using C# for your back-end, what benefit does React give you that overcomes the additional overhead?

  • @TheScriptPunk
    @TheScriptPunk 8 หลายเดือนก่อน

    do we get graphics like canvas?

  • @wellington18m
    @wellington18m 11 หลายเดือนก่อน

    Hello there, thanks at lot for all your content they are really great and helpful. I have a question. I created a application but instead of choosing https I selected http. Now the StreamRendering does not work on http but it does on https. Do you know how to make it work on http? Thanks for your help in advance.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      I'm not sure how to make it work with http. Is there a reason why you want to use http? That is not really safe if you are transferring data or calling an API and if it is on the web, it will also mean your site is downranked by Google and warnings will be issued by browsers.

    • @wellington18m
      @wellington18m 11 หลายเดือนก่อน

      The app wont be exposed to the out side world. It would be use on a intranet and they use http internally.

  • @chairmakerPete
    @chairmakerPete 8 หลายเดือนก่อน

    The only downer with MS technology is that it's a roller coaster every new version as they hack the architecture.
    I like blazor, but I'm just so damn productive in webforms it's tough to justify the pain of an ever-changing new thing!

    • @IAmTimCorey
      @IAmTimCorey  8 หลายเดือนก่อน +1

      It is only ever-changing if you decide to keep changing it. For example, the Suggestion Site I built here on this channel was originally done in Blazor Server for .NET 6. I then upgraded it to .NET 7 (a 5-minute process). Just recently, I upgraded it to .NET 8 (another 5-minute process). However, I did not upgrade it to be a Blazor Web App. That is a more complicated change. However, I don't need to do that. It works just fine as a Blazor Server app. I can keep it that way if I want and not invest the time needed to transform how it works. Even though there are newer ways of doing things or new templates, that doesn't mean you have to use them. You can stick with what works for you and your project and continue to upgrade it with .NET without a problem.

    • @chairmakerPete
      @chairmakerPete 8 หลายเดือนก่อน

      @@IAmTimCorey fair comment, Tim.
      Blazor is an exciting technology, but I can't help thinking the Blazor bus has similarities to Keanu Reeves and "Speed" and can't slow down to let any passengers on or off! WASM should (and probably will) be great, but currently it looks like a small car crash with some bodging going on in the workshop to keep it on the road (i.e. Auto mode). It's all great and I'd rather be on a framework that's evolving than PHP. You have a lifetime's work ahead making these videos to keep the stragglers like me hanging on to the coat tails of the cool kids and Blazor! 😉

  • @jameswalton-cyberhigh
    @jameswalton-cyberhigh ปีที่แล้ว

    I have a question. I really don't understand what's gained by using Stream Rendering vs ServerPreRendered?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      When you are calling an API that might take a bit, it will render the page with a placeholder (the Loading... in our demo's case). Then, when the API returns the data, the page will inject the data where the placeholder is. That way the page can be quickly displayed and let the user know that more data is coming rather than just pausing until the data is downloaded.

  • @mateoortiz9286
    @mateoortiz9286 11 หลายเดือนก่อน

    I noticed that in the Blazor template today, it does not use the @attribute directive for the render modes, but instead it uses the @rendermode directive (example, in the counter page in the client presently has @rendermode InteractiveAuto, but in the video it has @attribute [RenderModeInteractiveAuto]. Can you please explain?

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      This video was created using the last release candidate before the official release. In that time, they changed the syntax.

  • @jamesminnihan7468
    @jamesminnihan7468 11 หลายเดือนก่อน

    The Source Code link above sends a very old version of the Blazor project that is worthless for following this video with.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      I updated it. Thanks for letting me know.

  • @IanGold-k1p
    @IanGold-k1p 10 หลายเดือนก่อน

    I need to create a new eCommerce project. Do you beleive Blazor SSR good enough to move away from vue?

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      It is a really solid option. The one thing I would review to make sure you understood how it works is the authentication piece, specifically around how it transitions between the Server and WebAssembly.

  • @mioszkaczmarek6746
    @mioszkaczmarek6746 ปีที่แล้ว

    Im confused. Why RenderModeWebAssembly still showed the string from the Configuration. Could you explain please? Also does Blazor Server still open and keep TCP connection?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      The site, by default, renders the page on the server before sending it to the client. The benefit of doing that is that the site is visible very quickly and is SEO-friendly.
      Blazor Server still uses web sockets to connect to the server from the client. However, that socket is only open when you are using a Blazor Server component. It will close once the socket is not needed.

  • @frstchan
    @frstchan 9 หลายเดือนก่อน

    But, if RenderMode decides if its going to be server or client side, what is the point of adding the component to server or client projects? I am a bit confused.

    • @IAmTimCorey
      @IAmTimCorey  9 หลายเดือนก่อน

      You put a component in the server project only if you are limiting it to being a server-only component. If it might be WebAssembly or Auto, put it in the client project. You can always make a component Server-only even though it is in the client project.

  • @headcode
    @headcode 10 หลายเดือนก่อน

    Is it possible to create a PWA using Blazor?

    • @IAmTimCorey
      @IAmTimCorey  10 หลายเดือนก่อน

      Yes. Use the standalone Blazor WebAssembly template and select the checkbox for PWA when creating it.

  • @no-bc4kc
    @no-bc4kc ปีที่แล้ว +2

    For anyone following along, as of Microsoft Visual Studio Version 17.8, @attribute [RenderModeInteractiveAuto] attribute on Demo.razor should instead be @rendermode InteractiveAuto

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      Yeah, they just changed it. Gotta love that.

  • @TheSohaibs
    @TheSohaibs ปีที่แล้ว

    Can we use components from. client (web assembly) in another server project. Kinda of like RCL.

  • @stephan_smit
    @stephan_smit ปีที่แล้ว

    How will having two projects influence the hosting of the site on Azure for example?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +2

      Think of it more like a class library and a UI project rather than two UI projects. You just deploy the main project to Azure like you normally would and it will "just work".

    • @stephan_smit
      @stephan_smit ปีที่แล้ว

      Awesome, ok thanks.

  • @techreviews-j1o
    @techreviews-j1o 9 หลายเดือนก่อน

    Hi , i like what you are doing ,
    Please a i have a question ,
    i have a APi that handle generating authentication with jwt access token , and all my logic is in this API , i want to use blazor as frontend with rendermodeAuto, how to use the JWT in this case?
    for WASM si I have no probleme , but with Blazor RenderModeAutho i am lost
    Thank you

  • @ecmusic2605
    @ecmusic2605 11 หลายเดือนก่อน

    Any way you can make a vIdeo on HOW to DEBUG this type of project? , since it uses both server and web assembly, the normal debuging on Visual Studio no longer works, Break ponts do NOT work on either the Server Project nor the Web Assembly :(

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      I'll probably do a video on debugging, but I don't know what you mean about the breakpoints. I put breakpoints in and they are hit, even when the component is marked as Auto.

    • @ecmusic2605
      @ecmusic2605 11 หลายเดือนก่อน

      @@IAmTimCorey Thank you for replying to my question, your videos have helped me a lot and I appreciate your work. What I meant to say is that: On the Client Project, the breakpoints I use on Visual Studio, no longer work, for example, If put a breakpoint inside the "protected override async Task OnInitializedAsync()" method or the "protected async Task FormSubmit()" Visual Studio does not stop
      Furthermore, perhaps I've done something different this time but it does not stop on the Server side either (Note that: I have lots of other projects functioning correctly)
      😕

  • @ivcbusinesssystems6613
    @ivcbusinesssystems6613 ปีที่แล้ว

    I'm confused, why can't you do interactivity if the page is Server Only, i.e. no websockets?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      If the page is using SSR, the page is rendered on the server as HTML and CSS and then transmitted to the client. There is no code-behind running on that page because there is no code on the page. It is the same as a PHP page or an MVC page. In order to get interactivity, you need to either use JavaScript or you need to use WebSockets (Blazor Server) or WebAssembly (which is actually running on JavaScript). You need some type of code to get interactivity.

    • @ivcbusinesssystems6613
      @ivcbusinesssystems6613 ปีที่แล้ว

      @@IAmTimCoreyThanks Tim, I'm thinking of PHP or MVC using javascript to call back to the server to execute a function or get data, but that doesn't appear to exist.
      Why can't AJAX be used to call an SSR page? I'm thinking it may be possible by calling the component via AJAX and having it return whatever you want, but I'm too new to this to know if that's a good thing to do.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      You can use JavaScript on a Blazor page as well (or AJAX, which is JavaScript). That still works. But if we are going to do that, we can just use C# instead and make the page interactive.

  • @Triariy89
    @Triariy89 ปีที่แล้ว

    "Loading" not rendered. It's still awaiting for results. I think this was broken with official release. Also "StreamRendering" now has default enabled (without "true" parameter)

    • @SouleyThiam-oj3rk
      @SouleyThiam-oj3rk ปีที่แล้ว

      All this new Blazor stuff seem done on the rush. Surprising when .NET 8 is a LTS. I will not be surprised if there are again many changes (project structure etc...) in .NET 9.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      Yes, the template now uses the implicit true instead of the explicit true. The action is still the same, though.
      As for the Weather page not showing the Loading... text, that seems like it is a problem on your machine or with your configuration. I just loaded up the release version of .NET 8 and ran the project. The Loading... text shows up just fine.

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      @SouleyThiam-oj3rk - That may be your perception, but I can tell you that it definitely wasn't rushed. The team has been working on these updates for a year and a half at least. I saw demos of these features a long time ago. What they did do is work really hard to make them stable and ensure that they are going in the right direction. I've seen their ideas of where Blazor could go in the future (.NET 9 and beyond) and I can tell you that it is definitely exciting. I can also tell you that they aren't rushing to put half-baked ideas into the product.

  • @kevin7mckinney
    @kevin7mckinney 9 หลายเดือนก่อน

    This example/code needs to be updated to reflect the changes re: @attribute [RenderModeInteractiveAuto] - this should be replaced with @rendermode InteractiveAuto, requiring an change to the Imports.razor file to include @using static Microsoft.AspNetCore.Components.Web.RenderMode. You will also need to update the package references.

    • @IAmTimCorey
      @IAmTimCorey  9 หลายเดือนก่อน

      Yep, they changed how that works right before launch.

  • @MrSurfsAlot
    @MrSurfsAlot ปีที่แล้ว

    Wish I had watched this before messing w this stuff lol

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว +1

      Well, hopefully it helps you now.

  • @ahmetsarkaya9203
    @ahmetsarkaya9203 11 หลายเดือนก่อน

    I tried stream rendering just like you did but it always comes with delay. It does not load the page and show me "Loading..." text. Any of you guys have the same problem? Anyone can help will be much appreciated.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน

      It sounds like there is something different about your setup. Try looking for those differences or just try running the standard template and see what happens.

    • @ahmetsarkaya9203
      @ahmetsarkaya9203 11 หลายเดือนก่อน

      @@IAmTimCorey actually i did a little dig on the internet. There is an issue about iis. İf i get that right it seems iis has buffering problem. İf I solve the issue I will get back here and inform you guys.

    • @IAmTimCorey
      @IAmTimCorey  11 หลายเดือนก่อน +1

      Excellent! Thanks for sharing.