Thank you, Shawn. You steered me in the right direction. I needed to know how to create my own metrics and you showed be how.
@franzgm18 сағат бұрын
First and foremost, let's delve into this rather charming review of Blazor, shall we? Having personally tinkered with Blazor, I must confess to harbouring somewhat mixed sentiments on its practical application. In my humble estimation, Blazor doesn't quite cut the mustard for front-end functionalities that are open to the public's prying eyes-such as your typical e-commerce platforms or general websites. It's like trying to serve a gourmet meal with a plastic spork; it just doesn't do justice to the experience. However, where Blazor truly shines is within the controlled environments of intranets or bespoke dashboards, where access is restricted to those with the appropriate login credentials. Here, it's a different story; development velocity ramps up, and you can actually enjoy a brisk pace. It's akin to having a secret club where only the members know how wonderfully efficient everything is. Now, if we're talking about crafting a front-end for a high-traffic e-commerce site, I'd opt for something with a bit more oomph-like a JavaScript framework. Whether you throw your lot in with React, Vue, Angular, or even Svelte, that's up to you to decide. Personally, I lean towards the elegance of Web Components and plain, unadulterated JavaScript. Why? Because I'm not keen on the bloat that comes with modern JS frameworks-think of it as preferring a finely-tailored suit over a one-size-fits-all jumper. So, there you have it, a rather technical take on Blazor. Choose wisely, my friends, unless you fancy wading through a swamp of unnecessary complexity.
@rapzid35362 күн бұрын
It's 2024 and hot-reloading is sketchy and Blazor has no answer for rolling zero-downtime deployments(unless this changed very recently). They iterate too slow at one release per year; it will never compete with React and other frameworks at that rate for public facing apps that need a premium UX and DX with continuous deployment. You can't get any community contribution momentum behind an "OSS" project when contributions won't release for up to a year.. Or that at any point during said year a PM will just bump something to the NEXT year and it won't release until the END of that year! I think you are spot on that it's a good option to consider for internal, B2B, and other "workhorse" apps. It should be clear now, in 2024, that it's just not moving fast enough to ever close the gap to become something even MS would use for a project like Loop(as an example).
@rankarat18 сағат бұрын
It wipes the floor with react, react is super overrated, try Blazor you'll never go back to React, EVER.
@mikemcgrath63912 күн бұрын
Curious. Given the two approaches, Blazor vis Java/Type Script and Rest. What is (ballpark) the total developer time spent on each approach. Is one faster then the other. Thoughts?
@1992jamo4 күн бұрын
Out of interest, what are you gripes with server side rendering? The apps I have built are the most responsive web apps that I have ever seen, ever.
@DanKowalksi4 күн бұрын
That's awesome Shawn! What do you think of visualization the telemetry immersively in 3D/VR?
@PeterSkillman1084 күн бұрын
Shawn, I just so appreciate you and your teaching style. While I can write JS, I have been a C# server side dev. While my dev friends in commercial shops tell me “We hired a react dev” we have no such luxury. So I have been experimenting with Blazor, both server side and WASM. I do have SEO concerns with WASM, so will use that for internal projects. For an under resourced small team, we have built large scale apps with .net core successfully.
@Thyrius825 күн бұрын
For me, as someone who has years of experience with Angular and React, I feel like switching to Blazor brings little value. I care as much about using C# for the front-end as I do about using JavaScript for the back-end. Maybe because I dislike the idea of front-end frameworks that hinge entirely on the back-end technology in use. Instead, I’d much rather see a brand-new, web-tailored language replace JavaScript, with fresh frameworks built from the ground up on that foundation.
@swildermuth5 күн бұрын
I get that. But if Blazor works for some, I think that's fine. We don't need one solution for all.
@shadyside5 күн бұрын
Thank you so so so much! xo xo
@swildermuth5 күн бұрын
Glad to help!
@63pufferfish6 күн бұрын
We use blazer for an small application. The push back from outside the team, People who did not even work on the product was large.
@swildermuth5 күн бұрын
Not an uncommon response. We tend to get bogged down with Dogma of what is 'best practice' when that isn't real.
@KieranDevvs6 күн бұрын
Just a tip, you dont need to use NPM or Node at all to manage client sided libraries like tailwind etc. You can use LibMan (library manager) which gives you a native VS tooling solution. You can also hook it into your project build steps via the csproj file to configure the MSBuild steps to automatically restore/install any client sided packages that are required for the build that don't exist locally. I prefer this as I hate to touch NPM (it suuuuuuckkss). Its just one less out of band dependency in order to be able to build your project from scratch. (Its also available in VSCode). Another tip is to stop using "AppState". You have a full dependency injection container with registered services that have user defined life times. Your views should inject services that have encapsulated state. One global app state is an anti pattern in my opinion, its just one global static nested class. I understand why people go down this route as its familiar coming from other front end frameworks, but this is one of the reasons why Blazor WASM is so great, you get to use features and concepts that dont really exist in the traditional web frameworks. You might think this is a bad thing as its not the "standard" but this paradigm will only grow as WASM is adopted more and more and web APIs gain WASM bindings over time.
@keithmanilla55827 күн бұрын
We just built a web-based ERP for a construction company. Actually it's an extension of the company in-house desktop-based ERP. I can say I enjoyed it more than building web applications in Next.js and React.js. It was a good decision for enterprise-level applications. .NET Core is amazing. Im starting to consider using MAUI for future mobile app projects.
@ElPolemista7 күн бұрын
thank you for keeping it simple
@swildermuth5 күн бұрын
You're welcome!
@slipoch66357 күн бұрын
I have been using blazor (hybrid & server mostly) for cross platform dev. I don't see an issue with using blazor server for your secure componentry then use hybrid for the other components and maybe a local js framework for any dynamic dom stuff, it actually works pretty well as then you can get rid of any heavyweight JS framework crap, have it use a component from the server until it is loaded locally and the user doesn't even realise it is now running locally. TBH I like that I can inject a service directly into a component, and I don't have to have JS repeating the definition of my architecture as well as a backend definition in C# keeps things simpler to update in the future as you just update the one model, the one component etc. Please note: I have been doing web dev for large and small scale operations for years and this is the first framework other than htmx that I actually think will be useful on a longer term basis
@ShaffafAhmed9 күн бұрын
This video answered the biggest questions I had with blazor. Whether it could be an alternative to JS frameworks.
@robertok46469 күн бұрын
Interesting interview: Daniel Roth & Nick Chapsas (kzbin.info/www/bejne/aKaveIubbpqeitE&ab_channel=NickChapsas)
@nagendravc10 күн бұрын
The problem I am facing these days with blazor is that anti-malware / internet security providers are marking as potentially dangerous. In my specific case - bitdefender is doing this for at least one website. This leaves a bad taste while deploying blazor applications
@slipoch66357 күн бұрын
Is your code signed? What antimalware/antivirus is marking it down? (If it's norton's, mcaffee, or kaspersky then it is prolly their 'heuristics' which actually are not heuristic and use a free whitelist on the internet that is a pita to get put on for more than a month, but these are rubbish AVs and should be avoided at all costs). And what are you developing, is it a desktop app, what OS are you testing on, what platforms on that OS are you touching?
@curtdkrueger10 күн бұрын
Watching this a year later. No argument that A.I. can help a lot with programming, it's basically "knowledge compression" and available at our finger tips. But current A.I. specifically LLM based AI, is a trained probability/statistical model of current knowledge at the time the model was built. There's no "consciousness", especially an artificial one doing any "thinking". You ask a question and it does a complex word probability return, without any understanding of what it's returning, and no way to know and/or test if it's correct. It does an excellent job responding, but you can't trust pretty much anything it returns without testing it yourself or using your hard earned programming knowledge (in our case) to verify the validity of its results. We end up either knowing or testing the result, which AI can not do. I wouldn't bet against that they'll eventually get there, and maybe a lot quicker than we think, but at the moment, they appear "exponentially far away" (exponential growth/learning is always quoted when referring to it's "intelliegence").
@abrrrakadabrrra10 күн бұрын
blazor is the killer of js and all its funny frameworks :)
@swildermuth5 күн бұрын
I doubt it.
@MB-or1kh12 күн бұрын
Blazor WASM is as old as Blazor Server. It shipped with version 1.0.
@swildermuth5 күн бұрын
But the quality of Blazor WASM has changed substantially. It used to need to download the entirety of the WASM Fx.
@PaulA-c4x12 күн бұрын
builder.Services.AddMicrosoftIdentityWebApiAuthentication(builder.Configuration); use this with "AzureAD"
@PaulA-c4x12 күн бұрын
Would this work with .NET YARP Gateway? SPA Style? Great video thanks
@swildermuth12 күн бұрын
Should. I've seen it done.
@Explorest12 күн бұрын
Shawn your app is running locally but insights visible on Azure Insights ??? How is that happening ??? Is there a local version of Azure ??
@swildermuth5 күн бұрын
Because I configured it to use App Insights. You could even host your app outside of Azure and use AppInsights.
@banksy21514 күн бұрын
Would you mind sharing your source code for this small project? Your pattern for minimal api registration looks quite interesting
@swildermuth14 күн бұрын
I can't find the project at the moment, but if you'd like to see the MinimalAPI registration, see the project at github.com/shawnwildermuth/MinimalApis/blob/main/MinimalApis.Discovery.md
@marcouitendaal98516 күн бұрын
Click! First video I watched on your channel. And that bit on invoking next with context... Nice. that helped something click in my mind. Subscribed.
@swildermuth14 күн бұрын
Glad it was helpful!
@this-is-bioman17 күн бұрын
Blazor is just another cheap attempt to avoid Javascript. Just replace the damn thing with something modern and strongly typed and stop creating these stupid frameworks or workarounds like typescript.
@swildermuth14 күн бұрын
I can't agree (especially around TypeScript) but if JS works well enough for you, glad it works!
@abrrrakadabrrra10 күн бұрын
no it isn't
@pvanroos17 күн бұрын
Excellent analysis Shawn. A common thread I find is that the "older" C# devs really like it because they can do alot without touching JS/TS. One thing I found extremely helpful in larger enterprise grade app dev efforts is the ability to share class libraries. Can't do that with Angular or React. It's just a time saver and really helpful at buildtime.
@swildermuth14 күн бұрын
Easier to share libs in C# for sure. Though Angular and React (and Vue) can share libraries via NPM packages (or there are ways to do this in Next and Nuxt). But I get your point.
@RK-xl2uq17 күн бұрын
Its funny that you said Nuget search doesn't exists because they deprecated nuget list for nuget search now :P , but good video thanks
@snapching17 күн бұрын
Your points are all valid, and building an application using WASM is really new compared to the other frameworks. However, my rethink is: Why are we building web applications from the client side? Historically, there is a reason for this: server-side resources were limited and time-consuming to scale. Hence, we could scale quickly by pushing the application to the client and minimizing the server-side resources used. Enter cloud resources and server-side dynamic scaling. With the server-side having resources, do we need the complexity and all the work to get the application to live in a browser as the application development platform? For horizontal applications (e.g. social media), but for enterprise applications that are all converted to web applications to solve a distribution and maintenance problem? IMO, these applications are much more stable, cost-effective, and, most importantly, reliable (all web applications have an unmanaged dependency on the browser and often the JavaScript libraries). I'm critical that we consider all the requirements and the changing tech for each development project. Yet, even as developers, where change is always constant, we like to continue doing it the same way.
@swildermuth14 күн бұрын
Interactibility. Even Blazor Server is doing things client-side. (e.g. making the SignalR calls). If you think back to the client-rendering days, we had to write snippets to make the user feel like they were interacting with the server. That's where REST came in. But if you travel back to ASP.NET Web Forms, the nightmare of hiding the server interaction bit us hard. I don't disagree with most of your sentiments, but these same arguments have been being made since pre-2000. I do love your quixotic attempt though ; )
@slipoch66357 күн бұрын
Cloud resources are massively overpriced for what you get (speaking as someone who has had a client on a 30+ S3 instance scale out azure webapp with scale up sql), there is also the latency up and down, the fact that under load you are looking at instances per visitor, which may drag on resources when you have 40k people hitting the site each day. if something doesn't need to be done on the server, do it on the client, it's less expensive to you and it should run faster. Cloud hosts are also NOT as reliable as a properly managed webserver, a website I made in 2015 is still up and going with no-one touching it since then on a server at my old employer's. I have had numerous instances where Azure fails, in one instance their whole data center went down in central US due to a lightning storm and it took 5 days to come back up with no offer or option of hosting the sites anywhere else in the meantime. All that being said there are ways and means, if I run a JS framework that resizes, crops my images for responsive scales, I am NOT going to make every visitor's system use that framework to do that, I'll change it to do it once server side for the various crops and scales and store the output in a blob as webp then use the dom to decide which image to use based on the browser size, this is all largely automated these days. But if the user wants to re-sort a list or move bits and pieces around on the screen just for them, then doing it on their system makes more sense.
@CyberSpace.global17 күн бұрын
quite insightful.
@swildermuth14 күн бұрын
Thanks.
@godfathermikal18 күн бұрын
This is exciting! Definitely have a use case for this. Thank you.
@swildermuth14 күн бұрын
Glad you found something useful! Let me know if you have questions about it.
@law690618 күн бұрын
I personally just dont like the though of GUI being integrated with your business logic which to me is what Microsoft's MVC does. Pick a language / framework that works best for your data logic. Pick a language / framework for you business logic. Pick a language for your Gui logic. If you make your language determine what you pick for any solely on "I don't want to have to learn / understand multiple languages" you are doing the application wrong. Personally my goto is Angular / typescript frontend , c# serverside , and database i'm starting to like Postgresql but Tsql is still VERY good imo.
@swildermuth14 күн бұрын
The goal of MVC was to avoid the mix of GUI and business logic, but lots of companies missed the memo. I am with you, MVC/REST/MinimalAPIs are the way I prefer to write interactivity with a client - though I don't want to throw the baby out with the bathwater when it comes to some benefits of a hybrid model of server and client rendering. But just rendering.
@user-eg4qz9yc7e19 күн бұрын
I've coded in Blazor wasm at work for 2 years and I can see the attraction coming from a svelte + typescript full stack enthusiast. My issue with Blazor has been SEO applications, mobile performance, high demand of Javascript/Typescript libraries integrated; binding data between C# and Javascript which was the point of Blazor to avoid javascript/typescript. SvelteKit is very similar to Blazor with syntax and gets the benefits of performance and one universal language installing libraries. I make sure my code is written in typescript, not javascript on either Blazor or Svelte-kit.
@swildermuth14 күн бұрын
I totally agree with your sentiment.
@slipoch66357 күн бұрын
Ummm, how the hell is your SEO taking a hit? Just from latency? Or are you trying to force Blazor data into a JS framework for the SEO? I managed to get onto first page natural google results for an Application I used to support (formerly it was pg5) without touching any of those JS packages and I can use Blazor to do exactly what I did previously. Mobile performance is quite good on my old Samsung S3, but then I am using cross-platform and server/hybrid mostly, not forcing everything into WASM which obviously relies more on local resources. But I would be checking your logic, making sure any loops are optimised, minimising file I/O etc. etc.
@user-eg4qz9yc7e6 күн бұрын
@@slipoch6635I'm going based on benchmarks compared to the 110+ different front end frameworks. The size of a Blazor WASM page is over 1MB. Google search "js Interactive Results" by krausest and you will see Blazor dead last with page size download and speed. You using a Samsung S3 is a small sample size and vague to point out because internet connection speed is also something to consider.
@user-eg4qz9yc7e6 күн бұрын
@@slipoch6635 Blazor wasm by design has over 1MB a page size whereas the majority of js frameworks are under a few kilobytes. This is coming from someone who wants Blazor wasm to succeed because .net has a faster backend than JS backend but blazor frontend is lacking in performance. It's ideal for interior applications that do not require SEO
@user-eg4qz9yc7e6 күн бұрын
@@slipoch6635 I wanna be respectful @swildermuth @slipoch6635. Blazor wasm pages have huge pages size to download. It has nothing to do with loops or minimizing files but how c# wasm is optimised. Even rust wasm frameworks like leptos or dioxus have similar issues but is faster for being a system level language.
@margosdesarian19 күн бұрын
Very helpful. !!
@swildermuth14 күн бұрын
Glad to hear that!
@rmcgraw794320 күн бұрын
Value type equality semantics and immutability, mostly. Good with event sourcing.
@UmmarFarooqMahroof21 күн бұрын
I'm actually intrigued with the whole .NET maui blazor hybrid concept. Because I think html css is the best UI language ever and the power of C# for controlling managing the logic is excellent, the only ballbreaker is the xaml, but I suppose that binding/mapping needs to happen somewhere. What are your thoughts on .NET MAUI Blazor hybrid apps
@swildermuth20 күн бұрын
Haven't used it. Is it HTML Based like Blazor WASM?
@UmmarFarooqMahroof20 күн бұрын
@swildermuth yeah, essentially blazor components inside a "webview" component but in a cross platform app. Under the leadership of James montemagno (on KZbin)
@UmmarFarooqMahroof20 күн бұрын
Oh and it's an official. Net maui thing, not a 3rd party Extension
@swildermuth20 күн бұрын
@@UmmarFarooqMahroof "Inside a WebView component", I get nervous.
@UmmarFarooqMahroof20 күн бұрын
@@swildermuth maybe I'm not doing it justice, but yes that was my initial thought too, however I would like to see yourself have a go and your thoughts on it, if you get a chance, because the idea is that you have one way to create a ui for all platforms (inc desktop in a single codebase In a highly productive language like HTML
@pierre936822 күн бұрын
Blazor is great for the "admin" part of a website. Also just use server rendering instead of wasm.
@SpaceTrump22 күн бұрын
Great Video!
@GoliYardan22 күн бұрын
Hey 👋 ... Can I ask you , how could I install SQLserver in GitHub codespace ? ... Because in final step , I got an error about python!? ... Can you help me?
@swildermuth22 күн бұрын
I don't use GitHub codespaces unfortunately. Are there different codespace profiles that you can use? I am not sure.
@GoliYardan21 күн бұрын
@swildermuth I wanna learn to use docker SQLserver and try it in codespace, because unfortunately it's only vps that I have to access for testing for free ... Other providers like azure and digital ocean exits for trial but all of them need credit card identification for access to them , and I don't have one , because of , i born in country that under sanctions. Thank you for your reply 👋
@clouddeveloper454923 күн бұрын
All in on Blazor WASM for several years now and never looked back. After spending years toiling with the latest JavaScript toolset, Angular, Vue, and the ever changing client side landscape our teams are far more productive leveraging the .Net ecosystem on both client and server. Tailwind + Blazor component model + the stability of .Net library ecosystem is hard to beat
@mq903214 күн бұрын
How do you deal with long loading when you access the page for the first time?
@clouddeveloper454910 күн бұрын
@mq9032 We’ve been use prerendering which loads page and static content quickly and provides SEO. Net 8 has also introduced SSR, Server-Side Rendering, and transitions to WASM. Both are viable options.
@slipoch66357 күн бұрын
@@mq9032 If you use a blazor hybrid component it runs off the server until the component is downloaded then switches over seamlessly.
@auronedgevicks773924 күн бұрын
spot on. This is doing the same thing in a different way with no benefit other than it's in c#. It's not that it's bad it's just tedious and new, most of that stuff is just boilerplate code you can write faster in react or some other framework. So yea there's no compelling reason to use or learn it other than you already know c# and you want to spit out some webstuff without having to retool for the more established frameworks
@pawspaws10124 күн бұрын
That blew my mind!!!! Thankyou!
@MohamedBeyremMakhlouf-gn6iv24 күн бұрын
thanks for sharing
@krs-tube24 күн бұрын
Thanks Shawn, would the hybrid support earlier net versions including netstandard 2.0? When will it be officially released?
@hosseingh914625 күн бұрын
DaisyUi is amazing!
@JanBebendorf26 күн бұрын
Typescript exists and it does a really good job especially at fullstack while also being great for frontend and backend individually. I'm a Java guy and I also tried finding solutions to use my lovely Java in browser but the language is simply not built for that and the frontend world has so many cool techniques and patterns that are hard or ugly to implement in C# or Java. I ended up sort of giving up Java this year and I'm now sort of migrating myself to typescript & bun (Actually I've done typescript stuff for a few years but never really forced myself to adhere to good practices like never any). We've become so much more productive in typescript while also having the typesafety I loved in Java. And yes C# has become a little more modern than Java but it's still dated...
@swildermuth25 күн бұрын
I hear that. I don't enjoy Node dev so I'm biased towards C# backend - and JS/TS on the front-end. But I understand why many want the same language on both sides.
@DiegoMenta26 күн бұрын
Thank you!!! Your video is detailed enough to learn such a complex topic. Also, I'm trying to learn SourceGenerators and after many attemps with code from other videos, yours is the first one that I downloaded and works without a hitch! Great work, thank you again!
@thesecretreviewer824226 күн бұрын
i would have to agree with those statements my friend, well said. i find a lot of these frameworks do the same thing. They help with the tedium of repetitive work. Reminds me of making helper apps during my career
@thesecretreviewer824226 күн бұрын
i think people worry too much about neat code versus fast and stable code.
@xamarinmaster140326 күн бұрын
I have dabbled in web development my entire career, but never really fully engaged as a full time web developer. Therefore, I am ignorant in a lot of things regarding modern web development. The biggest web application I ever wrote was back in 2004 which used java applets and Nexaweb (which I don't think exists anymore). Anyway, I have never liked HTML, CSS, and JS so always tried to avoid learning them well and looked for alternatives, like java applets, GWT, Silverlight, etc. Therefore, Blazor is wonderful in my naive opinion. I learned C# in 2010 when Xamarin came out so that I could do cross platform mobile apps. C# is by far my favorite language so getting to use C# for both backend and front end is very important to me. Every time I try to learn modern web technologies, like JS, TS, Vue, React, Node, etc, I just get overwhelmed with all of the tooling. It seems there are so many little tools and commands that you have to run to get anything done. Like, what is vite and why is it needed? Being able to click Run or Build in VS is so much easier while using NuGet for all of my dependencies.
@slipoch66357 күн бұрын
One of the things that gets me is how many of the JS tools and systems like NPM etc. require systems access and pass it over to the package it is installing.