All your servers are belong to us

Some things to keep in your <head/>

 


<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>
















A gentle introduction to NODE.JS

  1. The history of JavaScript

    ... confusing, even for the one who started this whole thing

  2. The mustache theory

    ... never underestimate a language because it´s different than the ones you know

  3. Back to topic: "What´s this Node thingy?"

    ... JavaScript on the Server, V8, The event loop, Why it is the Future

  4. "You mean like jQuery on the Server?!"

    ... yeah, but we can do better. Let´s do a small experiment

The history of JavaScript

The early days

Wow, the sweet 16 party is over!

Nowadays

Accidentally we took over the world!

Why JavaScript matters

So after this massive amount of history, you´re ready for the essence:

This leads to one question:

Why is JavaScript treated as a toy language?

Random JS Developer

Tried it once, was confusing and disgusting!

Random Java Developer

The mustache theory

John McCarthy

McCarthy
<code>Invented Lisp</code>

Dennis Ritchie

Richie
<code>Invented C</code>

James Gosling

Gosling
<code>Invented Java</code>

Bjarne Stroustrup

Strostrup
<code>Invented C++</code>

Brendan Eich

Eich
<code>Invented JavaScript</code>

???

Noticed the difference?

Brendan Eich

Eich

No beard!

BTT: We want to hear something about NODE

Super famous quote:







Nodes´s goal is to provide an easy way to build scalable network programs

http://nodejs.org/#about

NODE.JS - The facts

ENOUGH! Show us some code plz!

A Webserver - true story

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

The EventLoop

Imagine you´re in a restaurant at Burger King

In PHP were used to sequential, blocking stuff

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

	

More code. Yeeehaw! But this time awesome

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
});

	

FQA - Frequently questioned answers

Investigating NODE - Part I







"So I don't have to worry about code accessing the same data structures at the same time?"
Interested programmer with computer science background

Investigating NODE - Part II







"Very nice, but why should I use it?"
Interested developer who will get his boss on to it

Investigating NODE - Part III







"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

Investigating NODE - Part IV







"Can I access the DOM in node?"
Developer who still thinks that node is a client side library

Investigating NODE - Part V







"Isn't event driven programming really hard?"
Again the Java guy. I will never get you satisfied...

Investigating NODE - Part VII







"Where can I learn more?"
You´re the kind of guy I like

The Experiment

BTW: We´re hiring!
Come over and talk to us

Questions?

/

#