Web Development: TypeScript as OOP version of JavaScript

JavaScript is not classic OOP language

OOP (Object Oriented Programming) is the most popular style of coding for now. OOP programming languages are the most used for now. E.g., C++, Java and C#. These are the most used ones in software development. That’s why the majority of frontend developers have been coding in OOP paradigm. On the other hand, JavaScript dominates on the client side of Web Development. Besides, JavaScript is rising very quickly as server side language by node.js platform. JavaScript is not classic OOP programming language. Actually, there is some kind of OOP based on prototype, but it provides another approaches and patterns. One more point against JavaScript is its dynamically typed nature. These and some other features make JavaScript very outstanding. A lot of developer note that they are hate JavaScript.

 TypeScript for making JavaScript more friendly

There are several attempts to make JavaScript development more friendly and controllable. E.g., CoffeeScript [http://coffeescript.org] is a language that compiles into JavaScript. CoffeeScript code looks like Ruby. Its main goal is providing a minimalistic syntax to make source code smaller and elegant. Another way is TypeScript [http://www.typescriptlang.org] by Microsoft. It makes JavaScript look like regular OOP language with classes and static typing. TypeScript is a language, or rather to say extension to pure JavaScript, because it uses the same syntax as pure JavaScript, but introduces extensions to define types, interfaces, classes, modules, etc. There is a compiler to translate TypeScript code into pure JavaScript to run in browser or by node.js engine. It’s open source both the specification and the implementation hosted on GitHub. Thus, it may be used for any OS and platform. Install it globally into your system as any other npm module:

Read more