On the HTML5 Indexed DB API - Part 3 of n

In the previous post we covered some more background on working with the Indexed DB API and briefly reviewed the mechanics of creating a new database. In this post we take a look at some important Indexed DB constructs that one must be familiar with while working with the core…

Read this article

On the HTML5 Indexed DB API - Part 2 of n

In the previous post in this series we covered the fundamentals of the Indexed DB specification. We continue the journey in this post and take a look at the API itself. Building an offline note taking app For the rest of this series of posts, we'll try and build the…

Read this article

On the HTML5 Indexed DB API - Part 1 of n

Over the years the web has increasingly transformed from being just a repository of content to a marketplace of full-fledged functional applications. The suite of technologies that are bandied about these days under the "HTML5" banner have as a fundamental goal, the enablement of the building of this new breed…

Read this article

On JavaScript code blocks, variable scope and variable hoisting

I am currently reading the book JavaScript Patterns, by Stoyan Stefanov and I came across this interesting tidbit of information regarding variable scopes in JavaScript. Consider the following C++ code: #include <iostream> int main() { if(true) { int foo = 10; } std::cout<<foo; return 0; } Compiling this…

Read this article

JavaScript strict mode restrictions

In the previous post we took a look at what strict mode was all about. Today we review some of the key restrictions that become applicable when strict mode is active. Identifiers must be declared before they can be assigned to This aspect in my opinion makes strict mode worthwhile…

Read this article

On JavaScript strict mode

ECMAScript version 5 is the latest revision of the ECMAScript programming language ratified for widespread adoption by Ecma International - the standards body responsible for figuring out what goes into the language. If you're wondering what exactly ECMAScript is and why you should be interested, it turns out that ECMAScript…

Read this article

Web Cast on Web Workers

I did a web cast today on developing web apps with web workers. Hope you folks found it useful. The recording should hopefully be available online soon. In the meantime you can download the deck and the demos from here: https://skydrive.live.com/?cid=2C5064CB54B16F50&id=2C5064CB54B16F50%21314…

Read this article

Using closures as backing fields for ECMAScript5 properties

One of the things that ECMAScript version 5 brings to the JavaScript world is the ability to define "getter" and "setter" properties, i.e., the ability to define object members that look like regular fields to clients but are really member methods. The best way to understand this is with…

Read this article

Calling the "base" with prototypal inheritance in JavaScript

I wrote a little bit about how inheritance was designed to work in JavaScript sometime back. Briefly, inheritance in JavaScript is "prototypal" in nature and instead of types inheriting from other types, we have object instances inheriting from other object instances. Being a weakly typed language, the traditional interpretation of…

Read this article

Animating CSS3 2D Transforms

There was a little "poke fun at the boss" mail trail at work recently (yep, we do that sometimes and everybody just takes it in stride; it just so happened that boss was the target this time but it might just as well have been yours truly or anybody else…

Read this article

Windows Live Writer + ATOM Publishing = Awesome!

Ever since I embarked on this blogging expedition I have used a Windows Forms based homebrewed blog client to create my posts. I would hand code the HTML in Visual Studio or notepad++ and then copy/paste the markup into this tool which would call a web service hosted on…

Read this article

Web Camps / Zeollar - Demos and decks

If you attended any of the one day Web Camps events that Microsoft has been conducting across various cities in India then you probably saw me talk about one or both of the following: Sizzlers on the Web - WebSockets & IndexedDB Programming with HTML5 & Related Technologies And you…

Read this article

Inheritance in JavaScript

JavaScript adopts a radically different take on inheritance from what one is perhaps used to coming from an object oriented, statically typed language world such as C++, C# or Java. In the typical OO static language, inheritance is applied to "classes" which are essentially templates for how an object instance…

Read this article

"JavaScript Techniques" session at Mahindra Satyam

Thanks to all of you who attended the web cast today (2-May-2011) on interesting JavaScript programming techniques at Mahindra Satyam. Hope it was useful for everybody. I am trying to work out a follow up session. You will hopefully hear about it soon! For folks who wanted access to the…

Read this article

preventExtensions, seal and freeze

ECMAScript version 5 is the latest, official, approved standard version of the ECMAScript programming language. If you've never heard of ECMAScript, well, don't feel too bad as it is better known, used, loved (and hated) by its other name - JavaScript. As far as names go JavaScript is probably not…

Read this article

JavaScript eval console

One of the things I frequently find myself needing to do as I explore the JavaScript language is to quickly code up little snippets of JavaScript code and run them. Once I'd tired myself of spinning up little HTML files scattered all over the place, I figured I'd write an…

Read this article

JavaScript function throttling and debouncing

Ben Alman has written up a useful little jQuery plugin for addressing situations where a JavaScript function in your web page is getting called a tad too frequently and you want to reduce the frequency to more manageable levels. He talks about the plugin over here. I figured it'd be…

Read this article

Writing a sensor driver for the Wiimote on Windows 7

Ever since I saw Johnny Chung Lee's demos of the innovative ways in which the Nintendo Wiimote can be used as an input device for the PC, I've been hooked! The Wiimote is a surprisingly self-contained piece of hardware that is able to operate independently apart from the Wii console…

Read this article

Enabling JSONP calls on ASP.NET MVC

JSONP is the technique of making cross-domain HTTP requests via JavaScript circumventing browser security restictions on requests that return data in the JSON format. By cross-domain, we refer to the practice of making HTTP requests on URLs that refer to resources residing on a domain other than the one from…

Read this article

The Conman

The conman was seated at his usual vantage point, a place that afforded a clear view of the populace exiting the railway station. As he stubbed out his morning cigarette, he was sure he'd spotted his first quarry. "Aren't you from Sivan Master's household?" the conman accosted him as he…

Read this article