Sunday, July 23, 2006

Enterprise JavaScript Programming

One of the primary tasks of my development team at Microsoft is to develop client-side (web browser) UI frameworks and client-side APIs for Virtual Earth. As a heavy client-centric web application, our product, Windows Live Local, requires a lot of JavaScript based development coupled with server-side development (using popular AJAX and JSON protocols). What I have personally learned over time is that we have to be smart about what functionality we can build on the client-side vs. what functionality we can move to server side; this is a crucial step in the design process since most of the server side development is fairly simple (or straight forward) compared to JavaScript development. You might think I'm crazy when I say this but believe me it's hard to do development in JavaScript - no, I'm not talking about simple client side scripts that you use to make dynamic HTML web sites - but I'm talking about Enterprise JavaScript Programming or simply EJP.

EJP is slightly different from what usually scripting developers do with JavaScript - EJP is different in a way that you need to build stacks of re-usable layers of JavaScript libraries that also allow you to plug in general development blocks such as threading, state-serializers, networking, perf counters, tracers etc - now the only problem is that the language is not mature enough to support these things natively. On contrary any .NET language (or Java) that can be used for server side development support these primitive concepts natively. That is why I say that it is hard to develop in JavaScript.

Now,  I do know that there are some good debuggers out there that can make your life easier when you are working on 100s of thousands of scripting code but it's not clearly enough. Microsoft's Atlas framework is aimed to solve some of these problems by giving some structure and framework to JavaScript programming and it is a good start in EJP arena; but it is going to be a while to get production ready Atlas Framework, so we are on our own for building these core building blocks to build rich web applications and platforms like Virtual Earth.

So the bottom-line is this: "developing in JavaScript may be easy but developing Enterprise Ready Applications in JavaScript is extremely hard". Do you agree?

Now, EJP is what precisely makes my job challenging and fun at Virtual Earth - so if you are ready to do some EJP, send me your resume. :)