The latest episode of Emergent Podcast features Aaron Varga, Senior Software Architect at Emergent Software, discussing the differences between Blazor and JavaScript. In the podcast, Aaron talks about the pros and cons of JavaScript and Blazor, the use cases for each, and whether Blazor is a worthwhile focus for new developers.
What are JavaScript and Blazor?
JavaScript has been around since the 90s and is the standard scripting language for web browsers. It enables dynamic content and interactivity on websites. There are a number of popular JavaScript frameworks, including React and Angular.
Blazor is a Microsoft framework initially released in 2018 which allows developers to build interactive JS applications using .NET. It has two models, Blazor WebAssembly (WASM) and Blazor Server. With Blazor Server, components are executed on the server from within an ASP.NET Core app. Blazor WASM runs components client-side in the browser on a WebAssembly-based .NET runtime.
A major advantage of Blazor is that Blazor apps can run on both the client and the server, meaning developers can write code for both and share between the two—something not possible with traditional JavaScript applications.
The downside of Blazor is just that it’s much newer than JavaScript. It has libraries and community support, but not to the same extent as JavaScript.
Should you use Blazor or JavaScript?
Aaron emphasizes that both Blazor and JavaScript have their place in software development. One consideration is simply the developer’s skillset. For a Microsoft developer like Aaron and the rest of the team at Emergent Software, Blazor is easy to learn and use. For someone more familiar with React and Angular, JavaScript may be the more obvious choice.
It also depends on the type of app. For example, since Blazor WASM doesn’t render content on the server, it’s not very SEO-friendly. So a public facing website that has complex animations and needs to be optimized for search would be a likely JavaScript candidate. But a data entry application that isn’t exposed to the internet would work well with Blazor.
In most cases, either tool can work. The execution is different but the result is the same.
The future of Blazor in software development
Some developers will remember Silverlight, a former Microsoft application framework meant to work like Flash. Silverlight was eventually discontinued, but Aaron doesn’t think that Blazor will meet the same fate. Microsoft has continued to improve upon Blazor with each new iteration of .NET and will probably continue to do so, making it a worthwhile framework to learn.
Aaron’s advice to new developers is to not get hung up on a particular language or framework. The important thing is to stay current. Learn one tool, and once you’ve learned it, learn something new.
To enable comments sign up for a Disqus account and enter your Disqus shortname in the Articulate node settings.