What is the Future of Blazor? Should I Learn Blazor?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this episode of Dev questions with Tim Corey join us as we tackle the questions you are asking about a career in software development understanding the industry and new technology if you are just starting out or you want to grow stronger as a developer this is the place to get your questions answered now here's your host expert developer and online educator Tim Corey what is the future of Blazer is Microsoft invested in making Blazer great or is it another way of Silverlight let's talk about in today's episode of Dev questions now if you have a question go to suggestions.imcorey.com and ask it there and hopefully you'll see your question answered in a future episode of Dev questions like this one so what is the future of Blazer is it is it going to succeed is it going to be a long-term thing or is it just a passing fad and the answer is the future is bright and the second question is Microsoft invested in making Blazer great absolutely in fact if you look at the upcoming.net release dot net eight you'll see that a lot of the changes that have been reported they've been talked about that are are already in the the pre versions the um the the testing versions a lot of those changes have to do with blazer in fact there's a lot of really cool new things coming in the Blazer so let's talk more about that because why is this the thing that Microsoft is going all in on why is this the thing that the technology that Microsoft says hey this is the way to go especially since you might not be seeing Blazer as much in the industry as let's say MVC which is much more common so let's talk first about why is it that Blazers not everywhere and just you know throughout the entire Marketplace well the reason for that is because of time yes Blazer's been around for a while Blazer server came out with net core 3.1 I believe so it's been around for net 5.net 6.net seven that's three full years almost four full years and now we're in your fifth year with net eight and a lot more changes so there's a lot of history here but at the same time there's something where companies even five years that's enough time to get started get some moment and we do see a lot of companies using Blazer but at the same time there's companies with 20 and 30 years in a software product and they don't just change overnight so don't expect to see you know don't expect to judge whether or not their market share is you know is large or it's growing or if they're investing in it based upon just what job you might find in the industry right now or the percentage of jobs because that will grow over time but uh it's definitely a lag measure something that happens after the fact so Blazer if we look at the um the metrics the people who are using the the amount of Interest the amount of people are saying yes I want more of this yes I want to start using this that is has gone up tremendously and Microsoft is saying this is something that people are asking for therefore this is what we're investing in so let's talk more about Blazer so every tool has a purpose and not every tool fits a job so let's understand what the benefits of Blazer are so you can look at a future Blazer and see you know where does it fit and what what tool is this because it's not going to be an everything tool necessarily although it's getting larger and larger in that category because Blazer is becoming less and less about a specific project and more about an ecosystem so let's talk about Blazer so the goal with blazer is to have Rich client-side interactivity powered by c-sharp and that's both Blazer server and Blaze webassembly have the idea of running your web app on the client and do that rich client-side interactivity that you might normally associate with angular or react or view or something like that a JavaScript framework but it's a c-sharp powered framework so you can use the same c-sharp code you're you're writing your data access with and your your business logic you can use that same code to then write your UI with and have that that same interactivity well blader server sits on both the client and server side which is really convenient because blader server says hey you can write all your server side code and act like it's a PHP or or other cert MVC other server-side code but at the same time you still get that rich client-side in activity and of course it does that using signalr to communicate between the two so you can write code that directly talks to a database and it's okay it's safe so that's Blazer server and then Blazer web assembly says hey you might want to have an offline app or a progressive web app or a fully client-side application for you know maybe it makes your your site more responsive that way whatever the case may be that's Blazer webassembly and it runs fully in the client side and yet you can still use full C sharp to do that so that's what we have now is Blazer server and Blazer web assembly or at least we did and then.net Maui said hey you know what we could do web apps and desktop apps or I'm sorry mobile apps and desktop apps if we use some of that same Blazer server code or Blazer code so they created Blazer hybrid which you can use with Maui to create native desktop apps that run in a web view but it runs all locally it doesn't go to the server to get anything it runs all locally and you can use that same code that you would use in a Blazer server or a Blazer assembly but now in a mobile client or a desktop app so there's a lot of different options we have right now they all interact well with JavaScript so you can use JavaScript as well you don't have to say just C sharp you can say C sharp and JavaScript they fit together but now let's look at what's coming with.net 8 to see kind of Microsoft's vision for where Blazer is going to go because that's important to understand when you're talking about okay these tools are great I think I want to use one of those but where's it going because if it's going to go a dead end I don't want that and if it's going to a place I don't want to go okay you know change and do something else but if it's going to a great place I kind of want to be on that train and so let's talk about dot net 8.net 8 has a few different things into it and really what they did was they sat down and they dreamed up what could he possibly do with blazer one of the things they're going to offer is this is all pre-release stuff so things may change as they get close to production but one thing they're going to offer is server side rendering you may say what we have Blazer server right no that's different server-side rendering is completely server-side there's no client-side aspect to it so it's more like an MVC or a PHP where it render is entirely on the server and then just passes down the HTML CSS and maybe even JavaScript if you have some but pass it down just the the completed web pages so you can intermix your C sharp into your web page and it will render a dynamic page but it will render on the server and then pass it down which if you're not familiar with how MVC or PHP or others work you may think well that seems inefficient in fact it's just the opposite usually it's highly efficient because the client is downloading a very small just what they need web page as opposed to the web page plus all the code so it is very efficient it's very quick and when you don't need to have that rich client-side interactivity this is a great option because it just renders the page cleanly how you want it so you can still have that Dynamic hey let's pull from a database you know maybe um our business hours we're gonna pull it business hours from a database but they're not going to change so the client doesn't need to interact with those in a way where they get to adjust anything so we just want to show them here's our hours we want those hours to be changeable by changing a database entry that's where server-side rendering is really powerful the same is true with things like employee lists and you know information about your product even can pull from a database where it can be dynamic but at the same time on the client side there's no Dynamic interaction a lot of websites you deal with mostly are going to be this static type of of page where it's not going to change you know for you it's not going to change for for your interaction it may change over time as hours get updated employees get added or removed and so on but that's a a longer term change not a right now change and that's where source side rendering is really powerful so that's one thing that's coming to blazer.net eight but then this is a really cool thing specific components can be rendered as server or webassembly which means you can have a fully server-side application maybe let's just say you are a a restaurant and so you have your welcome to the restaurant homepage nothing really changes there so server-side rendering you have your menu things don't change there very often again not in the the life cycle of that one web page therefore again server-side rendering Postman database but then there's the order page well that order page needs to be interactive you can make that page or a component on that page interactive using Blazer server with that signalr connection or Blazer web assembly where you have a fully offline or fully downloadable version of that interactive form so that can be just for that page which cuts down on the overall transmission to the client it makes the whole page faster and then that one component is the only thing that's that's pulling down changes and and and doing some rendering on the client side so specific component rendering in either server or webassembly but then there's also the idea and this is another great idea the ability to change the render mode at runtime so here's the example that I've seen is that your site loads as a Blazer server application remember Blazer server is it gets rendered on the server but then when it transfers down to the client a connection is open with signalr and that connection allows for real-time changes in the client to be reflected back to the server and for the server to have any changes reflected back to the client and that connection has to be open and it has to be always online so if you have any service disruptions that will break the connection and can cause problems rendering your page that's Blazer server Blaze web assembly is we download the entire application to the client well the application can be two three megabytes potentially of content now if you actually look at web pages and how they render today a lot of web pages are a lot larger than that your whatever new set you go to whatever sports that you go to those are all going to be larger than two to three megabytes in download size but that's still a significant download and that means that until the site is downloaded you don't render the page effectively now there's some things you can do to say hey I'm loading but with the render mode being able to be changed at runtime they're saying Hey what if you started as a Blazer server application where it's very fast to render that first page and then in the background you download the rest of the source code and it became a Blazer web assembly application which means now it can work offline now it can all the rendering happens at the client now you don't have to keep that connection open to the server anymore in order for the page to be properly rendered this is a really big deal and a really nice addition so there's a lot of new ideas coming to blazerin.net 8 that really push the platform forward and again take it from being one of two options well one of three now uh server webassembly these are for the web or hybrid for mobile and desktop but now we have for the web server web assembly server side rendering component rendering and also that change at runtime which version you choose so Microsoft is heavily invested in improving Blazer and making Blazer an even better product now the other thing I want to point out before we go on is the fact that what Microsoft has done with all of the asp.net core web application types including Blazer is its open source you can actually go to the repository and watch what they're doing in real time you can see how they're working what changes they're making what issues they're working on and so on you can also see what choices they're making and they're also trying to build their their code off of web standard things like webassembly webassembly is not a Microsoft thing it's a web standard so try to make sure that they they build on top of web standards signalr is just on top of things like web sockets so it's just a wrapper around that because they're trying to make sure that they're not just saying hey you have to use this Microsoft specific stuff they're saying no we're going to use web standards that way it's broadly compatible that way it's not going to be shut down kind of like uh Silverlight was because you know Silverlight required a browser plug-in that a lot of browsers said nope we're not going to do that anymore and so Microsoft's kind of a bind now they're saying this is all web standard stuff so you really can't shut it down because this is what the web is doing this is where there's a whole not just Microsoft so they really invested in making wise long-term choices with Blazer and I think Blazer is going to become that complete ecosystem of tools for web development that allow you to not just say this one tool Blazer instead it's here my toolbox called blazer because now inside there I have server and webassembly and server-side rendering and hybrid and you know whatever tool you need a lot of it is in there already not all of them but a lot of them are already in there so I think the key thing here is that actions speak louder than words Microsoft can say all day we're committed to X we're we're definitely behind this we're definitely behind that but at the end of the day there are large company that's looking to make a profit their their job isn't to make sure that they always follow through in every promise may it break too many promises you start having problems with the community with trust but and they're starting to build back from some of those those broken promises but I think the key here is actions actions speak louder than words and this is true for anywhere in life you know when you when you hear a person making claims look at what they're actually doing because what they do really shows what they mean or what what they're really meaning when they say something so Microsoft it has made a big commitment to Blazer and they're continuing to put more into it so let's talk why why is Microsoft saying Blazer is the thing well the first one is people are wanting Rich web interactivity the the days of having static rendered sites that get pushed out of the to the client and they're just you know anytime you put post a form it goes back to the server and then brings a new page down and re-renders everything those days are are long behind us at for the standard yes Pages still do it but as far as the norm for web interactivity people want that rich interactivity that they're expecting from websites now and so this is one of those things that provides that this is the the one thing that Microsoft does on the web that is that rich interactivity NBC is completely server side API is just API it's not even for necessarily user interaction and then uh razor Pages still server side rendering that's all it is so what else is there for that rich interactivity well that's the Blazer Suite okay so people want that and Microsoft has that and so what people want is what Microsoft is giving them the other thing is people are already using C sharp this is a key point and something that people often miss they say well you know I have no knowledge of anything uh why should I choose you know this over that well you have to have a broader picture first because if you just try and say well you know forget everything else which one's best that it depends you know you've heard me say that a thousand times or more because it does depend on more than just the technology there's lots of Technologies out there to render a rich web interactivity on the web you can do that with jQuery should you probably not not in today's internet but you can so which one is right well it depends on your scenario if you are a a JavaScript shop you're you're building a node and you're writing JavaScript all the time or typescript I don't think there's a reason why you would use Blazer I don't think that Blazer is the right choice probably for you but on the other hand if you are a complete c-sharp shop and you're writing C sharp for your data access you're writing C sharp for your business logic I'm not sure why you would then say let's now add npm and you know angular or reactor View and you know all this JavaScript UI it might not make sense because now you have to bring a whole new ecosystem in a whole new set of tools and a whole new set of everything in order to have just your UI when you could use the same c-sharp code and have a much easier to build UI now there's still reasons I am not saying if you're a C sharp shop you should not use annual reactor view you definitely can there's definitely purposes for it but I'm saying if you are making a choice today and you're just a c-sharp shop I think that Blazer is the right choice in a lot of cases because it's an easier transition into that rich client interactivity that rich web interactivity so and then the third reason why you know why we're doing this why Microsoft's doing this not me personally but why is Microsoft doing this because options are good and that's again something that people often tend to Discount they often say what's the best that's the only thing that should exist well guess what that best even those change from month to month or year to year so should we throw things out over and over and over again no of course not and what is best for you is not best for me was best for one situation is not best for another so having the options are really good because otherwise I might feel forced into a corner and make bad choices and have a bad experience because I actually had an option to go somewhere else so yes Microsoft is invested in Blazer I think that's the clear answer here and the question is should you be invested in Blazer and I think I've kind of answered that already I think that yes if you're a c-sharp developer you should be invested in Blazer you should know about Blazers you should know how to work with it know how to build it and know what it's doing because I think it offers a very clear value add to you as a developer to no Blazer and to use it I have found that I can get a project up and running complete much much faster with blazer than I can with a JavaScript framework or another system like that so if you're already in the groove of C sharp just adding that front end of c-sharp I think is a good option for a lot of people so that's my answer to the question I hope that that answer your questions if you have more questions don't forget to go to the suggestion site otherwise thanks for listening and as always I am Tim Corey [Music]
Info
Channel: IAmTimCorey
Views: 11,571
Rating: undefined out of 5
Keywords: tim corey, iamtimcorey, blazor, .net, .net 8, blazor ssr, silverlight, visual studio, .net 7, blazor united, c#
Id: OUUlO8fQOfE
Channel Id: undefined
Length: 22min 31sec (1351 seconds)
Published: Thu Jul 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.