ASP.NET MVC, Javascript

ASP.NET MVC and HTML5 Web Workers

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

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.

Continue reading

Geen categorie

Best of Stack Overflow

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

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.

Continue reading

Geen categorie

ExtJS grid page size – letting the user decide

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

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

Ext.define('Ext.toolbar.PagingComboToolbar', {
extend: 'Ext.PagingToolbar',
displayInfo: false,
pageSize: 50,
initComponent: function () {
var me = this; = this.pageSize;
var combo = new Ext.form.ComboBox({
name: 'perpage',
width: 75,
store: new{
fields: ['id'],
data: [
value: this.pageSize,
listWidth: 70,
triggerAction: 'all',
displayField: 'id',
valueField: 'id',
editable: false,
forceSelection: true,
listeners: {
select: {
fn: function (combo, record) {
var newPagesize = parseInt(record.get('id'), 10);
this.pageSize = newPagesize; = newPagesize;;
scope: this

Ext.apply(this, {
items: [
'Per page: ',


Ed Spencer

Sometimes you’ll be using a Paging Toolbar on a grid and need to give the user the ability to change the number of records per page. One way of doing this is by adding a combobox to the toolbar:

We’ve set up a simple combo box which allows the user to choose between 15, 25 and 50 records per page. Now let’s set up a Paging Toolbar, and a listener to take action when the user changes the selection in the combo box:

Finally we’ll roll it all together into a Grid:

If the user needs to be able to enter her own page size, replace the ComboBox with an Ext.form.NumberField, and attach the event listener to the field’s ‘keypress’ event.

View original post