Microsoft Blazor – End of JS Era or new “Silverlight” deception? Part 15 min read

Today, for the first time, but not the last, I will be hosting blog guest writer.

His name is Vladimir Vrankulj. He recently held a great presentation, regarding BLAZOR, at DUMP DAYS conference.

Personally, I am very interested in this technology.

So I approached him, with intention that he, sums up his presentation and makes a few extra text lines for my blog site.

Hopefully, you will enjoy this blog post and get some value of it. Enjoy!

Part 1 of 2.

Introduction

Since the beginning of modern web, JavaScript was simply infallible component that ensures interactivity and programmability.
At first it made web sites “live”, enriching content with dynamic data, shortly after we came up with web applications that are developed even today. For almost 25 years we have the same JavaScript powering up the web as we know today. It has changed shape, from basic shape, today known as VanillaJS, to modern frameworks such as Angular or Vue, but at the end of a day it ends up on same shape it started with – Vanilla.

Today we witness the almost everyday release of some new rabid JS Framework, which leads to confusion and total diversity between the web developers. In group of 100 web developers I bet we would find at least 10 JS frameworks people currently using. Which is just fine, because it is giving people a choice, or is it?

As I said, we are talking about JS and JS only. So, the choice is simple, are you going to use JavaScript or JavaScript for your new shiny single page app? You can spice it up with TypeScript which is giving you illusion you are using strongly typed language, or you can set up some lint library to force you using strongly typed declarations, but it is all illusions. When it compiles down, you will still have 25 year old JavaScript running your app.

Do we want this or we want something else?

Web Assembly story

Some time ago I heard some talks about WA, but I was pretty occupied with my new VueJS application. I was totally drugged with a flexibility and simplicity it provides that I overheard what those two guys was talking about. I felt safe in my private universe created with Vue, until I bumped on this subject again. Still I was sceptic, even when I read it is 6-20 times faster than JS. I thought “Yeah, cool. Nice experiment”. I thought of it as some technology presented in CERN, type of technology that will be uses in some 50 years, ofc when Army dumps it to puny civilians (we all know that the Army is the first one to have benefit of new technologies, right?). And what about cross-platform or cross-browser? Who can unite giants like Google, Apple and Mozilla to reach common agreement about anything (If we bring their relationship into real a world, we would witness such massacre that would make all wars left in shadows … forever)? So many questions, so less answers, I thought. I better get back to my JS class ? … But somehow, I got back and read the article to the end. It said “All major browsers implemented WA in September, 2017 ….”.

“Wait, what????” – I checked date in system tray, and saw 2019 (It happens from time to time I forget what is the day, but year … Well, there is always first time, right?)

Those guys already implemented WA in all browsers, and it is running in this moment, while I’m reading this article. I must mention, Apple was the last, as usual … You know the story about Flash? (Next time … maybe … it still hurts … Uhh)

So what the heck is WA?

Simple, it is code type. They said it that way. I’d like to supplement their assertion with “set of standards and programming language”. OK, now when we have standing ground, we can move on.

What it does and how?

The base principle of WA is to compile code into something we know as wasm file, and that is nothing else than binary code. You probably know that C applications run way faster than C# or Java applications, and why is that? Because these applications written in C which is low-level language and they are closer to machine code than some high-level language e.g. Java or C#.

Same thing happens here. JavaScript is plain text file, and it is necessary to execute numerous computations to interpret commands written in that document, and  wasm file is binary file. It is running in a similar sandbox as JavaScript called WebAssemblyRuntime.

And the last thing to mention is why all this. The beauty of WA is that it is opening web programming to everybody … C, C++, Java, C# programmers, they all are invited to do web programming with web assembly. Only thing you need is your WA compiler that will precompile dll or .c file into .wasm file. Some JS glue code and you have your old application (minesweeper) running in the browser.

OK, so with this news in our pocket, we can healthy conclude this story by sending JS under the ground? Well no! And this is why not…

  • Firstly, WA is created to work together with JS, to complete and interact with JS
  • Secondly, WA cannot be jump-started without JS glue code.

And we started with Blazor …

So, where Blazor fits in? Simple, it is using WA as core engine to run dll’s written in C# directly on the browser. But first, what is Blazor?

End of Part 1.

To be continued

(Visited 47 times, 1 visits today)

11 Comments

  1. site 17 December 2019 at 05:57

    great points altogether, you just gained a new reader.
    What may you recommend about your put up that you made
    a few days in the past? Any positive?

    1. Denis Jakus 19 December 2019 at 11:35

      I would point out, that in my opinion, it’s still not production ready. But definitely worth playing around.

  2. cbd oil 15 March 2020 at 23:48

    You ought to be a part of a contest for one of the finest blogs on the web.
    I will recommend this blog!

  3. cbd 16 March 2020 at 02:54

    wonderful points altogether, you simply gained a new
    reader. What would you suggest about your publish that you made some days in the past?
    Any certain?

  4. cbd oil 16 March 2020 at 03:26

    With havin so much content do you ever run into any issues of plagorism or copyright violation? My website has a lot of exclusive content I’ve either authored myself or outsourced but
    it seems a lot of it is popping it up all over the internet without my authorization. Do you know any methods
    to help protect against content from being ripped off?

    I’d certainly appreciate it.

    1. Denis Jakus 04 April 2020 at 17:34

      I don’t really take any kind of protection regarding my content. Maybe I should take some strategy regarding this issue!?

  5. buy cbd oil 16 March 2020 at 03:47

    I am actually grateful to the holder of this web site who has shared this impressive article at at this time.

  6. Justin Hamilton 17 March 2020 at 15:39

    Long time reader, first time commenter — so, thought I’d drop a comment..

    — and at the same time ask for a favor.

    Your wordpress site is very simplistic – hope you don’t mind me asking what theme you’re using?

    (and don’t mind if I steal it? :P)

    I just launched my small businesses site –also built in wordpress like yours–
    but the theme slows (!) the site down quite a bit.

    In case you have a minute, you can find it by searching for “royal cbd” on Google (would appreciate any feedback)

    Keep up the good work– and take care of yourself during the
    coronavirus scare!

    ~Justin

  7. 007카지노 18 October 2020 at 15:05

    I believe this is one of the such a lot important info for
    me. And i’m satisfied reading your article.

    But want to commentary on few general things, The web site style is perfect, the articles is
    truly great : D. Good job, cheers

Leave a comment

Your email address will not be published.