Is Blazor Better than React?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi and welcome everyone I'm Gavin law we're comparing Blazer to react in this video this is a subject very close to my heart but I have to admit I'm a bit conflicted about it you're teing me aart I'm very familiar with both Blazer and react and I really love both of these Technologies so is Blazer better than react let's find out let's first look at a brief overview of these Technologies let's start with react because it is the older of the two technologies react was released in 2013 and was developed by Facebook react facilitates the breaking up of the UI user interface into smaller reusable components after its release react soon became renowned for its efficient rendering and performance capabilities react is an open-source JavaScript library and its core feature is the virtual Dom the virtual Dom is lightweight and memory and allows for minimal updates being made to the actual Dom as a result of user interactions with the relevant react created web pages the virtual Dom is a core reason why react is so efficient Blazer is relatively new and was released in 2018 it was developed by Microsoft the component based approach to breaking up the UI like with react is fundamental to the architecture of Blazer applications instead of writing these components using JavaScript like with react with blazer the developer can use C and net Blazer is known for having two main hosting models that can be leveraged in order for lightning fast rendering of components to occur as a result of users interacting with relevant Blazer created web pages namely Blazer web assembly and Blazer server note that with the release of net 8 as well as being able to leverage service side rendering and streaming rendering you'll also be able to leverage Blazer web assembly and Blazer server components within one project Blazer web assembly is built on the web assembly technology a low-level virtual machine that enables Blazer web assembly code to run at near native speeds in the browser so with blazer web assembly C and.net runs on top of web assembly within the browser with blazer server the C sharp and net code runs on the server a signal R connection is maintained between client and server so when the user interacts with the relevant web pages which are made up of Blazer server components the change is created as a result of relevant user interactions with the relevant web pages are calculated on the server and then pushed to the client via the signal R connection the relevant changes are then rendered to the user's browser browser both these Technologies Blazer and react can be used for the creation of highquality user experiences on the web and are excellent for the creation of modern scalable web applications let's look at the similarities between Blazer and react the obvious similarity is that these two technologies are both primarily used for the creation of spa or single page applications as discussed Blazer and react both use a component based approach to creating reusable interactive UI elements they can both be leveraged for creating highly scalable uis that quickly and efficiently update a web page with only the changes made through users interaction with that web page so with these Technologies the entire web page does not need to be refreshed as a result of the user changing the state of a particular web page through interacting with it only the relevant parts of the web page that need to be changed are updated so this results in an excellent and smooth ux user experience both Technologies can leverage third-party State Management libraries with blazer you can leverage fluxor or Blazer state for this purpose to learn more about fluxa please navigate to this URL to learn more about Blazer State please navigate to this URL with react you can leverage Redux to handle state manag M from a single source to learn more about Redux please navigate to this URL let's look at the main differences between Blazer and react react is Javascript based and Blazer is net and C based with the Blazer web assembly technology C and.net run within the browser on the web assembly technology react components are written using a unique JavaScript extension known as jsx jsx stands for JavaScript XML so through jsx code you can MH HTML like syntax represented in the XML with JavaScript behavioral functionality in order to create react components with blazer the UI components are created using special C classes known as razor components these razor components are implemented using C code for Behavioral functionality in HTML is used for the web Page's markup with react the jsx code is transpiled into JavaScript code before code is run within the user's browser jsx code cannot be understood directly from the browser and therefore needs to be transpiled into JavaScript with blazer web assembly component C and.net runs on top of the web assembly technology which is a low-level virtual machine that enables code to to be run at near native speeds within the browser react leverages a virtual Dom which means that fewer updates need to be made to the actual Dom which results in fast efficient re-rendering of react components in the user's browser react applications generally have faster initial load times than Blazer web assembly applications because with blazer web assembly the net runtime and libraries need to be downloaded to the browser however mixed mode rendering esally auto mode offered with the release of net 8 could provide much faster initial load times for Blazer applications Blazer server applications already offer much faster load times than Blazer web assembly applications but latency can be an issue due to a signal R connection needing to be maintained between client and server at present react has broader browser compatibility including support for older browsers Blazer web assmbly has limited support for older browsers due to its Reliance on web assembly web assembly can enable better performance for applications where computationally intensive tasks need to be executed so in this case Blazer web assembly components May perform better than react components the Blazer Community is smaller than react community in part because it is a far newer technology but it is steadily growing in size and Blazer has the advantage of Microsoft investing heavily in Blazer so Blazer benefits from the support of a steadily growing community and the support of Microsoft react has a mature and vast ecosystem this ecosystem provides numerous tools libraries and resources for developers to utilize in their projects Blazer has a steadily growing ecos system the number of tools libraries and resources are increasing for developers to leverage in the creation of their Blazer applications so which of these Technologies should we choose as is mostly the case When comparing two great Technologies the answer invariably is not straightforward when to use Blazer a strong case for using Blazer is pretty obvious if you are for example working on a project with a team of developers that mostly have net and C skills I would definitely advise you to use Blazer you'll avoid the need to learn JavaScript and the unique Concepts like jsx and the various hooks inherent in react applications if your application requires computational intensive tasks to run Blazer web assembly may be the technology for you because Blazer web assembly runs on the web assembly technology that can run code at near n speeds if you are developing a web application that requires a lot of realtime updates to the UI from the server Blazer server would be a great choice examples of realtime functionality are dashboard uis and chat functionality bear in mind that a possible disadvantage of Blazer server is latency caused through maintaining a persistent signal R connection between client and server for applications that require a full stack solution Blazer is a great choice where you can leverage C and net for all aspects of the project so for example front end and backend functionality your uis can be developed using net and C for building razor components your serers side code for example database interaction code running on the server can also be written using C and.net so let's look at use cases for react for large scale front-end applications react's vast ecosystem and component-based architecture make it a great technology for building large scale applications where efficient rendering can be leveraged this component based architecture also helps with code maintainability so react is great for building applications that require complex UI designs react can provide faster initial load times due to generally smaller bundle sizes needing to be downloaded to the browser this is critical for providing a great user experience and better SEO if your team of developers mainly have JavaScript skills it is going to give you a development time advantage and be more coste effective to use react for the development of a project that requires this type of Technology react at present has broader browser support so if your application requires a broad range of browser support react may be a great choice web assembly for example is not compatible with a lot of older browsers so you can see that each of these technologies have their pros and cons it often depends on your particular context as to which of these great Technologies you choose to develop particular applications your choice of which of these Technologies to learn may come down to for example career aspirations if at the moment salary is your primary concern you might start by researching salaries paid to react and Blazer developers by companies in and around the area in which you live if if you are already skilled as a net developer learning Blazer is obviously going to be far easier to learn react has unique Concepts that may involve a steeper learning curve for example jsx Java XML which is a syntax extension to JavaScript and is used for implementing components in react you may simply have a personal preference for react or Blazer based on the way the code looks either way these are both amazing Technologies and based on on criteria like performance community support and future capabilities I think choosing between these Technologies is rather difficult so is one technology better than the other in this case this question is not straightforward to answer please let me know in the comments section which of these Technologies you prefer and why please check out some of the video links I've included in the description of this video where I explore the new features and enhancements for Blazer that will be included with the official release of net 8 which is due to be released next month November 2023 these features include allowing mixed mode for rendering components I.E Blazer web assembly components and Blazer server components from within one project you'll also be able to leverage server side rendering and streaming rendering along with blazer web assembly and Blazer server components from within one project the inclusion of service side rendering and streaming rendering can provide many advantages like faster initial load times enhanced form handling as well as better SEO while still maintaining the responsiveness effect expected in Spar Technologies so with growing support from the community and Microsoft Blazer no doubt has a bright future react has a wellestablished mature robust and vast ecosystem it also has massive community support and an excellent track record both Blazer and react are awesome please let me know your thoughts on these great Technologies in the comments section if you like this video please hit the like button and please consider subscribing please also ring the bell so that you'll be notified of future content please feel free to share this video with anyone you feel May benefit from its content if you'd like to thank me by buying me a coffee you can do this through my buy me a coffee web page at this URL it will of course be greatly appreciated I love reading your comments so please feel free to engage with me in the comments section I've recently joined X former Twitter so it would be great if you followed me on X my username is @gavin lond digital I hope to see you soon thank you and take [Music] care
Info
Channel: Gavin Lon
Views: 32,757
Rating: undefined out of 5
Keywords:
Id: FbBdJc5cFP4
Channel Id: undefined
Length: 14min 25sec (865 seconds)
Published: Wed Nov 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.