background preloader

Addyosmani/todomvc - GitHub

Addyosmani/todomvc - GitHub
Related:  Angular 2.0

Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! TypeScript/ at master · Microsoft/TypeScript 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.

Angular 2.0 examples Author: Torgeir Helgevold Published: Sat Jun 06 2015 Viewed 18404 times Angular 2.0 is currently just available as an alpha release, but it's at least possible to use the alpha release as a way to get a feel for the general direction of the new framework. To learn more about new concepts I've created a repo for demoing some sample Angular 2.0 components I've created. I have put my code into a repo on GitHub, so feel free to check it out. I intend to add to this as I learn about new features, so stay tuned for more! Here is a live demo of the components. More details about individual components here: Angular 2.0 articles Update: The samples assume Angular version 2.0.0-alpha.44

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.

What are the pros and cons of Angular 2.0 and Ember 2.0? 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 ( 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: = 'Remy'; console.log(;

Angular 2.0 Concerns Addressed at ng-conf 2015 After details of Angular 2.0 emerged in October 2014, the community uproar caught the Angular team by surprise. Angular core team members Brad Green and Igor Minar took to the stage at ng-conf 2015 to address these concerns. One of the biggest worries was about how long Google was going to support version 1.X. The team will look at the traffic to both sites, along with GitHub, in order to determine where the community is still invested. One of the biggest surprise features of Angular 2 was AtScript, the TypeScript superset used to build Angular 2 apps. A huge complaint about Angular 2 was that there was no migration path. As far as a ship date, Green mentioned that the first production Angular 2.0 app at Google will ship in May 2015. ng-conf 2015 is streaming live at

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 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

Getting Started with Angular 2.0 Recently Angularjs team has launched a 5 mins quick start tutorial on getting started with Angular 2.0. I have taken the same tutorial (with minor changes) and explained it below. There are a lot of blanks to be filled, but this is my first attempt at Angular 2.0. You can find the source code for the Hello World app built in this post here. So, let us get started with NG2.0. What is Angular 2.0? AngularJS 2 is a framework for mobile apps. You can read more about Angular 2.0 and its proposed features from here. 5min Tutorial by Angular Team Angular team has released a tutorial on how to get started, where they explain how to setup the project and run a simple Hello World example. We will follow the same here. To get started, create a new folder named ng2 and open a new terminal/prompt here. Make sure you have Git installed, and run git clone hello2ng2 This will clone the quick start project to hello2ng2 folder. Do notice the directory structure npm install

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.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: <?

Creating a Super Simple Todo app Using Angular 2 —Tutorial Angular 2 is already popular and so many JavaScript developers are eagerly waiting to try it out. You may have the idea that Angular 2 is going to introduce a lot of new & exciting features and remove several old concepts. So, in this tutorial I will show you how to create a super simple Todo app using Angular 2.0. In the process you will also learn how to use Components, Templates, Data Binding and a few other important stuff. Angular 2 is currently in Alpha preview and changing rapidly. Here is a demo for you to check out. Getting the Seed App Angular team has put together a simple quick start app that provides you with all the dependencies required to write Angular 2 apps. Now you can open the app in your favourite text editor and start modifying it. Creating Components In Angular 1.x we have directives. Go the root directory and create a file called TodoApp.es6. Explanation The first two statements are used to import ES6 modules. class TodoApp{ } Creating the Service add()

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

Change Detection in Angular 2 | Victor Savkin In this article I will talk in depth about the Angular 2 change detection system. Updated: Jan 4, 2016 High-Level Overview An Angular 2 application is a tree of components. An Angular 2 application is a reactive system, with change detection being the core of it. Every component gets a change detector responsible for checking the bindings defined in its template. In Angular 2 does not have a generic mechanism implementing two-way data-bindings (But you can still implement the two-way data binding behavior and ng-model. How Fast Is It? By default the change detection goes through every node of the tree to see if it changed, and it does it on every browser event. Angular has to be conservative and run all the checks every single time because the JavaScript language does not give us object mutation guarantees. Immutable Objects If a component depends only on its input properties, and they are immutable, then this component can change if and only if one of its input properties changes. Summary