Wednesday, October 3, 2012

#TypeScript: New Programming Language by Microsoft

Download TypeScript Application-scale release of cross-platform JavaScript language

Microsoft released a new open source, standards-based, general-purpose programming language that extends the capabilities of JavaScript. TypeScript has been unveiled by Soma Somasegar, corporate vice president of the developer division at Microsoft, and described as a means of writing cross-platform JavaScript to run in any browser on any device running standard JavaScript.

As an "application scale" offering, Microsoft says that the release of TypeScript comes in direct response to the challenge of creating larger-scale JavaScript applications.

NOTE: In search of a definition for what constitutes a "large-scale" JavaScript application, developer programs engineer at Google Addy Osmani writes, "In my view, large-scale JavaScript apps are non-trivial applications requiring significant developer effort to maintain, where most heavy lifting of data manipulation and display falls to the browser."

In terms of form and function, TypeScript uses the same JavaScript syntax and semantics. It compiles to clean, standard, broadly compatible JavaScript. TypeScript starts and ends as JavaScript, adding only what is needed for large-scale web client applications to the JavaScript standard, so developers will be able to reuse existing JavaScript.

Microsoft is also releasing a TypeScript for Visual Studio 2012 plugin that the firm hopes will improve developers' experiences with the tooling and further help address the challenge of building large-scale JavaScript applications. The TypeScript plugin provides developers with code navigation, refactoring, static error messages, and IntelliSense.

Somasegar says that JavaScript was originally designed to be a client-side scripting language for web pages: "For many years it was limited to event handlers that scripted a Document Object Model (DOM). As a result, JavaScript is missing many of the features necessary to be able to productively write and maintain large-scale applications, namely those that create distinct contracts between components and developers."

"TypeScript is a superset of JavaScript that combines type checking and static analysis, explicit interfaces, and best practices into a single language and compiler. By building on JavaScript, TypeScript keeps you close to the runtime you're targeting while adding only the syntactic sugar necessary to support large applications and large teams. Importantly, TypeScript enables great tooling experiences for JavaScript development, like those we've built for .NET and C++ and continue to innovate on with projects like "Roslyn". This is true whether you're writing client-side JavaScript to run on Windows, Internet Explorer, and other browsers and operating systems, or whether you're writing server-side JavaScript to run on Windows Azure and other servers and clouds," said Somasegar.

As stated, TypeScript is open source and the compiler is available under the Apache 2.0 license on CodePlex, Microsoft's free open source project-hosting site.

No comments: