Тёмный

Running Blazor in Production, Lessons Learned 

Coding After Work
Подписаться 1,7 тыс.
Просмотров 22 тыс.
50% 1

Calm down... the thumbnail is to grab your attention =D
Since we started using Blazor in 2019, it's been an excellent tool for our team of C# developers. Even when Blazor was brand new, we used it in our latest project, which really helped us. Seeing other people in our field, I can say that Blazor was a key to our project's success.
Our journey with Blazor has mostly been easy, but we have still learned a lot along the way. In this video, I will share some tips and lessons we have picked up. I will also discuss how to make smart choices and avoid problems when you're changing your existing project to use Blazor.

Наука

Опубликовано:

 

23 май 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 84   
@jluisxp8553
@jluisxp8553 Год назад
I already created a web application in Blazor, the best things, it works perfectly!!! and in production!!!
@ODSD_EXCITEMENT
@ODSD_EXCITEMENT Год назад
Agreed! Our move to Blazor for our new production website was amazing easy and it performs very well. Super pleased.
@OeHomestead
@OeHomestead Год назад
I'd take Blazor over any JS/TS/npm tech any time of day. It's so much easier to just use C# across the whole stack. I have backends in production, written in Java, communicating with Blazor Server apps through SignalR and it works like a charm.
@CodingAfterWork
@CodingAfterWork 10 месяцев назад
I totally agree =)
@farhadsu
@farhadsu Год назад
I already use Blazor WASM to develop e-commerce application. Thanks for the exciting book about Blazor!
@CodingAfterWork
@CodingAfterWork Год назад
Thank you, happy to hear you like it =)
@imadabab
@imadabab Год назад
Mr. Jimmy. Thanks a million for thos beautiful useful introduction. I bought your brilliant book, it's amazing from zero to hero. Actually Blazor was my dream as a full stack developer using C#. All my new projects are on Blazor and working perfectly.
@CodingAfterWork
@CodingAfterWork Год назад
Thank you, happy to hear you like it =)
@SamWashkansky
@SamWashkansky Год назад
I'm working with Blazor, and I love it
@Tamer_Ali
@Tamer_Ali Год назад
Thanks a lot Mr. Jimmy for this awesome video, I really like the way you explain Blazor
@rkarimabadi
@rkarimabadi Год назад
We also use blazor wasm in our projects as mercantile exchange company. Thank you for sharing your knowledge.
@DigitalNomadOnFIRE
@DigitalNomadOnFIRE 11 месяцев назад
My first computer was a ZX Spectrum 48K+, also did the coding loop. The fact you got a command prompt and could start coding when you switched it on was great...
@remontunasdotru
@remontunasdotru Год назад
Blazor is great!
@ericritter46
@ericritter46 6 дней назад
im breaking into serious development and i am focused on maui with blazor hybrid.
@2005Azm
@2005Azm Год назад
I Just discovered this channel!!! I love your passion! I wish I was working with such a team! Maybe Blazor will save my dev career... I mean put me back on track!
@EngstromJimmy
@EngstromJimmy Год назад
Thank you, I appreciate that :)
@parko1965
@parko1965 7 месяцев назад
At 9:25 when he started to explain the flow between the browser dom and the backend, I decided to keep watching. Explained very well.
@CodingAfterWork
@CodingAfterWork 7 месяцев назад
Thank you ❤
@TheCameltotem
@TheCameltotem Год назад
För övrigt bra presentation! Täcker de mesta man skulle vilja veta. Visste inte att de var så stort bland större företag, har själv kört det i lite olika bolag som jag konsultat hos men de är inga top 10 ställen.
@mubarekabdi
@mubarekabdi 10 месяцев назад
You’ve really explained well everything around Blazor. ❤
@CodingAfterWork
@CodingAfterWork 10 месяцев назад
Thank you =)
@JacobSnover
@JacobSnover 11 месяцев назад
Love Blazor! Have a couple small sites running it, and also have production code at work. Server side, WASM, and looking forward to the hybrid model in .Net 8! I didn't mind vanilla JS but never wanted to learn a framework. Looked at Xamarin but never did WinForms and then Blazor saved my life!
@Jeff-gt2xu
@Jeff-gt2xu 7 месяцев назад
I am learning Blazor now; well, that and C# and bootstrap at the same time.
@francoislepron2301
@francoislepron2301 Год назад
I am really happy to hear that because today I work with PHP and React, and this is a daily pain for refactoring or adding features. I beleived strongly in Blazor since the beginning because the coding strucure is awesome and clean. I hope that more and coders and companies will move on Blazor since this a really game changer to my opinion.
@CodingAfterWork
@CodingAfterWork 10 месяцев назад
I see more and more companies move over to Blazor. Large companies that I wouldn't have thought would jump on the train this "early". But it does take a lot of effort to rebuild an existing site so I would guess Blazor has a pretty good adoption rate especially companies moving from WebForms/MVC/RazoPages.
@sephyshen2510
@sephyshen2510 Год назад
Maybe it is time to start using Blazor for upcoming projects. Give it a try.
@thindal
@thindal Год назад
I recently started working with Blazor but I've been loving every second of it. For an old webforms dev it comes really naturally. I'm trying to do it with WASM from day one though.
@gunnars04
@gunnars04 Год назад
Really cool stuff, very well explained
@CodingAfterWork
@CodingAfterWork Год назад
Thank you =)
@blackpaw29
@blackpaw29 Год назад
"Its not Highlander" - lol, perfect :)
@EldonElledge
@EldonElledge Год назад
I am currently designing and developing a application as a contractor that is Blazor WASM for the UI.
@TheCameltotem
@TheCameltotem Год назад
Regarding code behind. I usually start off with c# in razor pages when they might be a small component or whatever. If its a huge baseclass with lots of dependencies and methods I have it as codebehind and move it under another file structure just to make it easier to work with since those razor pages usually have a lot of code inside them anyways.
@CodingAfterWork
@CodingAfterWork Год назад
This is what I do as well, but I rarely find myself having too much code, in many cases, I create additional components.
@betterlifeexe4378
@betterlifeexe4378 10 месяцев назад
Blazor is so much cleaner then JS solutions and it's getting better all the time. Right now the thing that it needs the most is better interop with JavaScript. it would be really great if there was a way to interface with JavaScript API calls with little to no JavaScript. I hate working with JavaScript async, returning multiple values and having to serialize and deserialize data when it doesn't work.
@betterlifeexe4378
@betterlifeexe4378 10 месяцев назад
This time last year I was saying that what blazor really needed was more free components but it's gotten better
@hillarysagwa5064
@hillarysagwa5064 11 месяцев назад
No one is talking about this but the problem with blazor wasm is not the download size but the loading time esp on phones. prerendering solves the problem halfway as even with the page fully loaded, it remains unresponsive untill the wasm loads. during the loading time the user can neither navigate to a diferent page not click on any button
@reynaldoruizflores
@reynaldoruizflores 10 месяцев назад
Is there a Contoso complete Example ?
@aguluman
@aguluman Год назад
Hi, could your viewers get a link to the source code?
@charlinhos0824
@charlinhos0824 Год назад
The only caveat I see, it is the need of an extra runtime layer in the browser, in case of Blazor Webassembly, because blazor does not create a webassembly executable(binary) directly, I think it is dotnet which does it, I think Blazor Server Side could be more approachable to Csharp Devs in this regard, I don't know if in the new AOT compilation probably blazor creates webassembly binaries directly, probably a good question to ask you, and another is what version of Blazor tastes would you prefer, WebAssembly, or Server Side Rendering taste??
@CodingAfterWork
@CodingAfterWork Год назад
AOT is WebAssembly but at the cost of a larger download. I prefer Blazor Server, simply because I have used it the most and the debugging is a tiny bit faster. But it really depends on the project. I use both in different projects.
@yashizuko
@yashizuko Год назад
34:52 YES 1000 times, i have seen alot more performance by using html+css is unreal, syncfusion, telerik, radzen all crap, pure html and css is your friend to actually save performance and time when you need to customize, Build your reusable components
@PrashantUnity
@PrashantUnity Год назад
Here goes one of my subs
@nagarajm889
@nagarajm889 9 месяцев назад
Great stuff man. However, the memory consumption is not just due to F5. Blazor just keeps adding up the memory on every page navigation, but not releasing the memory that was consumed before. When hundreds of people use the website and move around different pages, blazor is ballooned up with huge memory and eventually goes out of memory. Any suggestion??
@CodingAfterWork
@CodingAfterWork 9 месяцев назад
That is not the "normal" behaviour, the memory should be garbage collected as usual. Check your code so you are disposing database connections or any other resources that need disposing. You can also change the way the system garbage collects, you can configure the GC in workstation mode instead of server (this will more aggressively collect). I don't see the behaviour you describe in our applications so this shouldn't be a Blazor issue.
@zc0rp10
@zc0rp10 11 месяцев назад
Hi Jimmy, how do you deal with storing app-wide/persisted state in your production apps? Are you injecting your own statecontainer service or are you using any of the libs out there such as fluxor or blazor-state?
@EngstromJimmy
@EngstromJimmy 11 месяцев назад
Injected my own class is the way I have done so far. I haven’t looked at Fluxor but I have heard great things.
@zc0rp10
@zc0rp10 11 месяцев назад
@@EngstromJimmy Cheers Jimmy!
@vickychang7183
@vickychang7183 Год назад
What blazor needs is a way to directly access browser / dom using c# and just bypass JavaScript. Blazor still clunky when it comes to working with dom. Also, they need a better way to create and work with API’s. They need something like like EF that will just create all the API for you.
@CodingAfterWork
@CodingAfterWork Год назад
WebAssembly don’t allow that, but it is in the works as I understand it :) Not aure about the API comment though, minimal APIs and open API client generation is pretty sweet.
@S3Kglitches
@S3Kglitches Год назад
Wait isn't the whole component updated when it changes? Not just the h1 with Rulez -> Rules?
@EngstromJimmy
@EngstromJimmy Год назад
Only the actual changes gets pushed over signalr or via JS interop. Pretty cool isn’t it?
@michaelswells
@michaelswells Год назад
What do you mean with adding a refresh button? Would you please explain (or show some code) of how to implement a refresh button.
@EngstromJimmy
@EngstromJimmy Год назад
Add a button that loads the data again (if it is something that changes frequently). What we want to avoid is our users to consider the data on the screen ”old” and therefore press F5 to refresh it. There is nothing special with the “refresh button” only a button that gets the data again. Hope that helps
@michaelswells
@michaelswells Год назад
@@EngstromJimmy That clarifies it for me.
@notoriouslycuriouswombat
@notoriouslycuriouswombat Год назад
the angular killer? lol way to set the bar high
@CodingAfterWork
@CodingAfterWork Год назад
As you may have seen, the point the video is making is that there are room for more than one =) But it is not a statement, it is a very common question/comment. If a new framework won't kill another, the new framework will never succeed, which is of course not true.
@manuelmq2043
@manuelmq2043 Год назад
Hello Young. I have a system developed entirely in Blazor and Oracle. The detail is that it hangs from time to time and I have to restart the server. You say that blazor supports millions of users, I don't have 50 concurrent users and it crashes. What should it be?
@EngstromJimmy
@EngstromJimmy Год назад
I don’t have enough information to diagnose the problem. From my experience I haven’t seen any problem like that when it comes to Blazor. It can be how you connect to the database, if you don’t dispose the connections that might add to a problem. Check the memory usage. But in short something is going on, but my bet is that it is not Blazor related.
@manuelmq2043
@manuelmq2043 Год назад
@@EngstromJimmy Thank you very much for the reply. My project is implemented with Radzen in the Fronted and Full API for the Backend. It is implemented in Windows 10 as a test. We are thinking of migrating to WebAssembly, and before doing so, could you give me any configuration recommendations for putting the system into production. Thank you again.
@arknu
@arknu Год назад
The problem with Blazor is that it is inherently inefficient. Either you have to have a persistent connection to the server, with associated latency. Or you have to download 1 mb of WASM data. It is just less efficient to translate between C# and JS than just running directly in JS. Now, that may be alright in many cases, but you have to be aware that you'll never be able to match Angular or React for download size. Now, .NET 8 may change with the ability to do server side rendering and sprinkle WASM where needed.
@CodingAfterWork
@CodingAfterWork Год назад
It depends how you see it. Development time is faster (for a C# team), 1mb is absolutelly more than any JS framework. But as I mention in the video, most sites has WAY more than a mb of JS. But it all depends on the application we arr building and (I would argue) even more importantly, the team.
@knightwriter2989
@knightwriter2989 Год назад
"Inherently inefficient"? Comical.
@ovarelac
@ovarelac Год назад
on the one hand Blazor is amazing, I can imagine things like: photoshop, protools, videogames, a ZX Spectrum emulator, etc. running in the browser, which is mind blowing. However in the other hand I understand the perspective of the person who told you: "never gonna be a thing"... because You can not generalize all web projects into a single way of working. I understand the power of Blazor for large projects BUT in light projects, the programmers like to be in control (including me), and not that there's a lot of "MAGIC" everywhere, because that implies that many things are going to happen behind the scenes, things that I don't see and can't debug, and that at some point are going to go wrong... Microsoft should have already learned that after the slow death of the web forms. I don't think the solution is to remove javascript or say you don't need it anymore... It's like to do a simple task (like a table CRUD) you need a spoon but Blazor is like carrying a big bulldozer... you don't need THAT much power for something so simple . I think that's what people at Microsoft can't see.
@EngstromJimmy
@EngstromJimmy Год назад
I use Blazor for small projects as well. If we just ignore the magic for a bit (everything is open-source so there are ways to know). Working with NPM, transpiling and all of those things make me super slow. Having one language that I know is simply going to be the best experience… for me. So it come down to the developer. The end user is not going to say ”ugh, this is written in JS pr WebAssembly” the end user don’t care. From my perspective, if you are a C# developer, there is no reason to not choose Blazor when it comes to the size of the project.
@ovarelac
@ovarelac Год назад
actually, there is a reason: I love javascript in the frontend... and debugging and working in my chromium-based browser. And I love C# in the backend... it's just the way I like to work... Cheers 😁👍
@EngstromJimmy
@EngstromJimmy Год назад
@@ovarelac ”no reason” was perhaps a bit harsh. What I meant was if you like JavaScript and is comfortable with what you already are working with, then you should continue. But if you enjoy C# and are not a fan of JavaScript then Blazor is a great alternative, and in my opinon, for all different project sizes :)
@vivekkaushik9508
@vivekkaushik9508 Год назад
2x
@BunmJyo
@BunmJyo Год назад
哈哈哈👍
@jora5483
@jora5483 Год назад
M$ products often is no capable of killing other tools, but itself. History proves it.
@CodingAfterWork
@CodingAfterWork Год назад
As you may have seen, the point the video is making is that there are room for more than one =)
@jora5483
@jora5483 Год назад
@@CodingAfterWork Sorry. That's fine... tho I saw 'Angular killer' on the preview..
@DigitalNomadOnFIRE
@DigitalNomadOnFIRE 11 месяцев назад
It really does feel like cheating.
@CodingAfterWork
@CodingAfterWork 11 месяцев назад
Haha, yep it really does
@vivekkaushik9508
@vivekkaushik9508 Год назад
async void is blasphemy in dotnet world lol
@CodingAfterWork
@CodingAfterWork Год назад
I never write the code like that, I must have had a temporary moment of insanity :)
@chriswinslow
@chriswinslow Год назад
47:29 “…Blazor has to be able to handle millions of users…but it can’t!” Everyone developing a website/app hopes to reach as many people as possible, not being able to handle huge amounts of users is not a good sales pitch! So basically, if expect to one day reach millions of users you’ll need to switch to a MEAN OR MERN stack, so you may just as well use either JS stacks from the get go?
@ODSD_EXCITEMENT
@ODSD_EXCITEMENT Год назад
Wow, we aren't experiencing any problems with our internally developed test automation Workflow engine. We test thousands of real-time connections with ARM device testbed. We have real-time dashboard that tracks all test and this all works over the internet. No performance delayed at all. We are very impressed thus far. Lots of variables here so it most like depends on how you've Architected and implementated your application framework.
@EngstromJimmy
@EngstromJimmy Год назад
Blazor Server needs a continuous SignalR connection which adds constant load on the server. If you have millions of simultaneous users you should consider Blazor We Assembly (which works just as and other SPA Framework). In .NET 8 there will open up even more possibilities in this area with streaming updates, auto-switching and much more.
@adrianspikes6454
@adrianspikes6454 Год назад
Waay too much time on something other than production. U forgot ur target audience
@Rogueixpresents
@Rogueixpresents Год назад
I dont think anything can kill javacript ecossytem in the frontend environment.
Далее
What is the Future of Blazor? Should I Learn Blazor?
22:32
😱КТО БУДЕТ ЛЕДИ БАГ А4⁉️ #а4
00:50
Ouch.. 🤕
00:30
Просмотров 14 млн
Blazor United prototype
13:20
Просмотров 61 тыс.
Blazor in 100 Seconds
2:33
Просмотров 561 тыс.
Is Blazor Better than React?
14:25
Просмотров 45 тыс.
Blazor: Why 2024 Is The Year Of Blazor 🚀
9:40
Просмотров 24 тыс.
When RESTful architecture isn't enough...
21:02
Просмотров 261 тыс.
CrowdStrike IT Outage Explained by a Windows Developer
13:40
Why We Choose Blazor over React and Vue: Matt Jones
40:23
Blazor Basics: Cascading Parameters
29:15
Просмотров 3 тыс.
The TRUTH About Coding Jobs in 2024
7:37
Просмотров 2,8 тыс.
НЕ БЕРУ APPLE VISION PRO!
0:37
Просмотров 375 тыс.