Cloud

Goodbye JavaScript, Hello TypeScript!!!!

There are many things developers hate about JavaScript.  You can see this with all of the different ways people are trying to “fix” JavaScript.  Here are a couple of the ways:

  • CoffeeScript is a language which is syntactically similar to JavaScript and attempts to expose the “good parts” of JavaScript
  • Google went ahead and wrote an entirely new language for dynamic web applications (“called Dart”) simply to get away from JavaScript.

Both attempts to divert from JavaScript have the same problems:TypeScript

  • They are entirely new languages.  Developers have to take the time to learn the language and become familiar with the way it works before they can really start to mold themselves with the language
  • There are so many JavaScript libraries available today that using these languages means you have to overlook many of the libraries available to you just to not use JavaScript.

Enter TypeScript.  TypeScript is a typed super set of JavaScript.  This means you are not completely putting JavaScript out to pasture, but you can also choose to use the elements of JavaScript (or libraries in JavaScript) you enjoy while adding strongly typed variables, objects, classes and interfaces.
What does this mean for developers?  For me it means a few things:

  • Finally the dynamically typed parts of the language can be used when preferred and I won’t have to learn an entirely new language
  • Typed languages are faster by nature, so when your TypeScript is compiled down into native JavaScript it will run faster
  • Typed languages will come with far superior IntelliSense.

On a larger scale this changes my development mindset.  In the past I would choose to invest heavily on the .NET aspect of applications.  Whether it be an ASP.NET forms application, SharePoint web part, Windows Phone or Windows 8 application; .NET is where I would want to do my development.  For web based applications that meant a lot of code behind and on occasion, being tied down by the ASP.NET page life cycle.  Suddenly I find myself more interested in writing Windows Phone 8 and Windows 8 applications in HTML/JS/CSS than using C#/XAML.
TypeScript is still very new (still in Preview) and it will not replace the code behind model entirely, but I feel it has the ability to alter the way ASP.NET applications are made, especially if given access to the .NET Framework.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Brian ODonnell

More from this Author

Subscribe to the Weekly Blog Digest:

Sign Up
Follow Us
TwitterLinkedinFacebookYoutubeInstagram