background preloader

How do I get started with Node.js

How do I get started with Node.js

Getting into Node | On the JVM Updated 2011-04-27: forgot to add Backbone.js Most of the net is abuzz about Node , so it’s hard to miss it. I’ve been sitting on the sidelines for several months now, but after attending a TechTalksTO talk on Node given by James Duncan of Joyent, I’m convinced I should dive in. tl;dr version Like C, Javascript is here to stay. What is Node? Node is a server side Javascript implementation. To make full use of this fast underpinning, Node follows a non-blocking, fully asynchronous programming mode, and encourages libraries to follow its example. Why Node and Not Another Server Side Javascript? The best known server side Javascript implementation is Rhino. Are there any fast alternatives to Rhino on JVM? Most of the server side Javascript implementations didn’t grasp the importance of non-blocking, asynchronous I/O. Why Asynchronous? Asynchronous programming is usually associated with GUI development where everything is event driven and asynchronous. That’s why you want non-blocking I/O. Then run

Node Beginner Single Page Apps with Node.js. - blog While I was at nodeconf, I caught some of Henrik Joreteg's b-track talk which was an introduction to Single Page Apps. Node.js is a great platform for Single Page Apps because of it's real-time capabilities. This is a subject that has been obscured and confused by buzzwords and FUD. Henrik had a limited time to talk, so let's revisit this subject. First off, we need to clarify some nomenclature. Two characteristics clearly differentiate Web Sites from Web Apps. A Single Page App is just a Web App, but what's unique is the anatomy. Aside from the obvious gains in user experience such as not having to reload the entire page for content changes, there's a long term Return of Investment to this approach. The bottom line is that single page apps are efficient. What about SEO and the hash-bang shit storm I've been hearing about? Here's some art to try to explain the anatomy of a Single Page App. Single Page Apps are simple. SugarSkull Single Page App is a misleading inscription. Local Storage

An Absolute Beginner's Guide to Node.js There's no shortage of Node.js tutorials out there, but most of them cover specific use cases or topics that only apply when you've already got Node up and running. I see comments every once and awhile that sound something like, "I've downloaded Node, now what?" This tutorial answers that question and explains how to get started from the very beginning. What is Node.js? A lot of the confusion for newcomers to Node is misunderstanding exactly what it is. An important thing to realize is that Node is not a webserver. Installing Node Node.js is very easy to install. I've Installed Node, now what? Once installed you'll have access to a new command called "node". $ node > console.log('Hello World'); Hello World undefined In the above example I typed "console.log('Hello World')" into the shell and hit enter. The other way to run Node is by providing it a JavaScript file to execute. hello.js console.log('Hello World'); $ node hello.js Hello World Doing Something Useful - File I/O example_log.txt

node.js beginner tutorials 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. 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. NoSQL + Node.js + Buzzword Bullshit Good Use Cases JSON APIs Single page apps

Node.js Tuto Part1 Parmi les nombreuses technologies qui me passionnent actuellement, Node.js tient une place importante. 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

How to make Angry Birds – part 1 Hello and welcome back to my blog! This time I’m going to try something new. There are many tutorials for various techniques and tricks on the web, but what you don’t often see is one that takes you through the development of a game, step by step from start to finish. This is what I’m going to attempt here. I’m going to assume the reader is familiar with the basics of game development and I’m going to concentrate on the art and programming. Angry Birds So, the game I’m going to be making is to be based on the extremely popular Angry Birds by Rovio, a AAA title which cost some $140k USD to make. Angry Birds Obviously, since its just me making this I will have to take a few short-cuts and will be concentrating on the core part of the game. Cloning Before I start I should mention that I do not condone the cloning of games in any way; what I’m doing in these tutorials is purely for educational purposes and I have no plans to release the game at the end of this. Analysis Graphics Code Camera Physics

The Node Beginner Book » A comprehensive Node.js tutorial How To Node - NodeJS Max Ogden Blogotronz Description of and notes on the node.js Stream API There is also a screencast version of this article. node bills itself as JavaScript evented I/O. In a nutshell that means if you are trying to solve a problem that is I/O bound (the limiting factor is reading/writing to relatively slow interfaces) then node can provide some useful abstractions to you. "Streams in node are one of the rare occasions when doing something the fast way is actually easier. -@dominictarr in his high level node style guide The main tool in node's evented toolbox is the Stream. Readable Readable streams will emit data events each time they get a "chunk" of data and then they will emit end when they are all finished. emit (from EventEmitter) is the observer pattern - a publish/subscribe pattern which allows a number of observer objects to see an event. Readable streams can also be paused and resumed, and it's up to the Stream implementer to write the pause() and resume() methods. Writable Simplified writable stream

Node.js Tuto Part2 Suite de la série de billets consacrés à Node.js. Après une petite introduction de ce serveur Javascript, nous allons faire un petit tour du côté des environnements de développement. Un précédent article de Web Tambouille avait déjà détaillé comment débuguer une application Node par Eclipse ou à l’aide de node-inspector. Je vais donc vous présenter un tout autre IDE à savoir Cloud9. Au menu : Yet another Javascript IDE, installation, utilisation, points forts, points faibles, roadmap et une petite conclusion. Node.js partie 1 - Tout ce que vous devez savoir sur Node.jsNode.js partie 2 - Cloud9 : IDE pour le développement Javascript et Node.jsNode.js partie 3 - Première application Node.js et HTML5Node.js partie 4 - Déploiement sur le Cloud avec Nodester : Node.js, NPM, REST, Amazon EC2 et Git Yet Another Javascript IDE ? Cloud9 est un IDE spécialement conçu pour les développeurs Javascript. . We want to be to Eclipse what Google Docs is to Microsoft Word (citation) Installation Utilisation

25 Apache Performance Tuning Tips at SysAdmin Tips and Tools We all know and love Apache. Its great, it allows us to run websites on the Internet with minimal configuration and administration. However, this same ease of flexibility and lack of tuning, is typically what leads Apache to becoming a memory hog. Apache Specifics 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. OS Specifics 17. 18. 19. Application Specifics 20. 21. 22. 23. 24. 25. And one more tip. Do you know more tips? See also Integrate Apache Monitoring into Monitis.com Best practices of building a website using node.js

Related: