Running Blazor in production, lessons learned - Jimmy Engström - NDC London 2023

Поделиться
HTML-код
  • Опубликовано: 9 июн 2024
  • We have been running Blazor in production for over two years now.
    Everyone in our team is a C# developer, so when we went into our latest project Blazor was a natural choice, even though Blazor was only a week old.
    Looking at my peers working in the same space, I am convinced that it saved our project by switching to Blazor.
    Even though it has been mostly smooth sailing we have learned a lot during the years.
    In this session, I will give you some of the tips, tricks, and learnings we have collected over the years, when to choose what, and how to avoid pitfalls converting your exiting project to Blazor.
    Check out our new channel:
    NDC Clips:
    @ndcclips
    Check out more of our featured speakers and talks at
    ndcconferences.com/
    ndclondon.com/
  • НаукаНаука

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

  • @imadabab
    @imadabab Год назад +9

    Great presentation. Thanks a lot Jimmy. I bought your book.it's amazing. As a dot bet senior developer, Blazor was my dream, I will never use any other frameworks for my new projects. Blazor is the best framework i have ever worked on.

  • @Panzerfury18
    @Panzerfury18 Год назад +25

    Be careful with just throwing everything into components. There is a small overhead for each component. So if you have a 1000 component on a site, it will slow it down. I've been there myself.
    I've used blazor a couple of places in production :)

    • @michaelryce1200
      @michaelryce1200 5 месяцев назад

      Is this a problem you would encounter using Angular components at the same rate?

    • @SanongPenmongkol
      @SanongPenmongkol 3 месяца назад

      Component is razor page so I eat memory, same as any other component in react, bean or whatever if you use it.

  • @dmitryborovych9135
    @dmitryborovych9135 Год назад +8

    Thank you for nice talk. However, I don't think that WASM footprint was compared properly. In my opinion, Blazor WASM example given is really abstract one. You did compare it with Facebook saying that Blazor is just 1MB vs 16MB on social network's side. Facebook is pretty heavy application by itself, so no doubts it has high payload. In such case, would be nice to see comparison with something similar created in Blazor WASM(in terms of complexity) and not just by comparing some abstract application.

  • @Biker322
    @Biker322 Год назад +11

    Always found front end tools a mess. Weird errors, difficult to debug. Nothing is obvious, too much magic.
    Blazor is front end development for back end developers.

    • @tacticoolrick5562
      @tacticoolrick5562 11 месяцев назад +6

      Honestly, IMHO, the problems boil down to HTML and CSS. CSS is so full of side effects it amazes me that this ever passed muster and became a standard tool.
      HTML was designed to lay out academic papers, now it's being used to lay out 21st century web apps. It's like building a space station with clay bricks.
      JS is an ugly workaround to make these two old pieces of technology work on the modern web. What needs to happen, is the web needs to move to a modern standard.

  • @erril8285
    @erril8285 Год назад +7

    Blazor is the future

  • @georgebeierberkeley
    @georgebeierberkeley Год назад

    How does Blazor server handle things like drag and drop? Does it download some JS that it runs in the browser? Or do people still use some JS when using Blazor server pages? Seems like overkill to go back to the server for DOM manipulation when a little JS will do the job. I currently use vanilla JS, Razor, lots of AJAX to make the pages feel "live". Thinking of switching...but was surprised when he said mixing and matching razor and blazor wasn't a good idea b/c connections get dropped.

    • @rentefald
      @rentefald Год назад +1

      Exactly.... drag drop is just the tip of the iceberg. Just wait till you try to do something else than tutorials.

    • @Conficient
      @Conficient 8 месяцев назад

      With .NET 8 the mix-and-match approach is likely to work quite well - with SSR (Server-Side-Rendering) it will create/drop SignalR connections as you move around an app. Not all pages are interactive so this makes perfect sense IMO. My home page (which is heavily hit) is currently a Razor Page because I don't want a SignalR connection for every user that hits it. With .NET 8 I can rewrite as a Razor Component but it will still be 'static' and have no connection.

  • @avisalon4730
    @avisalon4730 Год назад

    "Paul-Sebastian Manole" Yes. Dev experience maybe is not so good but I think the future on WASM and from all languages biggest abilities to shoot on Blazor

  •  Год назад +53

    After 30 minutes of just listening to how Blazor works and nothing about any lessons learned in production I stopper watching.

    • @seanmiller7889
      @seanmiller7889 Год назад +2

      Wow I only made it 15 minutes.

    • @nickellis-gowland7982
      @nickellis-gowland7982 Год назад +2

      Starts at min 37

    • @tacticoolrick5562
      @tacticoolrick5562 11 месяцев назад +12

      Yeah there's this amazing thing where you can move the video forward instead of being a dick in the comments section.

    • @seanmiller7889
      @seanmiller7889 11 месяцев назад

      @@tacticoolrick5562 Should have told me that 15 minutes earlier.

    • @JacobSnover
      @JacobSnover 8 месяцев назад +2

      @@seanmiller7889 a developer that can't scroll a video or use the provided indexes in the video 🤦‍♂

  • @Sebazzz1991
    @Sebazzz1991 Год назад +3

    Blazor is \o/ - such productivity

  • @ErnaSolbergXXX
    @ErnaSolbergXXX 8 месяцев назад

    Your experience with blazor seems not to be related to blazor, but rather with the shift on going to singel page applications.

  • @XXnickles
    @XXnickles Год назад +5

    I was interested on Blazor as an escape of the JS nightmares, but "unfortunately" (for good or bad), Blazor is going towards the same approaches. Honestly, the more you think, the more server side rendering makes sense for a good deal of web apps. That is why things like HTMX with Razor Pages look like a better option that I am more interesting on trying these days

    • @rentefald
      @rentefald Год назад +2

      JS nightmares are happening because you're not writing the code yourself, probably some 3rd party junk you believe you can't live without.
      Be a developer!!

    • @XXnickles
      @XXnickles Год назад +6

      @@rentefald just to be clear, I am calling nightmare to how polluted the JS ecosystem is. Even within the same language specification you find bunch of headaches, like the web components. I don’t know exactly what you refer to junk libraries, as I can put in that bag stuff like Angular, but I will give you the reason on the fact that plenty of times people uses libraries without even understanding what are they for

    • @foobarmaximus3506
      @foobarmaximus3506 5 месяцев назад

      @@XXnickles- Junk libraries are javascript code written by some open source (script kiddies) org that you have ZERO control over, and that breaks all the time. The more libraries and JS dependencies you have, the less likely your code is EVER going to work properly in production. All the "frameworks" are junk compared to code I write.

  • @PaulSebastianM
    @PaulSebastianM Год назад +9

    What I can't stand is the slow iterative feedback. Blazor feels like developing for Webforms compared to Vite + any JS frontend lib.

    • @rossimac
      @rossimac Год назад +5

      Big time. Debugging WASM feels like I'm running my parents' computer in 2001. Server isn't as bad but still, Hot Reload isn't amazing and my time to iterate is slow on Blazor in comparison to others.

    • @goodjesse711
      @goodjesse711 Год назад +3

      I literally stopped a side project because hot reload stopped working and it was too frustrating to update the CSS.

    • @rarepanda3766
      @rarepanda3766 Год назад +2

      Yeah, came from Xamarin as well and hoped for a good experience ... but still. You can develop much faster in Javascript space. Hot reload is such an important feature, if you have to reload all the time it will take hours... Also for a new beginner i wouldnt recommend blazor at all. Microsoft hasnt done well in the past for front end developers beside MVC. Rather take your journey directly with typescript and your favorite framework like angular, react or any other. If you come from an C# Background, you might get your hands easy on this but it will be hard to progress after you made 60% of the project.

    • @Qrzychu92
      @Qrzychu92 6 месяцев назад

      just today I lost 3h to Vue.js with Vite crashing on the main page with stack trace to a component that was not on the page. Fun stuff. No clean&rebuild would help. Do you know what helped? Switching branches to master and back to feature branch. Now it works. What a great experience, so vastly better than Blazor :)

    • @PaulSebastianM
      @PaulSebastianM 6 месяцев назад

      @@Qrzychu92 sounds like you have a tooling problem

  • @daniel5040
    @daniel5040 5 месяцев назад

    you did not talk anything about prod -_-

  • @loudascloudloudascloud7540
    @loudascloudloudascloud7540 2 месяца назад +1

    Actually there's 0 real lessons learned in this video. Don't waste your time

  • @justinbryson5275
    @justinbryson5275 Год назад +4

    Im sure blazor has its uses, but ill pass for the moment. Actually working with javascript and other frontend tech has given me huge insights into programming. Skipping that would have been detrimental for me.
    Unfortunately, like with other autogen frontend stuff, i feel like this just puts a huge wizard of oz curtain in front of what you are trying to accomplish ( like linq to sql ) and leaves room for bad code and ineffiency.

    • @rentefald
      @rentefald Год назад +5

      True insight from a junior developer, you're very special.
      Kind regards from a 20+ developer.

    • @fieryscorpion
      @fieryscorpion 10 месяцев назад +2

      You don’t know anything brah.

    • @wboumans
      @wboumans 6 месяцев назад

      @@rentefald 20+ ah that explains why your are against new technologies. Get with the times old man ;)

  • @rentefald
    @rentefald Год назад +6

    Blazor is dead in 3 years. It is simply a mess, weird magic tags that produce stupid HTML.
    Just the idea that everything requires a constant connection to the server, imagine the resource cost.

    • @tecTitus
      @tecTitus 8 месяцев назад

      like other SSR tech do it differently...

    • @JacobSnover
      @JacobSnover 8 месяцев назад +1

      I don't have to imagine it, because we have production apps that don't cost very much and have been running for years with new additions all the time. Static Web apps can be deployed with very little overhead, and there's also multiple ways to run it outside of the server including WASM and PWA.

    • @yarmgl1613
      @yarmgl1613 6 месяцев назад

      the ws connection is super cheap to maintain though

  • @foobarmaximus3506
    @foobarmaximus3506 5 месяцев назад +1

    Blazor Web Assembly has the same paradigm and problems as the OLD OCX controls. Downloading a full app is stupid. Might as well do desktop. Because it will not work correctly on any non-supported (phone) browser, and it will have security and version problems (DLL hell redux).

  • @foobarmaximus3506
    @foobarmaximus3506 5 месяцев назад

    Swedish Companies are using Blazor! So OK then. Good enough for me! lolol