Redmond Review

With TypeScript, Microsoft Embraces and Augments

TypeScript is designed to make JavaScript development scalable, something Microsoft clearly needs if it's to use JavaScript in its own work.

In my September 2012 column, "JavaScript Diplomacy", I wrote about the importance of JavaScript to Microsoft. Now, as if to add an exclamation point to those thoughts, Microsoft has released its new statically typed JavaScript superset, TypeScript. Maybe you were skeptical before, but there should be no doubt in your mind now that Microsoft is serious about JavaScript. And while my September column discussed Microsoft's use of JavaScript as an instrument of outreach, TypeScript may mark the beginning of JavaScript as an internally strategic technology as well.

TypeScript is designed to make JavaScript development scalable, something Microsoft clearly needs if it's to use JavaScript in its own work. But instead of just building some internal tooling to help in that endeavor, Microsoft created something standards-compliant and open source (under the Apache 2.0 license). And TypeScript compiles to nothing more than vanilla JavaScript that's host- and OS-agnostic.

You can learn all about TypeScript by watching an hour-long presentation on it, complete with code samples, by Anders Hejlsberg. The demos in the video make TypeScript concrete and easy to understand. The video also makes it plain that Hejlsberg -- known by many as the father of C#, LINQ and the Microsoft .NET Framework itself -- seems to be very excited about this new project. Meanwhile, Hejlsberg has never, by any outward indication, been a fan of JavaScript. So what gives?

Hejlsberg Can Read the Writing
If you look at his track record, Hejlsberg seems a keen realist. On the one hand, he was the man behind Turbo Pascal and Delphi, the latter of which was rumored to have the code name VBK, or Visual Basic Killer. On the other hand, the subsequent Microsoft dominance over Borland (and the dominance of Visual Basic over Deplhi) was incontrovertible, and helped Microsoft lure Hejlsberg to Redmond. When he got there, he made himself at home, developing technology that supported the Visual Basic visual development model while implementing language and framework concepts that he felt more comfortable with.

Fast-forward to today, and JavaScript is ubiquitous outside of Microsoft. And with the development models for Windows 8 and apps for Office and SharePoint, as well as full-on support for Node.js on Windows Server and Windows Azure, JavaScript is everywhere inside of Microsoft, too.

It's another "if you can't beat 'em, join 'em" moment. But TypeScript has static typing, type inference, classes, modules and a plug-in for Visual Studio 2012 that implements full IntelliSense. Hejlsberg is acknowledging the success and entrenched status of JavaScript but, once more, with something that implements language and framework concepts with which he feels more comfortable. It's déjà vu all over again.

Competition and Cooperation
TypeScript isn't the first open source project attempting to make JavaScript more modern, structured and suitable for large projects. Google Dart has similar ambitions, as does CoffeeScript and a lesser-known project called Opa. But Dart has its own IDE and VM, CoffeeScript isn't really typed and Opa is joined at the hip with MongoDB. TypeScript, meanwhile, is really just a thin outer layer that syntactically and aesthetically stays true to JavaScript itself and, indeed, is highly inspired by the various proposed ECMAScript 6 standards out there today.

Why is Microsoft so keen to be a good Web citizen? Maybe the company sees JavaScript today much as it saw C++ in the early 1990s. C++ had an almost completely Unix pedigree at that time, as did C before it -- all three were developed at Bell Labs, after all. But Microsoft embraced C++ for Windows development and set out to create one of the best compilers for C++ in the industry. When Visual C++ came out, it gave Microsoft major C++ credibility, as well as a better way to get its own work done and innovate further up the stack.

Could TypeScript provide comparable notoriety and opportunity? Maybe, but it needs wider IDE support. The Visual Studio 2012 plug-in and browser-based "playground" are part of a good start, as are the TypeScript sample syntax files for Sublime Text, Emacs and Vi. But I'd also like to see support for Visual Studio 2010, Visual Web Developer Express, WebMatrix and, for the home run, first-class support in Eclipse. It's only with support across the Microsoft ecosystem -- and beyond it -- that Redmond's commitment to TypeScript will be fully evident.

Of course, no matter what Microsoft does, some developers outside its ecosystem will be cautious, even cynical, about TypeScript. The company should soldier on nonetheless, and do its part to make JavaScript as productive as it is pervasive.

About the Author

Andrew Brust is Founder and CEO of Blue Badge Insights, an analysis, strategy and advisory firm serving Microsoft customers and partners. Brust is also a Microsoft Regional Director and MVP; an advisor to the New York Technology Council; and co-author of "Programming Microsoft SQL Server 2012" (Microsoft Press, 2012). A frequent speaker at industry events, Brust is co-chair of the Visual Studio Live! family of conferences and a contributing editor to Visual Studio Magazine. Brust has been a participant in the Microsoft ecosystem for over 20 years, and has worked closely with both Microsoft's Redmond-based corporate team and its field organization for much of the last 15. He is a member of several "insiders" groups that supply him with insight around important technologies out of Redmond. Follow Brust on Twitter @andrewbrust.

comments powered by Disqus

Reader Comments:

Fri, Nov 29, 2013 Jeanette free health insurance quote health insurance quote missouri

http://www.healthinsurancebible.com/q DOT uality-of-healthcare.html http://www.healthinsurancebible.com/us-quote/m DOT issouri.html

Sat, Nov 9, 2013 Jalen cheapest car to insure

http://www.carinsurquote.net/ DOT

Sat, Feb 16, 2013 Joyce viagra :-OOO buy cialis viagra 535 acyclovir online %-]] cheapest cialis 5507

http://www.medsadvisor.net/ DOT :-OOO http://www.buyedmedsonline.com/ DOT 535 http://www.treatmentsguide.net/ DOT %-]] http://www.edgenericmeds.net/ DOT 5507

Thu, Nov 29, 2012 agtrier

If Microsoft were serious about JS they would first weed out the bugs in IE's JS engine before they start extending it with non- standardised features. We also all remember what MS tried with Java. Building up trust would also be something that should come first..

Mon, Nov 26, 2012 Keith Ward

The link to the Hejlsberg tutorial has been added back.

Thu, Nov 22, 2012 Andrew Brust New York, NY

Aljodav's link is the correct one. I will try and get the link embedded in the text of the article. It was there in my original draft , along with some others, but got stripped out. Sorry about that, and Happy Thanksgiving, if you're among the celebrants. :-)

Wed, Nov 21, 2012 aljodAv BR

I guess this is the link to the video he mentioned: http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript

Fri, Nov 16, 2012 Roger Pollard

How about a link to that TypeScript video you mentioned?

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above