For an update to this post – check out my update – Blazor and WordPress – The Story Continues
As I mentioned in my previous post, I have been tinkering with Blazor, seeing how it will fit into my application development pattern. When I first saw that Blazor web assembly can run on Linux servers, it occured to me that this might be the best tool to be able to build applications that run inside WordPress. So one of the first things I did was to see if I could get that working.
Naturally it wasn’t as straightforward as I was hoping, and I ran into a few pre-release issues with Blazor that slowed me down, but I think I have done enough to see that Blazor will be my tool of choice to build apps inside WordPress.
As you might of figured out, this blog runs on WordPress, and it runs on a Linux host. WordPress is a great tool to through up a reasonably good looking ‘brochure’ website quickly. A Brochure site gives your company or product a Web presence and acts as an online version of a business card. WordPress comes with a simple registration/login system, and a zillion plugins to make site development productive and efficient. I have been using AngularJS inside WordPress to build applications, and that has worked pretty well. But I made the decision to wait on migrating to full Angular until I learned more about Blazor. After using Blazor a bit, I have decided I will not be moving to angular X – and start migrating my angularJS code to Blazor.
So here is my first application written in Blazor for WordPress. the dottet box below is a little app that pulls the most current weather forecast for Seattle from the US Weather Service (this may take a while to load):
Adding this application to WordPress was much simpler that I expected. All had to do was publish the application from Microsoft Visual Studio to a file on my development machine, then FTP the files up to a folder I added in the WordPress root directory. Then I just added the following script to this blog post:

After a few failed attempts (which really helped me understand some concepts of Blazor and Web Assembly), it all came together in my head and magically appeared on the page. I must admit the first time I got this working I felt the same way Dr Frankenstein felt
The Frankenstein analogy is not too far off, piecing together disparate technologies to create a web application platform, is somewhat amazing. My favorite feature of this approach is I wrote the application in the familiar confines of Microsoft Visual Studio, all in C Sharp, and no javascript. It’s a thing of beauty.
If you haven’t had a chance yet to look at Microsoft.net Blazor, check it out here. It is still in pre-release until May of 2020, but its worth experimenting with now. The more I work with it, the better I feel the dark days of javascript front end scripting frameworks and packages and transpiling are behind us. This is such a better model.
One thought on “Blazor and WordPress”