Node.js & Express: comment packager et partager ses applications « naholyr. S’il y a bien une chose qui craint avec les technologies « cool » et récentes, c’est la doc.
Et Node.JS (ou plutôt la grande majorité de ses modules, car l’API de Node elle-même est plutôt bien documentée) n’échappe pas à la règle, et les contributions de @visionmedia quoi que d’excellentes facture et très populaires, en sont hélas une illustration Du coup, il y a des fonctionnalités qu’on ne découvre qu’en farfouillant dans le code… Je refléchissais en ce moment à un moyen de « packager » les applications Express dans Node.JS, de manière à les réutiliser. Naïvement, j’étais persuadé que ça n’était pas possible, et je suis parti dans le développement d’un framework permettant de simplifier ce packaging, avec des vues embarquées, etc… Naïf, oui, car évidemment cette fonctionnalité existe déjà dans Connect (la couche sous Express): quand on appelle app.use(une_autre_app), c’est comme si on « fusionnait » les deux applications.
L’application à partager Réutiliser l’application On a ainsi: Mobile Web Development in Express.js (Node.js) These days it is mandatory to have a cross-platform mobile version of any website online.
If you are on a commercial endeavor, not having a mobile website could mean loss of revenue. The Internet, after all, is very serious business. So what is in store for the awesome Node.js developers who have been cranking out amazing websites using the Express framework? Is developing a mobile version of a website easy in Node.js? Will I need to put tons of conditions checks in the Jade templates to make my website mobile-compatible? Good news greets you today - Express.js framework in very mobile friendly because of its extremely flexible nature.
The secret to easy mobile website development is Express.js' view rendering. For those technical enough, all you have to do is detect mobile browsers and render a different view for their requests. Now I will explain the process to whoever could make little or no sense out of the last sentence. You will need to pass in the req Express object to is_mobile(). Useful Node.js Tools, Tutorials And Resources - Smashing Coding. Advertisement Created by Ryan Dahl in 2009, Node.js is a relatively new technology which has gained a lot of popularity among Web developers recently.
However, not everyone knows what it really is. Node.js is essentially a server-side JavaScript environment that uses an asynchronous event-driven model. What this means is simple: it’s an environment which is intended for writing scalable, high performance network applications. It’s like Ruby’s Event Machine or Python’s Twisted, but it takes the event model a bit further—it presents the event loop as a language construct instead of as a library. And that’s not all: what’s really great about Node.js is the thousands of modules available for any purpose, as well as the vibrant community behind this young project. Useful Node.js Tools Socket.IO Socket.IO is a cross-browser Web socket that aims to make real-time apps possible in every browser and mobile device, blurring the distinctions between the various transport mechanisms. Related Posts.