Live from Visual Studio Live!

Blog archive

TypeScript Language Capturing .NET Developers' Attention

JavaScript has been in the air at the Visual Studio Live! 2013 Las Vegas conference this week. Whether it was Steven Guggenheimer's Tuesday keynote address on modern apps or Brian Noyes' Wednesday session on the Microsoft UI technology roadmap for developers, JavaScript has been an important part of the conversation. The problem is, many .NET developers familiar with strongly typed C# are either uncomfortable with or even hostile to JavaScript's dynamically typed scripting language.

In particular, programming in JavaScript can become a challenge on larger, more-complex code projects. The lack of strong typing invites runtime errors, while the lack of namespaces and class structure make it difficult to organize and manage code as it grows.

That's where TypeScript, an open source language created by Microsoft, comes in. TypeScript is a superset of JavaScript that presents class structure and type safety for coders, helping them better manage and maintain their code. Projects written in TypeScript compile to valid, standards-compliant JavaScript code.

Ben Hoelting is a software architect at Aspenware and a C# MVP. He also led an hour-long presentation on TypeScript at the Visual Studio Live! conference on Tuesday. He said that C# developers previously aligned with Silverlight are finding themselves forced to learn JavaScript/CSS/HTML.

"Talking with many of the attendees at these conferences and at community events, I find many of them miss coding in C# and XAML. It's just easier for them," he said, noting that JavaScript lacks the tooling and syntax C# developers prefer. "I believe that TypeScript can provide the tooling and syntax to reduce the negative feelings most C# developers get from JavaScript."

TypeScript does not eliminate the need to know and learn JavaScript, Hoelting warns. Rather, it helps reduce the learning curve for C# devs and opens opportunities they might otherwise miss. For instance, TypeScript can take full advantage of powerful JavaScript libraries and APIs like Node.js, and there is TypeScript tooling for both the Sublime and WebStorm 6 JavaScript IDEs.

In addition to providing strong typing, TypeScript also promotes proper code organization -- something that can be difficult for inexperienced JavaScript developers.

"TypeScript allows for Modules [the equivalent of namespaces in .NET], Classes and Interfaces, which fit better into the SOLID principles of object-oriented coding," Hoelting explained. "It makes it easier to separate concerns in my JavaScript."

So could TypeScript win the hearts and minds of grizzled C# developers who might otherwise be hostile to the scripting language? Hoelting thinks it's too early to tell, as TypeScript remains a pre-1.0 release. Version 0.9 is currently in the works -- an alpha version could be released in April -- and promises to add support for generics and a more robust compiler architecture. You can read more about the upcoming version at Microsoft's TypeScript blog.

"Here's my opinion on TypeScript. Anders Hejlsberg [the creator of C#] and many of the other members of the C# team at Microsoft have been helping to define and develop TypeScript," Hoelting said. "That tells me that we're going to see an explosion of C# features that start showing up in TypeScript. In a year or two, C# developers are going to feel right at home inside TypeScript. That's my take on what I've seen from Microsoft."

Posted by Michael Desmond on 03/28/2013


comments powered by Disqus

Featured

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube