WebAssembly, another ActiveX?

WebAssembly, another ActiveX?

About 2 years ago, I started following an interesting initiative - WebAssembly - a way to run natively compiled code inside browser with complete JavaScript interop. I am intimately acquainted with the challenges of building large, state-full, cross-platform browser based applications so I get the appeal of such a technology. However, this felt like a weird step back in time, to the days of ActiveX controls; gave me shivers and intrigued me at the same time. The entire web app community seems to be betting on pure JavaScript on browser - TypeScript, a language behind Angular, is just a temporary solution until EcmaScript2015 is available everywhere and simply compiles to pure JavaScript. And here we have an alternative in form of WebAssembly. For .net developers, Blazor, a technology from from Microsoft, opens WebAssembly for C# developers. It is hailed a 'replacement for JavaScript' ...

No alt text provided for this image

To be honest, I did not expect much from WebAssembly. I did not give it much thought but it sounded too much like ActiveX, so that was enough info for me!

Well, WebAssembly and Blazor are here to stay. WebAssembly has been standardized and shipped with major browsers. Microsoft is pushing Blazor pretty aggressively.

While many of the WebAssembly's use cases are rather esoteric, and I have not had a chance to test the JavaScript interop, there is one use case that deserves serious consideration - using WebAssembly as a UI shell / main frame. That is worth pondering a minute! Bundle UI agnostic libraries and release with a shell, and you may have something worth researching.

Main frame in WebAssembly, but the UI is in JavaScript / HTML.

While some observers called WebAssembly "the death of JavaScript, HTLM, CSS" - a premature position in my opinion - it remains to be seen if WebAssembly will pass from the memory like the NeXT computer system, or will power the web of 21st century. Without mobile support - which would take years, especially on Android - it is not yet a tool for cross-platform solution. What do you think? Would really like comments from anyone who has practical experience with WebAssembly, on serious, non-game related projects.

September 2019 Update - MS has shipped Blazor for production use. Unfortunately, this is 'server side blazor' meaning that all code runs on the server side and interactions from client are sent vie websockets, so the the look and feel will never achieve the levels of a true JavaScript SPA. Blazor 'client side', aka, via Web Assembly, is set to arrive May 2020. I think we have to wait for that before getting excited about Blazor, which does have a potential to be contender in the SPA world. Looking forward to that, because, as I have said, SPA is hard, really hard and a liability to any organization adopting it. Worse, the often young SPA enthusiasts often do not have the experience to see this.

要查看或添加评论,请登录

Greg Bala的更多文章

社区洞察

其他会员也浏览了