on
Blazor Homepage
Client side Blazor is not targeted for release until early next year. But my instinct about this technology encouraged me to used it for Celin’s homepage upgrade.
One of my colleague’s comment was “is this like a pure programmers home page”. I hadn’t thought about it that way, but I can’t argue – except for the pure adjective. I’ve never considered myself a pure anything.
But working on this triggered some flashbacks on the journey I’ve been on for the last three and a bit years.
As a diligent professional I started with Oracle’s MAF but soon drifted to Angular and Ionic. I dabbled a bit with Xamarin and I recall my feeling of dread on the thought of reverting to some xamel like stuff with accompanying convoluted data binding. Not quite as horrible as the nightmarish Java binding on offer by MAF, but non the less disturbing.
I was determined in my journey that whatever else, I was not going to spend my time on some head-spinning concepts – unless at least there was some light at the end of the tunnel.
I settled on Angular for couple of years but in hindsight there was a niggling feeling about it. Building an app was a bit like constructing a dwelling with components from the local craft market using a blueprint from a Government Council.
Trawling the market is a great fun. It has every thinkable gizmo, as well as unthinkable ones. It’s free and offers installation instructions as well. With a bit of patience and creativity, you can build something very impressive and unique – and perhaps livable!
The uniqueness has a downside. Assembling diverse components can be tricky, later resulting in full rebuild rather than subsequent maintenance and extensions. Even though being initially positive about this transient concept, it soon started to feel like being caught in a quick-sand. Unless you kept up to date with the latest blueprints, Angular has two major releases a year for example, the constructs quickly sink into the pit of peculiar legacy.
Early on the journey, a colleague told me about the impending arrival of something called WebAssembly, which he was quite excited about. Being still in a head-spinning state of transient construct and convinced that the craft market was the be-all-end-all, I politely concurred in his excitement but also thought that this is something of a niche technology. Something for pure programmers.
At the start of this year I made some re-directions. Mobile apps were shelved, and with it Angular and Ionic, and I moved my focus to E1 Pages and Net Core.
And then I ran into Blazor and, at the risk of be over-dramatic, it all started to make sense!
As the page’s header indicates, it’s main building blocks are:
Blazor Client
The framework that compiles C#
into wasm
, or binary code to be executed in the browser. When my colleague told me about WebAssembly I naively thought of its use for some complex algorithms build in C/C++
for example. But what the Blazor team has done is to boil Mono CLR down to run in the browser! This is nothing short of a revolution!
Bootstrap
I’m not a fan of Twitter but must recognise its positive contribution. Developers have a notorious reputation for the visual aspect of their creation. It’s probably some left-right brain dysfunction. Good logical thinking seems to come at the cost of appalling aesthetic.
Svelte
The C#
code doesn’t know, or cares about its runtime. So it doesn’t have any implicit ability to interact with the browser. This is where Razor pages and components come to play. But interaction within the browser is still outside its reach, which is where JavaScript
rules. The syntax highlighting is build with Svelte.
Pidgin
Pidgin is a clever parsing library that converts the query entered in the left text box to AIS Data Request on the right.
BlazorState
One lesson from the journey is the practical use of state management architecture.
Finally
My programming language background is Pascal
and later C/C++
and C#
. Structured and typed.
Migrating to JavaScript
took a bit of brain-rewiring, which was helped along with TypeScript
. Eventually I got comfortable but again had that niggling feeling.
Going back to C#
was an interesting experience. I was initially frustrated by its rigidness, often thinking to myself “this is so easy in JavaScript, what’s wrong with those Microsoft guys…”.
Our lazy gene is always on the lookout for the path of least obstruction. Like a stream passing down a mountain or a piss on the sidewalk to the gutter. But the price for an easy path can be a bigger, or even insurmountable obstruction down the track. Something to keep in mind when things look a bit too-easy.
So now I’m onto yet another be-all-end-all platform – at least until something else comes around.