<head>
<meta name="AUTHOR" content="Sebastian Golasch"/>
<meta name="GEO.LOCATION" content="Cologne"/>
<meta http-equiv="CONTENT-SCRIPT-TYPE" content="text/javascript"/>
<meta http-equiv="CONTENT-SCRIPT-TYPE" content="text/php"/>
<meta http-equiv="CONTENT-SCRIPT-TYPE" content="text/java"/>
<meta http-equiv="CONTENT-SCRIPT-TYPE" content="text/coffeescript"/>
<meta name="KEYWORDS" content="8-bit, weird music, coffee, jetpacks"/>
<meta name="DATE" content="Girls"/>
<meta name="ROBOTS" content="needlovetoo"/>
<link rel="DNS-PREFETCH" href="http://www.denkwerk.com"/>
<link rel="ALTERNATE" type="TWITTER" href="@asciidisco"/>
<link rel="ALTERNATE" type="GITHUB" href="github.com/asciidisco"/>
<link rel="CANONICAL" href="mmt.asciidisco.com"/>
<link rel="PINGBACK" href="Sure. Let´s talk."/>
</head>
... confusing, even for the one who started this whole thing
... never underestimate a language because it´s different than the ones you know
... JavaScript on the Server, V8, The event loop, Why it is the Future
... yeah, but we can do better. Let´s do a small experiment
Wow, the sweet 16 party is over!
Accidentally we took over the world!
So after this massive amount of history, you´re ready for the essence:
Why is JavaScript treated as a toy language?
Random JS Developer
Tried it once, was confusing and disgusting!
Random
JavaDeveloper
<code>Invented Lisp</code>
<code>Invented C</code>
<code>Invented Java</code>
<code>Invented C++</code>
<code>Invented JavaScript</code>
Nodes´s goal is to provide an easy way to build scalable network programs
Anatomy of a small node program
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
$ node my-awesome-hello-world-server.js
$ node my-awesome-hello-world-server.js
$ Server running at http://127.0.0.1:1337/
Blocking:
// Ask the database for data
$amigaUsers = $mySuperDbAdapter->query('select * from amiga_users');
// Wait for it!
// Ask the database for more data
$commodoreUsers = $mySuperDbAdapter->query('select * from c64_users');
// Wait for it! AGAIN!
// then do something with the data
Non-blocking:
db.query('select * from amiga_users', function(amiga_users) {
// do something with result
});
// No more waiting! BAM!
db.query('select * from c64_users', function(commodore_users) {
// do something with result
});
"So I don't have to worry about code accessing the same data structures at the same time?"
Interested programmer with computer science background
"Very nice, but why should I use it?"
Interested developer who will get his boss on to it
"So you are saying I should write all my apps in node from now on?"
Confused developer who will try to do everything in node from now on
"Can I access the DOM in node?"
Developer who still thinks that node is a client side library
"Isn't event driven programming really hard?"
Again theJavaguy. I will never get you satisfied...
"Where can I learn more?"
You´re the kind of guy I like
/
#