WEB APIS WITH NODEJS AND TYPESCRIPT

"ONE LANGUAGE TO CONQUER THEM ALL"

ERICK WENDEL

MICROSOFT STUDENT PARTNER

​​

what is nodejs ?

node.js

"...development platform built on top of Google's V8 JavaScript virtual machine. The Node.js libraries are focused on building server-side applications in JavaScript."

v8

"...V8 is the JavaScript execution engine built for Google Chrome and open-sourced by Google in 2008. Written in C++, V8 compiles JavaScript source code to native machine code instead of interpreting it in real time"

the node.js system

confused ?

demonstration

hello world

what problem it solves ?

when use nodejs

  • Intensive I/O 
  • Web Applications
  • Chat
  • Data Streaming

when not use nodejs

  • Parallel Applications
  • Heavy Server-side computation / processing
  • Intensive CPU operations

typescript

typescript

"TypeScript is a superset of JavaScript that compiles down into plain JavaScript (ES3+). The main goal of TypeScript is to enable developers to leverage excellent static typing capabilities."

typescript

  • Type annotations & type inference.
  • Generics.
  • Interfaces, enums, namespaces, modules and classes (the latter two available in ES6).
  • Safe refactoring.

demonstration !!

typescript vs es6

TYPESCRIPT VS ES6

  • Type annotations & type inference.
  • Generics.
  • Interfaces, enums, namespaces.
  • Static Properties.
  • Getters/Setters.
  • Safe refactoring.

demonstration

typescript 2.0 and es7

BUILDING APIS WITH HAPI.JS

HAPI.JS

DEMONSTRATION

OBRIGADO !!!

  • http://bit.ly/control-flow-nodejs

  • http://bit.ly/mva-erickwendel

  • http://erickwendel.com.br

  • http://netcoders.com.br/blog​

  • http://slides.com/erickwendel/apis-com-nodejs-typescript/fullscreen

  • https://github.com/ErickWendel/meetup-nodejs-typescript

mais links

  • https://nodejs.org/en/about/

  • https://en.wikipedia.org/wiki/Node.js

  • http://stackoverflow.com/questions/21596172/what-function-gets-put-into-eventloop-in-nodejs-and-js

  • https://github.com/hapijs/joi/blob/v9.1.0/API.md

  • https://github.com/dwyl/hapi-auth-jwt2

  • https://github.com/ryanfitz/hapi-auth-jwt

  • http://hapijs.com/plugins

  • https://medium.com/@basarat/typescript-won-a4e0dfde4b08#.lsjpl9o1a

Made with Slides.com