TDC2016SP - Trilha Node.Js

  • View
    88

  • Download
    1

Embed Size (px)

Text of TDC2016SP - Trilha Node.Js

Java para Lderes e Gerentes

Node.js

Vinicius MussakMSP - MCP

Comunicao em tempo real com Node.js

Globalcode Open4education

Globalcode Open4education

Vinicius MussakDesenvolvo solues/bugsMicrosoft Student PartnerMicrosoft Certified ProfessionalEstudo Sistemas de Informao

Globalcode Open4education

2

http://tdc-chat.azurewebsites.net

Globalcode Open4education

Nossos clientes precisam de informao agora!

Globalcode Open4education

Srio mesmo?

Globalcode Open4education

Comunicao em tempo real

Globalcode Open4education

Quem usa?

Globalcode Open4education

Socket IOSocket.IO enables real-time bidirectional event-based communication.It works on every platform, browser or device, focusing equally on reliability and speed.

Globalcode Open4education

SIMPLICIDADE

Globalcode Open4education

WebSocketsFlashSocketsAJAX long pollingAJAX multipart streaming (at verso 0.7)Forever IframeJSONP PollingSocket IO

Globalcode Open4education

Quem usa Socket IO?

Globalcode Open4education

Basicamente,ouvimos e transmitimos

Globalcode Open4education

Ouvimossocket.on("mensagem", function(msg){ //alguma coisa});

Globalcode Open4education

Transmitimossocket.emit("mensagem", "Ol TDC!");

Globalcode Open4education

Transmitimossocket.broadcast.emit("mensagem", "Ol TDC!");

Globalcode Open4education

ConcluindoVoc simplesmente envia uma mensagem (emit) para algem esteja aguardando por ela (on)

Globalcode Open4education

DemoConstruindo um chat

Globalcode Open4education

http://socket.io/ Site do socket.io

https://github.com/socketio/socket.io GitHub

https://developer.mozilla.org/pt-BR/docs/WebSockets Web SocketsPara saber mais!

Globalcode Open4education

Dvidas?

Globalcode Open4education

Obrigado!

viniciusmussak.net/viniciusmussak/viniciusmussak@ViniciusMussak/vmussakvinicius.mussak@outlook.com

Globalcode Open4education