CONASOL 2016
Luis Aviles / @luixaviles
Node.js
WebSockets & Socket.io
TypeScript
Angular 2
Live Demo
Open Source platform for building applications, using JavaScript
An application optimized for performing high speed input/output operations
A web server
An API server
NPM
The Node Package Manager
A tool that assist with the searching, packaging, publishing and updating of node modules
npm install [module] --save
npmjs.com Contains a massive repository of node packages
Over 350000 node packages exist!
Source: http://www.modulecounts.com
A persistent connection between the client and the server
Both parties can start sending data at any time
Bi-directional communication
Great performance
Real Time application framework
Wrapper around WebSockets
Send events between client and the server
Socket.io API (Server)
// Server io.on('connection', callback(socket))
// Socket socket.on('event', callback(data)) socket.emit('event', data) socket.broadcast.emit('event', data)
Socket.io API (Client)
// Socket
socket.on('event', callback(data))
socket.emit('event', data)
Works with JavaScript, Android, iOS clients
Free and Open Source programming language
Developed and Maintained by Microsoft
Compiles to plain JavaScript
Any browser. Any host. Any OS.
Written in TypeScript
Is not an upgrade from version 1.x
Component based Programming
Semantic Versioning
MAJOR.MINOR.PATCH
2.2.4 -> Current Version
https://github.com/luixaviles/socket-io-typescript-chatsocket-io-typescript-chat: A Socket.io Example using TypeScript - https://t.co/oZFj5eyOuX
— JavaScript Daily (@JavaScriptDaily) November 22, 2016