background preloader

Understanding node.js - Debuggable Ltd

Understanding node.js - Debuggable Ltd
Node.js has generally caused two reactions in people I've introduced it to. Basically people either "got it" right away, or they ended up being very confused. If you have been in the second group so far, here is my attempt to explain node: It is a command line tool. "But I can do everything I need in: ruby, python, php, java, ... !". I hear you. "Get to the point!" Alright, I will. "Huh?" That's right, everything runs in parallel, except your code. The day starts by one servant waking up the king and asking him if he needs anything. Once a servant finishes a task, he lines up outside the kings quarter to report. Life is good, for the king's servants carry out all of his tasks in parallel, but only report with one result at a time, so the king can focus "That's fantastic, but could you quit the silly metaphor and speak geek to me?" Sure. var fs = require('fs') , sys = require('sys'); fs.writeFile('letter-to-princess.txt', ' You got it! "Very nice, but why should I use it?" Yes and no. No. --fg

node.js - Debuggable Ltd Posted on 24/9/09 by Felix Geisendörfer What happens if you take an insanely fast JavaScript engine and build an asynchronous I/O library around it? You get node.js, an up and coming project that brings you bloat-free server-side JavaScript. This enables you to write any kind of "backend" service with just a few lines of JavaScript. This code creates a new http server and tells it to listen on port 8000. However, during those 2 seconds the server will continue to accept new connections. Here is another chart from a req/sec benchmark among various server-side JS libs: Now you may think this is all very nice and stuff, but what do you actually need it for? Trying out node.js requires you to have a Linux/Unix machine but it's pretty much as simple as downloading the code and running: . The documentation is pretty excellent and there are lots of friendly people on the mailing list to help if you have any problems. I'd love to hear your thoughts on node.js and any questions you might have.

The Node Beginner Book » A comprehensive Node.js tutorial Curso de Introducción a node.js Curso de Introducción a node.js diciembre.19 Archivo de videos Descargar MP3s Luego del éxito del curso de Introducción a HTML5 el jueves 15 dimos un curso de introducción a node.js en vivo. Alrededor de 2000 personas en simultáneo disfrutaron del programa y tuvieron la oportunidad de adentrarse y aprender más del interesante mundo de node.js. Antes y después del programa @cvander estuvo compartiendo interesantes lecturas para sumergirnos en el mundo node.js de lleno: La expectativa y la repercusión del curso se hicieron notar a través de tweets que puedes ver en el storify del Resumen de la Introducción a node.js, así como los comentarios en la fanpage de #mejorandola en facebook. Entra con Twitter Entra con Facebook 14 Comentarios hola / enero.29 blabla Matts / enero.04 sticchimatias.com.ar Aca hay una referencia muy completa de javascript: Esta en ingles pero es muy tecnico y sencillo de entender. Bumiga / enero.04 luli / diciembre.28 cdr / diciembre.21 Doctore

Inversion of Control Containers and the Dependency Injection pattern In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of "Inversion of Control". In this article I dig into how this pattern works, under the more specific name of "Dependency Injection", and contrast it with the Service Locator alternative. The choice between them is less important than the principle of separating configuration from use. One of the entertaining things about the enterprise Java world is the huge amount of activity in building alternatives to the mainstream J2EE technologies, much of it happening in open source. A lot of this is a reaction to the heavyweight complexity in the mainstream J2EE world, but much of it is also exploring alternatives and coming up with creative ideas. Components and Services A Naive Example class MovieLister...

Execution in the Kingdom of Nouns Hello, world! Today we're going to hear the story of Evil King Java and his quest for worldwide verb stamp-outage.1 Caution: This story does not have a happy ending. Before we begin the story, let's get some conceptual gunk out of the way. The Garbage Overfloweth All Java people love "use cases", so let's begin with a use case: namely, taking out the garbage. If you're a normal, everyday, garden-variety, English-speaking person, and you're asked to describe the act of taking out the garbage, you probably think about it roughly along these lines: get the garbage bag from under the sink carry it out to the garage dump it in the garbage can walk back inside wash your hands plop back down on the couch resume playing your video game (or whatever you were doing) Even if you don't think in English, you still probably still thought of a similar set of actions, except in your favorite language. Of course our thoughts are also filled with nouns. Change requires action. The Kingdom of Nouns Notes

The Changelog If you hadn’t heard, JSON API is a format for building awesome APIs on top of JSON. You can see other posts tagged with JSON API here. Recently, a new project related to JSON API was released: Fortune.js. Fortune.js, a web framework for prototyping rich hypermedia APIs, allows you to rapidly prototype the server side of any JSON API api. Check it out: This will give you all the proper routes and format the responses in the right way to conform with the spec. If you didn’t guess, fortune.js makes heavy use of Node, so you can get it from npm: $ npm install fortune I am super pumped about projects like this, because it shows off the great benefits of standardizing around a type like JSON API.

Stevey's Blog Rants: Execution in the Kingdom of Nouns Hello, world! Today we're going to hear the story of Evil King Java and his quest for worldwide verb stamp-outage.1 Caution: This story does not have a happy ending. It is neither a story for the faint of heart nor for the critical of mouth. If you're easily offended, or prone to being a disagreeable knave in blog comments, please stop reading now. Before we begin the story, let's get some conceptual gunk out of the way. The Garbage Overfloweth All Java people love "use cases", so let's begin with a use case: namely, taking out the garbage. If you're a normal, everyday, garden-variety, English-speaking person, and you're asked to describe the act of taking out the garbage, you probably think about it roughly along these lines: get the garbage bag from under the sink carry it out to the garage dump it in the garbage can walk back inside wash your hands plop back down on the couch resume playing your video game (or whatever you were doing) Of course our thoughts are also filled with nouns.

El Libro para Principiantes en Node.js» Un tutorial completo de node.js Sobre el Tutorial El objetivo de este documento es ayudarte a empezar con el desarrollo de aplicaciones para Node.js, enseñándote todo lo que necesites saber acerca de JavaScript "avanzado" sobre la marcha. Este tutorial va mucho más allá del típico manual "Hola Mundo". Status Estás leyendo la versión final de este libro, es decir, las actualizaciones solo serán hechas para corregir errores o para reflejar cambiar en nuevas versiones de Node.js. Las muestras de código de este libro están probadas para funcionar con la versión 0.6.11 de Node.js. Audiencia Objetivo Este documento probablemente será mejor entendido por los lectores que tengan un trasfondo similar al mío: Programadores experimentados en al menos un lenguaje orientado al objeto, como Ruby, Python, PHP o Java; poca experiencia con JavaScript, y ninguna experiencia en Node.js. Estructura de este documento Empezaremos por mirar cómo el desarrollo en JavaScript en Node.js es diferente del desarrollo en JavaScript en un browser. Ok.

Execution in the Kingdom of Nouns Hello, world! Today we're going to hear the story of Evil King Java and his quest for worldwide verb stamp-outage.1 Caution: This story does not have a happy ending. It is neither a story for the faint of heart nor for the critical of mouth. Before we begin the story, let's get some conceptual gunk out of the way. The Garbage Overfloweth All Java people love "use cases", so let's begin with a use case: namely, taking out the garbage. If you're a normal, everyday, garden-variety, English-speaking person, and you're asked to describe the act of taking out the garbage, you probably think about it roughly along these lines: get the garbage bag from under the sink carry it out to the garage dump it in the garbage can walk back inside wash your hands plop back down on the couch resume playing your video game (or whatever you were doing) Even if you don't think in English, you still probably still thought of a similar set of actions, except in your favorite language. Change requires action. Notes

Related:  node.js