background preloader

Javascript

Facebook Twitter

Questionnaire

Outils. Articles. Librairies. JavaScript Garden. Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace.

JavaScript Garden

Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. In the case that it reaches the global scope and still has not found the requested name, it will raise a ReferenceError. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications. // global scopevar foo = 42;function test() { // local scope foo = 21;}test();foo; // 21 Local Variables var foo = 3; bar = 4;}test(10); Hoisting.

Node.js. 6 Free E-Books and Tutorials for Learning and Mastering Node.js. OK, we won't bore you by telling you what Node.js is again or why it's so dang hot.

6 Free E-Books and Tutorials for Learning and Mastering Node.js

You want to learn Node.js? There's no completely finished Node.js book out there that we're aware of. But there's one complete book in rough draft form, two partial guides and several other great resources for learning Node.js. The Node Beginner Book. Socket.IO: the cross-browser WebSocket for realtime apps.

Felix's Node.js Convincing the boss guide. « Home / All Guides Now that you're all hyped up about using node.js, it's time to convince your boss.

Felix's Node.js Convincing the boss guide

Well, maybe. I have had the pleasure of consulting for different businesses on whether node.js is the right technology, and sometimes the answer is simply no. So this guide is my opinionated collection of advice for those of you that want to explore whether node.js makes sense for their business, and if so, how to convince the management. Bad Use Cases CPU heavy apps Even though I love node.js, there are several use cases where it simply doesn't make sense.

That being said, node.js allows you to easily write C++ addons, so you could certainly use it as a scripting engine on top of your super-secret algorithms. Simple CRUD / HTML apps While node.js will eventually be a fun tool for writing all kinds of web applications, you shouldn't expect it to provide you with more benefits than PHP, Ruby or Python at this point. Node.js partie 1 - Tout ce que vous devez savoir sur Node.js. Parmi les nombreuses technologies qui me passionnent actuellement, Node.js tient une place importante.

Node.js partie 1 - Tout ce que vous devez savoir sur Node.js

Et pour plusieurs raisons : développement Javascript côté serveur, gestion des entrées/sorties de manières non bloquantes, communauté très présente avec de nombreux modules comme Socket.IO et bien d’autres choses encore. C’est pour toutes ces raisons, et aussi parce que la nouvelle version 0.4.0 vient de sortir, que Web Tambouille vous propose une série de 4 billets consacrée exclusivement à votre futur serveur préféré : Node ! Et cela commence dès aujourd’hui avec une petite introduction générale du serveur, ses concepts, les interviews et autres vidéos à ne pas manquer, les liens à connaître… bref un condensé de tout ce que vous devez absolument savoir sur Node !

Présentation Node s’appuie sur V8, le moteur Javascript de Google utilisé dans Chrome, qui fait partie des moteurs Javascript les plus puissants du marché actuellement. Prenons l’exemple du serveur Apache. Juste pour pinailler. Introduction à node.js - Damien MATHIEU. JSON. Object {} { members } members pair pair , members pair string : value array [] [ elements ] elements value value , elements value string number object array true false null string "" " chars "

JSON