Typescript - Latest Scripting Language

In this article, we are discussing the latest scripting language from Microsoft which is built on Javascript.In this article we are discussing the features and advantages of Typescript, differences between Typescript and other scripting languages like Dart, Coffeescript e.t.c.

Introduction to scripting languages

Scripting Languages are the programming languages which are designed for communicating and integrating with other programming languages.A programming language ,which is compiled first and then run, where as scripting languages are interpreted ones one command at a time.The programs written in scripting languages known as scripts can be deployed anywhere like web applications etc. Javascript is the best example for scripting languages which is used extensively to create dynamic web pages.

Why are scripting languages important
  • Scripting Languages are interpreted or bytecode-interpreted and never compiled to native code.

  • Scripting Languages provides automatic memory management with the help of interpreter which manages memory at runtime. An interpreter can also be shared by many other prograns also.

  • Scripting Languages include high-level data types, such as lists, associative arrays e.t.c

  • The environment of execution can be integrated with the application environment.

  • The scripts written using scripting languages can access components written in any other lower-level languages like C.

  • The most dominant application programming languages for almost a decade have been C and C++. But , now a days they are limited only for system programs and kernels of applications.All other tasks like such as application prototyping and gluing together other
    applications and tools are better served by scripting languages.

  • main usage areas for scripting languages:
  • Command scripting languages : - JCL (Job Control Language) which is created for IBM OS/360 operating system.

  • Application scripting languages : - examples of these languages is Visual Basic language.Javascript also falls in this area only.

  • Markup Languages : - HTML,DHTML,XML,XHTML e.t.c

  • Universal Scripting Languages : -Perl,Ruby,Python,PHP e.t.c

  • What is Typescript and why we need it

    TypeScript is a language which is built for application-scale JavaScript development for large applications.We can say typescript is a typed superset of JavaScript which compiles to plain JavaScript.Typescript runs on any browser ,any host. any OS .

    Why Typescript ?
    TypeScript was built to help enhance JavaScript tooling support and to also help developers manage larger application scale JavaScript projects.

    The fact about JavaScript is that Javascript is not application-scale and it is a simple scripting language which does not support structuring mechanisms
    like classes, modules and interfaces.There is a need for Javascript which is better and supports all the thing which supports application-Scale.

    Features of Typescript

  • Similar syntax of Javascript which makes many developers familiar.

  • Interoperability - We can use existing Javascript code,Javascript libraries and can call fro other JavaScript code.
  • .
  • Typescript is Scalable by offering classes, modules, and interfaces which helps us in building components.

  • TypeScript was created with tooling in mind.Typescript provides Strong Tools like optional static checking, symbol-based navigation, statement completion, and code refactoring for Large Applications .

  • TypeScript offers optional type annotations.

  • With types said ablove (static checking,navigation based on symbols,completion of statements e.t.c) in Typescript a developer can easily
    define interfaces between software components through which we can get the behavior of JavaScript libraries.

  • Can run on any browser , any-host or any Operating-System.
  • .
  • Typescript Type system formalizes the static types that describes dynamic types of Javascript and can make type annotations.

  • It's Open Source and under the Apache 2.0 license

  • Typescript Vs other scripting languages

    Typescript Vs Dart
    TypeScript doesn't have any interops issues with Javascript because it is build on JavaScript only where as Dart is a native virtual machine written from scratch and interops with JavaScript.
  • Dart supports generics where as Typescrt doesn't.

  • Typescript does not allow downcasting where as Dart assignment compatibility is bidirectional.

  • Typescript Vs Coffeecript
    TypeScript is a superset of JavaScript and built on top of JavaScript where as CoffeScript provides an alternative syntax which compiles to JavaScript.In typescript with static type system,which allows IDEs to do static analysis and do stuff like type-check warning, statement auto-completions, and refactoring.

    Typescript advantages

    We are aware that with VS.net or any other IDE that it is not always easy to develop and debug JavaScript With the help of static typing annotations and other features in TypeScript which allows VS.net to improve the development experience with JavaScript without any changes in our Javascript. With TypeScript it is possible to get more accurate and helpful intelligense/code-completion,
    error and syntax highlighting during development and still get standard JavaScript code.

    TypeScript's static typing could enable better tooling with warning squiggles, easy statement completion, plus smart refactoring.
    It is possible for easy navigation around code, as well as find references, rename, and more.TypeScript is a superset of JavaScript and you write it like you write JavaScript which I like. Any existing JavaScript is already TypeScript.


    According to Luke Hoban "CoffeeScript is to Ruby as TypeScript is to Java/C#/C++." yes,It is true that if you love Ruby, you'll enjoy CoffeeScript as it makes the JavaScript more like the Ruby.
    The same is true with TypeScript also. It brings useful features into JavaScript in an ultimately compatible and syntax-friendly way using language constructs you're comfortable with.


    Author: ketan Italiya26 Aug 2013 Member Level: Gold   Points : 8

    Microsoft released a developer preview of TypeScript, a new JavaScript-like programming language that is translated into JavaScript so that its apps can be run in any browser. The source code is licensed under Apache 2.0 and can be found on Codeplex.

    TypeScript has a syntax that is very similar to JavaScript but adds features, such as optional static typing, that Microsoft programming language guru Anders Hejlsberg says will make it easier for developers to build larger applications. It attempts to address some of the same issues that Google’s Dart programming language does, but without a radical departure from JavaScript.

    Like CoffeeScript, TypeScript compiles to JavaScript, but that’s where the similarities end. Hejlsberg says TypeScript is actually largely based on the specifications of the next version of JavaScript being developed by the ECMA committee.

    JavaScript started out as a simple scripting language for the Netscape browser; it was never intended to become a language for building large-scale applications. Yet the rise of the web and HTML5 have made it into the standard language for client-side development, and Node.js has proved to be a popular way of writing JavaScript applications on the server side.

    Frameworks like Backbone.js, the heavily venture funded Meteor and Nodejitsu‘s Flatiron are also trying to address the issue of making it easier to develop modern JavaScript applications.

    TypeScript (like CoffeeScript) will actually work with existing frameworks and libraries — any JavaScript can just be pasted into TypeScript and should just work.

    Hejlsberg created Turbo Pascal, was the chief architect of Delphi, and is the lead architect of C# and LINQ. He developed TypeScript with Steve Lucco and Luke Hoban.

    Here’s a list of features:
    Optional static typing Class declarations Support for modules A Visual Studio plugin

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: