
Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! HTML5 Canvas Wrapper Libraries Based On Javascript The Canvas API represents a way of creating shapes, graphs and animations using just JavaScript and which, unlike Flash, doesn’t require a plug-in installed on the viewer’s computer. While HTMl5 may not have the same capabilities as Flash does when it comes to animations, many people put their hopes in the canvas tag. The limitations that are present are due to the fact that the canvas element was never designed to build animations with it, unlike Flash. HTML5 Canvas libraries aim to wrap the Canvas element and extend it one way or another to make a better syntax and functionality. Paper.js Paper.js is an open source vector graphics scripting framework that runs on top of the HTML5 Canvas. Artisan JS: A JavaScript library that aims to make in-browser drawing easy EaselJS EaselJS provides straight forward solutions for working with rich graphics and interactivity with HTML5 Canvas. KineticJS Fabric.js Fabric.js is a powerful and simple Javascript canvas library. Cake.js oCanvas jCanvaScript
HTML5 Image Effects App – Adding Noise and Invert HTML5 Image Effects App – Adding Noise and Invert Today we continue HTML5 canvas examples, I hope you enjoy this series of articles. Even for me, working with graphics, images brings pleasure. Here are our demo and downloadable package: Live Demo download in package Ok, download the example files and lets start coding ! Step 1. Here are all html of my demo index.html What I did since last our version. Step 2. Here are used CSS styles. css/main.css Step 3. Since today I don`t will publich whole script code again and again, but will publish our new functions which we using. js/script.js We will generate colored noise. Invert function is pretty easy, we will subtract current color value from 255 (white). Conclusion Not bad, isn`t it? If you enjoy our articles, feel free to share our tutorials with your friends.
lorempixel - placeholder images for every case Essential JavaScript Namespacing Patterns In this post, I'll be discussing both intermediate and advanced patterns and approaches for namespacing in JavaScript. We're going to begin with the latter as I believe many of my readers have some prior experience in this area. If however you're new to namespacing with the language and would like to learn more about some of the fundamentals, please feel free to skip to the section titled 'namespacing fundamentals' to continue reading. What is namespacing? In many programming languages, namespacing is a technique employed to avoid collisions with other objects or variables in the global namespace. In JavaScript, namespacing at an enterprise level is critical as it's important to safeguard your code from breaking in the event of another script on the page using the same variable or method names as you are. Whilst JavaScript doesn't really have built-in support for namespaces like other languages, it does have objects and closures which can be used to achieve a similar effect. 2. 3. 4. 5.
jorgebastida/glue Storing Data the Simple HTML5 Way (and a few tricks you might not have known) Yes indeed people, it’s your favourite HTML5 Doctor with JavaScript knowledge who lives in Brighton near a golf course! I’m also shooting for the longest title we’ve published so far – and I think I’m in the lead. This post is about the Web Storage API. Web Storage is a very, very simple way to store data in the client – i.e. the browser. This post however will just focus on the features of Web Storage and hopefully show you a trick or two you may not have known about. What Web Storage Does Using JavaScript, Web Storage makes it possible to easily store arbitrary values in the browser. There are two versions of Web Storage: local and session. Any data stored is tied to the document origin, in that it’s tied to the specific protocol (http or https, etc), the host (html5doctor.com) and the port (usually port 80). Get Storing The API for localStorage and sessionStorage is exactly the same, and distills down to the following methods: localStorage.name = 'Remy'; console.log(localStorage.name);
enchant.js - HTML5 + JavaScript Game Engine Starting out There are several ways to create games and applications in enchant.js. Please note that this list does not include the Maeda Block development environment derived from enchant.js. develop using code.9leapdevelop using jsdo.itdevelop with the file systemdevelop on a local serverdevelop on a remote server Develop using code.9leap code.9leap is both a development environment and a learning environment for creating simple games in enchant.js. Develop using jsdo.it jsdo.it is a web development environment sponsored by KAYAC Inc., which can also be used for enchant.js. Develop with the (local) file system This method is easiest for those already familiar with JavaScript. For example, please open the file /examples/beginners/hellobear/index.html, included in the download package (live version) in your browser. Due to the specs of some browsers[1] such as Google Chrome and Firefox not supporting certain functions, some games may be prevented from starting. Developing with a web server
How to Convert XML to a JSON-Like JavaScript Object In my post How to Create an XML to JSON Proxy Server in PHP we created a system which translated XML messages into Ajax-ready JSON. That’s great if you’re running PHP or another suitable server-side process. But what if you’re limited to JavaScript only? Randomly accessing data from an XML document isn’t fun. The XML2jsobj Function We’re going to write a function which recursively analyzes each node of an XML document’s DOM tree and returns a JavaScript object. function XML2jsobj(node) { var data = {}; We’ll now define an Add() function within XML2jsobj. // append a value function Add(name, value) { if (data[name]) { if (data[name].constructor ! We now require a loop to examine the XML node’s attributes (e.g. // element attributes var c, cn; for (c = 0; cn = node.attributes; c++) { Add(cn.name, cn.value); } The next loop examines all child nodes. Finally, we return the data object to our calling function: return data; } Converting XML Our Ajax call can retrieve XML from a web service: <?
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. 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
Programmation fonctionnelle en Javascript Parmi les sujets qui nous ont occupés en 2010, je retiendrai une fois de plus l’intérêt croissant des grands du Web pour la Programmation Fonctionnelle (Scala, F#…). Un paradigme qui, s’il est bien appliqué, permet d’avoir un code complètement réutilisable grâce aux objets immutables (pas de modification ni de partage d’état), aux fonctions en tant que type (String, Integer et maintenant Function)… mais aussi de construire des applications hautement disponibles. Pour une introduction de la programmation fonctionnelle, je vous renvoie vers l’excellent article sur haskell.org. Mais ce ne sont pas que les grands du Web qui en auront besoin, en effet nos architectures orientée web ou WOA (Web Oriented Architecture) vont aussi avoir besoin de la programmation fonctionnelle et cette vidéo nous le prouve. Nous allons voir comment écrire un code de manière fonctionnelle en Javascript ou plutôt comment transformer un code Javascript de tous les jours en code Javascript fonctionnelle. Conclusion
JavaScript Project Generator ImagePreloader - Un plugin JQuery pour précharger vos images JQuery Image Preloader est un plugin JQuery pour précharger des images en fond dans le but d'accélérer le chargement de vos pages. Vous le savez certainement, la nouvelle mode dans le Web consiste à optimiser le temps de chargement de vos pages à l'aide de Sprites CSS par exemple, en minifiant vos codes JS et CSS, en réduisant le plus possible le nombres de requêtes vers des médias (Images, vidéos, scripts...) ou encore via des logiciels pour compresser au maximum vos images. Les moteurs de recherche tiennent désomais en compte la métrique d temps de chargement des pages web dans leurs algorithmes. Le concept: Lorsque tous les chargements d'une page ont été effectués, il ne se passe plus grand chose, et vous pourriez charger des images présentes sur d'autres pages du site en attendant. On y gagne, une fois de plus, en temps de chargement. Et c'est ce que permet le script de pré-chargement d'images, il vous permet de charger en fond des images qui figurent sur d'autres pages de votre site.
Symfony2 - Les nouveautés + résumé Symfony Live 2011 Nous revenons de deux jours de Symfony Live 2011 à Paris avec le plein de nouveautés pour Symfony2. Les nouveautés de Symfony2 Symfony2 est en cours de stabilisation. Fabien Potencier a fait du teasing lors de la Keynote de clôture du Symfony Live 2011 ! Nouveau site pour Symfony2 Un nouveau logo, un nouveau site et un nouveau nom de domaine pour Symfony2: Différentes distributions du framework Symfony2 à télécharger Différentes distributions du framework seront téléchargeables suivant l'utilisation souhaitée. Une édition standardUne édition CMS: Plus adapté à la gestion de contenusUne édition SandboxUne édition Hello World: La version de bench sur le fameux hello world (joke) Ce système de distributions, bien connu dans le monde linux, est intéressant pour disposer rapidement du framework prêt à emploi. Au début, seule la "Symfony2 Standart Edition" est disponible. Un installeur / configurateur web pour Symfony2 Un reportage vidéo du Symfony Live 2011 par PHPTv Par PHPTv