ASP.NET MVC and HTML5 Web Workers

Although the technology has been around for a while now, HTML5 Web Workers didn’t draw my attention until a few days ago. As I’m building a client facing SaaS application for my client, performance is crucial. Having worked with asynchronous methods in C# for years, I thought of using this concept in JavaScript. As it turns out, multithreading in Javascript isn’t really part of the package. You had to work with timeouts and callbacks to implement some kind of asynchronous architecture, but splitting some heavy work into multiple threads (and even background work for that matter) wasn’t really supported out of the box – until HTML5 Web Workers were introduced. In this article, I’ll explore the capabilities in two different ways in the context of a ASP.NET MVC 5 application. What I’m not going to cover is the theoretical aspects of web workers.

Best of Stack Overflow

Just as in my other post about topics I have to “re-Google” often, this post serves as a catalog of interesting Stack Overflow articles. Because the concept of browser favorites doesn’t work quite well in my world, this blog post does the job of keeping a simple and convenient list very well. To keep things as simple as possible, I have divided the post in categories, comparable to the tags in Stack Overflow.

ExtJS grid page size – letting the user decide

In addition to this article, I have embedded this feature into a new PagingToolbar child class. Basically it adds a combo box to the toolbar’s items and then adds extra behavior so the store reloads with the specified page size.

 

It can be made even more generic and probably cleaner but this is an acceptable solution to the problem. Comments or suggestions are always welcome!