A system for making online or offline applications
The Node.js environment is essentially made of five components, each with software selected by the developer.
An overview of the Node.js ecosystem. It is neither exhaustive nor definitive, on the contrary, it is an area in constant development.
As seen, the main components of the environment besides Node.js API are the backend, extensions, interface with the client and the client itself, an application or a page with a possible framework .
In fact the interface is divided into a server part and client part, and we have some freedom to place the essential on one side or the other. Here are details on how programs can be used to fill the role of each component.
Async.js to move to parallel or in synchronous mode if you want. The main complaint against Node is stacking all the callbacks that go along with the asynchronous mode, which is also the main advantage of the system.
With Async, you get rid of callbacks and we get closer to the simplicity of the Go language coroutines
It can replace MySQL which is less suitable for a website, even if the second application is suitable for storing data such as login and password. CouchDB is slower than MySQL and is not relational, however.
It can manage documentation and possibly with a view template as does Wordpress. Wordpress template is actually PHP code, which can also be used in backend with Node.js, as it is shown on this site.
There are products like couchbase, a mobile server, and others are underway. An alternative is MongoDB, which also stores documents to JSON, is faster but less suitable for mobile. CouchDB uses HTTP but not MongoDB. Look at this compararison.
If you want something lighter, in the SQLite style (which also works with Node.js), but easy to distribute with an application, a manager himself wrote in JS as NeDB is the best solution.
Another solution at the time of choice is to use an intermediate library such as Knex.js which facilitates queries and interfaces with most DB.
BinaryJS facilitates the exchange of binary files between Node and the browser, throught WebSocket. May be used for images or video or audio streaming.
Interface: Server-side frameworks
Help to create pages and therefore have the same role that PHP or ROR. With these modules, Node.js can replace a conventional CMS written in PHP, Java or other language.
They serve as backend for web applications, and provide useful services such as connection to a database.
Application framework Mojito runs on Linux and is based on YUI, but is transformed into a backend module for use in an online application. The same framework can be used by the client. It creates components running on the server or the client.
Node.js is not a server but a framework to achieve a page server or application by a script using the API it provides.
Nginx is a server that can serve as a front-end to Node.js on a dedicated hosting. It is used for static websites, while Node.js alone is used for online applications.
Client side frameworks
They are also possibly server side framework, if they have a part implemented in a module, but they are supplemented by a client side API. A framework purely client would be something like jQuery or any other Ajax framework.
We must always start with a node server script, but it is reduced, all the logic is moved client side.
It is extensible, you can create a file to include for any module.
It does not use npm, unlike Derby, which is another MVC framework, and another alternative to ROR.
Meteor can't be used easily with other frameworks or interfaces built for other frameworks. The application must be designed with Meteor from the ground.
It has its own protocol for communication between the client and Node.js on the server named DDP (Distributed Data Protocol) based on JSON. Just declare Meteor.publish on the server and Meteor.subscribe on the client, and the system manages all data exchanges automatically.
Vous pouvez tester votre code sur un terrain de jeu.
Actions automation in the browser, front-end to Phantom.js. Besides the fact that it simulates the behavior of a user, it also eliminates callbacks and write processes in linear form. Phantom is not toutjours stable depending on the version.
Similar tools: Dalek.js, SeleniumHQ a plugin for Firefox.
Node without a browser
Modules for use Node as a server and processing data.
Defined as a headless browser, the purpose of this tool is to manipulate web pages in the background, or create HTML or SVG content, thanks to the webkit rendering engine that is integrated. The advantage over a browser is to have absolute control on the page as an object and how it displays the contents.
Phantom.js even if it includes a server, can be used with Node.js and then allows to integrate WebKit in this environment.
We can make a module and use it in conjunction with Express.js.
Maybe we should add a definition of Headless Browser... This is not a browser without head, but without a display, thus allowing to process pages with a program. You can still show them when you want.
Adding Qt as a module, you can make an interface that requires no browser and connect to other Node modules. It appears therefore windows on the desktop for presenting content.
The beginning of Node.js based CMS with modules to create a blog, static or dynamic.
There are few shared hosts that offer a Node.js server. The Github pages service can effectively host your application for free. Another solution is to use a virtual server, which can be obtained for € 5 per month.
Your content is hosted on GitHub. The module allows to display it as a website. Node-blog by the same author is a specialized version used for a demo site that shows it can be used in production.
Alternative to HTML, you create your site locally with a code editor and after page generation, we update the remote site, on a conventional server.
A framework to create a mail server, and communicate via JSON.
Tools for natural language processing as a module integrating many algorithms. By adding the module to an application, to access these methods to process text entries and interpret them.
This can be supplemented by Sentimental, a recognition module feelings to make programs more responsive.
Utilities and tools
Implementation of the Unix shell on Node.js. Allows the use of commands that we know as mkdir, ls, grep, etc. As well as make. Also runs on Windows.
Allows you to execute functions on the server from the browser.
To create XML documents, read or write. The serialization tool Node-Swiz, can convert and save objects to XML or JSON, so also convert between these two formats.