background preloader

Modules · joyent/node Wiki

Modules · joyent/node Wiki
This page is deprecated. Feel free to add to it, but be advised that it is, at best, a faded relic of Node modules that were written before npm was a dominant force in the Node.js ecosystem. It is not all that useful any more. If you are a newcomer, it can be handy to at least get a starting point. So, this list is long enough to be intimidating, but still only captures a tiny sliver of the Node.js modules you can use with your program. Search for modules with, node-modules, node-toolbox and nipster. The archaic contents of this once-useful page now follow. Adding to this page When you add a framework to this page, have a look at how others have done so, it should be a single item, with a link to the project's source code, and a short description (one line after formatting has been applied). If you see a module without a description, feel free to edit the page and add it in, any contributions are appreciated. Table of contents Modules Web frameworks Routers Static file servers Related:  Node JS

Полезные инструменты, туториалы и ресурсы Созданый Райаном Далем в 2009 году, Node.js — относительно новая технология, завоевавшая в последнее время большую популярность среди веб-разработчиков. Однако, до сих пор не каждый знает, что на самом деле Node.js это серверная JavaScript среда, использующая асинхронную событийную модель. Что это означает? Все просто: это среда, которая предназначена для написания масштабируемых, высокопроизводительных приложений. Почти как Ruby’s Event Machine или Python’s Twisted, но гораздо глубже — JavaScript реализовывает цикл событий, на уровне самого языка, а не как отдельная библиотека. И это еще не все: то, что действительно круто в Node.js — это тысячи модулей, доступных для любых целей, а также активниешее сообщество этого молодого проекта. Полезные инструменты Node.js Node Express Boilerplate Node Express Boilerplate позволяет начать проект с чистого листа, но при этом сразу же обеспечивает решение всех тех рутинных задач, которые зачастую могут сорвать проект еще до того, как он начат.

Node.JS + WebSocket = near real offline/online check « Simple API The problem is well know : the online/offline state is not reliable on many browser, this create a difficult situation for developers who wants to create an offline solution : if you don’t know when the client is online or offline, this became difficult to manage (for example) a local backup before having a new connection. Note : if you already use, you can combine with existing one, because here I only use basic event from (in this case, you only need the client part). With this simple trick on client side and server side, I was able to manage (at +/- 5sec) a good online/offline test : Server : Here I use console from previous page here but if you don’t want, just replace "cs." by "console." Just pass a to this module like this : That’s all, we create in fact a basic (most basic one), ping system from : this system got nothing except connect/disconnect event, which is enough for us in this case. Client : Like this: J'aime chargement…

Perfection kills » Understanding delete A couple of weeks ago, I had a chance to glance through Stoyan Stefanov’s Object-Oriented Javascript. The book had an exceptionally high rating on Amazon (12 reviews with 5 stars), so I was curious to see if it was something worth recommending. I started reading through chapter on functions, and really enjoyed the way things were explained there; the flow of examples was structured in such nice, progressive way, it seemed even beginners would grasp it easily. However, almost immediately I stumbled upon an interesting misconception present throughout the entire chapter — deleting functions. The book claims that “function is treated as a normal variable—it can be copied to a different variable and even deleted.”. >>> var sum = function(a, b) {return a + b;} >>> var add = sum; >>> delete sum true >>> typeof sum; "undefined" Ignoring a couple of missing semicolons, can you see what’s wrong with this snippet? So what’s going on in this example? Theory§ but not variables, declared like this:

livelycode/aws-lib - GitHub node blog npm The Naked Technologist » and Node.js Article Now Available in August JSMag Inheritance and Initialization in Node.js Javascript inheritance is an interesting topic, rife with pitfalls for the unwary, and this is no less true in node.js than in any other modern application of Javascript. For example, this is a common gotcha that I noted while translating thywill-python, an experiment-with-slash-exploration-of Comet frameworks, into node.js. Let's say I have a hierarchy of classes, A, B, and C, which extend out from EventEmitter as follows: The function util.inherits(subclass, superclass) is a shortcut for one of the methods of Javascript inheritance, provided in core node.js, and it looks like this under the hood: Note that you'd have to be using Chrome or Firefox 4 if you want that to work on a web page - Object.create is a comparatively recent addition to Javascript. In this example, my particular need is for all instances of subclasses of B (i.e. instances of C in this case) to notify a central repository of their existence and then emit an event marking their creation.

caolan/async - GitHub