it? • Comparison • Quick: express.js • Even quicker: meteor.js • Meteor.js example • To node or not to node • Alternatives JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
Martin Naumann • Javascript on the server • event-driven architecture • asynchronous I/O • scalable • based on V8 • modular "Yeah. Nice buzzwords. What's the point?"
of clients ◦ reduced memory footprint ◦ get more performance from existing resources ◦ Benchmark: up to 1.600.000 concurrent requests • Use your frontend technology on the backend ◦ you have Javascript in your application anyway ◦ "Oh look, this looks familiar!" ◦ You know your stuff: Callbacks, Closures, Asynchronity • It's modular ◦ easy to connect pieces of code ◦ easy to write network code ◦ rapidly build complex applications Level Two JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
the base of all web applications • HTTP was synchronous. • Most of the web languages still are. • HTTP evolved: ◦ AJAX ◦ Websockets ◦ Push • real-time web • Need for asynchronous technologies ◦ all of which are a bit weird in PHP, Java, ASP, etc. ◦ node.js is asynchronous and has ever been. JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
Route requests • Take care of HTTP • Data sychronisation • Persist data • Write an Interface (API) • Setup server-side and client-side code JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
the server automatically deliver it • automatic persistance • automatic synchronisation • automatically compensate latency JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
you wanted to implement a chat app" • Write a server and a client • transmitting messages in nearly real-time • with multiple chatrooms • users can pick a nickname • users can create rooms • What do you think how many lines of code this requires? 54. Server and client together. 7 are blank. JAZOON’12: Rookie Award, Next generation web development, Martin Naumann
the question • Where node does make sense ◦ real-time applications ◦ processing long-running or I/O intensive tasks • Where it doesn't make sense ◦ static web pages ◦ small web applications for standard CRUD JAZOON’12: Rookie Award, Next generation web development, Martin Naumann