Why Blazor Has Me Excited

Blazor has me excited

A Trip Down Memory Lane

Back in the 90s (it wasn’t that long ago, was it?), our development teams that built internal business applications were pretty simple. As we were building mostly desktop applications, we either had a team of Java Swing developers or a team of Microsoft WinForms developers. While we sometimes brought in user interface experts to help us with flow or imagery, everyone could do everything when it came to actual development. Life was much simpler regarding building out and maintaining our development team.

As the web took over for all the right reasons, we enterprise developers had to adapt. We had to learn a separate technology stack of HTML and JavaScript to build our user interfaces while simultaneously keeping our Java and C++ or C# stack for the backend. Java Servlets, Java Server Pages, and Microsoft ASP/ASP.NET initially bridged the gap for us, allowing enterprise developers to use their primary language skillsets still.

However, as more and more JavaScript frameworks arose, AJAX became a thing, and SPAs eventually took over, and many of us adopted. We learned one set of languages for our frontend work and another for our backend work. Those that couldn’t (or didn’t want to) became backend developers. In fact, it was around this time that developers began to specialize into frontend and backend roles. It’s a concept that seems common now but wasn’t always. Hiring got more complicated.

As technologies like Adobe Flex, Microsoft Silverlight, Java FX, and others arrived, enterprise application developers got excited. Could we really have nice-looking web user interfaces for our enterprise applications that were written by our (now) server developers? Could it be done using one language again for the user interface and backend? If you’re a Microsoft developer, you know full well of the sadness of Silverlight. A lot of promise that fizzled when the browser plug-in model died. The dream was dead again, and frontend stacks like Angular took over. 

Enter Blazor

I’ve been hearing bits and pieces about Blazor for several months, whether from podcasts or articles. It has kept my attention because it promises to fill that space again, letting one developer skilled in C# build both the front end and backend of an enterprise application.

To date, I had not really taken a deep-dive look at Blazor. That changed last night when I saw Carl Franklin’s Blazor Road Show here in Atlanta. Carl is well-known in the Microsoft community as he co-hosts one of my go-to podcasts, .NET Rocks. His stamp on Blazor drew me in instantly.

What I Learned And Why Blazor Has Me Excited

Carl spent three hours with us explaining the theory behind Blazor, its internal workings, its concepts, and building out demo applications. I left feeling like I could spin up a Blazor application in minutes and wouldn’t be working with a product that will be abandoned by Microsoft. Further, I could see a path to simpler IT development teams for the right shops for the first time in a long time. 

Now, don’t get me wrong. I have seen the benefit of working with some seasoned frontend developers in making an awesome user interface. We have a couple on staff at Ronin that consistently create beautiful user interfaces. However, if I’m a shop building and supporting internal enterprise web applications or creating and maintaining a suite of line-of-business applications, Blazor could be the future. How?

With Blazor, all development is with C# and Razor pages (think of a much cleaner and simpler version of ASP.NET Web Forms markup), so I only need C# developers to build web applications that function like any other SPA.

@page "/counter"

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
    private int currentCount = 0;

    [Parameter]
    public int IncrementAmount { get; set; } = 1;

    private void IncrementCount()
    {
        currentCount += IncrementAmount;
    }
}
@page "/"

<h1>Hello, world!</h1>

Welcome to your new app.

<Counter IncrementAmount="10" />

The out-of-the-box Blazor UI components are probably good enough for many internal enterprise applications, minimizing or eleminating the need for specialized frontend user interface developers. That said, you can certainly customize the styling with CSS if desired. Additionally, companies such as Telerik and DevExpress have already created several themes and components that can be used, eliminating the need for any CSS development to achieve even better looking applications than Blazor produces out of-the-box.

Blazor Table

There are other benefits, too. For example, depending on what Blazor mode you choose, performance may even be better. Blazor server-side mode, for instance, utilizes binary data over web sockets for it’s communication, eliminating the need for HTTP web sockets to be opened on each request and thereby performing faster than today’s web applications.

Microsoft already has Blazor support in their current development tools, and according to Carl, they are releasing further updates in May. 

About Rōnin Consulting – Rōnin Consulting provides software engineering and systems integration services for healthcare, financial services, distribution, technology, and other business lines. Services include custom software development and architecture, cloud and hybrid implementations, business analysis, data analysis, and project management for a range of clients from the Fortune 500 to rapidly evolving startups. For more information, please contact us today.

Author:
Ryan Kettrey has been building custom software solutions for the Enterprise for well over 20 years. He has started three software companies, including Ronin Consulting that he currently co-owns with Byron McClain and Chuck Harris.