Agenda
- Node.js
- PHP + Browser + Node.js
- PHP + Node.js
- Compiling PHP to JavaScript
Node.js
- JavaScript Runtime
- Based on Google V8 JavaScript Engine
- One thread for JavaScript
- Asynchronous operations via LibUv
- Native Modules
- Module Ecosystem
## A Web Server
```js
var http = require('http');
http.createServer(function (req, res) {
res.writeHeader(200, {'Content-type': 'text/plain'});
res.write('Hello ');
res.end('World');
}).listen(8000);
```
Vibrant Community
Express
- Web Framework
- Based on Connect
- MVC routing and views
- Minimalist
Node Cellar
Integration via Browser
Distributed Node.js
Intermediate
PHP calling Node.js
Socket.IO
- Persistent Connection btw Client and Server
- Real Time
- Browser support
- WebSockets or fallback
DNode
- Asynchronous Remote Procedure Call
- Client and Server
- Node.js vs Node.js
- Using Sockets and Messages
- Libraries for Other Languages
- And YES! PHP!
THE END
BY Angel 'Java' Lopez / www.ajlopez.com / @ajlopez