Recently I’ve been working with both the HTML 5 File API and Socket.IO and it occured to me that those technologies could be used to send, and push, files between the client and server. Immediately I set about making delivery.js, a simple node module that makes it extremely easy to send and push files between the client and the server via Socket.IO.
La première fois qu’on utilise les websockets, on se dit que c’est compliqué (pas tant que ça en fait). Puis on utilise socket.io, et on se dit que c’est vraiment super simple Et puis un jour on aimerait bien sécuriser la connexion au socket, parce que la partie « temps réel » nécessite d’être authentifié, ou simplement parce qu’il faut un pré-requis (comme avoir donné son nom avant de pouvoir chatter) avant que l’écoute ne démarre réellement.
Node.js is pretty freakin' awesome, yes. But it's also been hyped up more than an Apple gadget. As pointed out by Eric Florenzano on his blog a LOT of the original excitement of server-side JS was due to the ability to share code between client and server. However, instead, the first thing everybody did is start porting all the existing tools and frameworks to node. Faster and better, perhaps, but it's still largely the same 'ol thing. Where's the paradigm shift? Where's the code reuse?!
Jed parses plural forms using a grammar instead of running eval. This results in both safer and faster plural-form function generations. The jison grammar that was used to generate the parser is included in the source.
Hey guys. I thought it might be helpful to put together a list of some of the tools I use in my workflow these days in case it's useful. Please feel free to check them out (or share your own toolbox) if you think it would be of assistance to others.
In the course of my work I see a lot of code. Sample projects, full applications, frameworks, and proofs-of-concept have all crossed my desk at one time or another. In the labs at WWDC I see various bits of code which are giving developers trouble. The source of the project doesn’t seem to matter much; the problem is the same.
PHP Bug Lost is a one-file script PHP debug and monitoring console. Include it in your script and: send log messages, view SQL queries (sends an email to the admin if there's an error), measure times and memory usage (sends emails for long loading times or excessive memory usage), see all the vars in your scripts and view all your AJAX queries (send params and responses).
There is no official document that governs the style of node.js applications. This guide is my opinionated attempt to bring you a good set of instructions that will allow you to create beautiful and consistent software.
This guide assumes that you are only targeting node.js. If your code also needs to run in the browser or other environments, please ignore some of it.
Node’s module system is deceptively clever. On the surface it seems like it provides just enough functionality to get by, but it can go a long way towards helping to structure an application elegantly. Node’s official documentation covers all of the major features, yet many modules sent in for review at DailyJS don’t use these techniques where they could.
For this article I’ll be using Express applications as an example, but these techniques can be applied to any Node application, whether it’s a command-line tool or TCP service.
Trello started as an HTML mockup that Justin and Bobby, the Trello design team, put together in a week. I was floored by how cool it looked and felt. Since Daniel and I joined the project to prototype and build Trello, the challenge for the team has been to keep the snappy feeling of the initial mockups while creating a solid server and a maintainable client.