Avoiding Vanilla JavaScript with transpilers

To avoid writing Vanilla JavaScript, tech giants Microsoft and Google, have created TypeScript and Dart, respectively, as languages and transpilers. A transpiler is a source code to source code compiler.

A compiler will turn human readable code, written in a programming language, into machine code. A transpiler is used to transform source code from one programming language into that of another language. The output may or may not be readable by a human, depending on the intent of the transpiler.

Languages, such as Typescript and Dart, get transpiled into Vanilla JavaScript code, so that they can be run in JavaScript-enabled web browsers. In the case of TypeScript, it's essentially a superset of JavaScript that introduces static type checking. The creators of the AngularJS Framework chose TypeScript over Vanilla JavaScript as the language of choice, to develop the next major version of their framework.

This approach to side stepping JavaScript, using an alternative programming language and a transpiler, creates a win-win situation for the developer. The developer is allowed to program in a programming language that is most productive for them and, at the end of the day, the code the developer created, is guaranteed to run in the web browser—thanks to the transpiler.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.38