background preloader

Badass JavaScript

Badass JavaScript

Backbone.js, now realtime with Pusher - Realtime Blog This tutorial was written by Micheil Smith Recently there have been a number of frameworks developed that allow you to add extra structure to your code when building rich javascript-heavy applications. These frameworks often achieve this structure by adding in layers of Models, Controllers, Views, and Events, most of the time performing synchronisation between the client and server using AJAX. One such framework that has recently grown in popularity is Backbone.js. Update: The code associated with this post has been updated to use Backbone.js 0.5.3 and Underscore.js 1.2.1 Backbone.js Backbone.js is a framework from DocumentCloud, which is known for it’s excellent documentation. Normally when using Backbone.js, you would have to implement your own timer and polling mechanism to check for changes on the server. // Poll every 10 seconds to keep the channel model up-to-date. setInterval(function() { channel.fetch(); }, 10000); Making Backbone.js realtime with Pusher ruby – items_controller.rb

Sylvester - Vector and Matrix math for JavaScript Best of JavaScript, HTML5 & CSS3 - Week of September 10, 2012 : Remote Synthesis Best of JavaScript, HTML5 & CSS3 - Week of September 10, 2012 Posted on Sep 17, 2012 Lots of tutorials this week and, even though there were fewer new library releases, the Yoeman release garnered a ton of attention and a number of follow up posts, including a beginner tutorial on the Adobe Developer Connection thanks to Andy Matthews. Tutorials Eric Bidelman created a demo that captures live video from the webcam and creates a .webm file from it.Creating .webm video from getUserMedia() Pragmatic.js is a new style guide for JavaScript by Thomas Fuchs based upon his work on Zepto.Pragmatic.js—A pragmatic style guide to JavaScript A really fascinating article on complexities of scaling pixels in canvas for browser based game development by Dominic Szablewski.Drawing Pixels is Hard Dr. Hugo Giraudel created some really nice button switches using checkboxes and CSS3.Button Switches with Checkboxes and CSS3 Fanciness Frameworks and Libraries Yeoman isn't supported on Windows (yet!) Mobile Etc.

web3d-blog | all things web3d, 3d internet and virtual worlds – by Dirk Krause Nouvelle Vague by ultranoir 80 Awesome Twitter Bootstrap Templates To Get You Started Twitter Bootstrap is a powerful and easy to use framework enabling front-end developers to craft professional and high quality Bootstrap templates with flexible responsive layouts that look great on tablets, mobiles and desktops. Since its release back in august 2011 the development community has been growing fast, providing developers with the tools and knowledge to create ready-to-use, native Bootstrap html/CSS templates or themes that work on popular publishing platforms like WordPress and Joomla. One of the main reasons why Bootstrap is so popular is the ability to develop web apps and websites fast and its support for responsive design. When compared to other responsive CSS frameworks available it is also one the most mature frameworks with the largest user base at the moment, which certainly will have a positive effect on how mobile friendly websites are build. To help you get started, I have collected a list of my favorite Twitter Bootstrap templates. Article Index Site Templates

SimpleYUI is a new way of loading and instantiating YUI. The SimpleYUI file contains a rollup of basic Ajax library functionality: DOM tasks, event abstraction, transitions, and Ajax. Unlike other ways of loading YUI, SimpleYUI creates a YUI instance immediately upon loading, binding all included components to a global Y . Using SimpleYUI is easy: src= " > //Y is ready to use; no instantiation necessary: Y . one ( "#foo" ). addClass ( "highlight" ); Work with the DOM SimpleYUI gives you all of the standard DOM interactions in the YUI 3 API: //get an element reference, add a click handler Y . one ( '#demo' ). on ( 'click' , function ( e ) { /*handle click*/ }); //add content to an element Y . one ( '#demo' ). append ( " Additional content added to #demo." ); //listen for any click on any that descends from #demo: Y . one ( '#demo' ). delegate ( 'click' , function ( e ) { /*handle clidk*/ }, 'li' ); Create UI Effects opacity : 0 Ajax

Yeoman, At Your Service. When kicking off a new application, we always seem to have libraries we need to manually find and add, boilerplate code that needs to be written and a thorough build and testing process we need to get setup. Today we’re excited to announce the launch of Yeoman – a project which hopes to simplify these steps in your developer workflow. Package management At the moment, adding and managing the libraries used in our applications is a very manual process for most developers. Take jQuery: navigate to the project page for the library, grab the latest version and then have to manually save or copy it into our project. With Yeoman, this can be done using one line in your terminal: yeoman install jquery. When jQuery releases a new version, we no longer have to go back to jQuery.com to fetch it. Thanks to Jacob Thornton, Alex MacCaw and their team for working on the Bower registry solution that makes these libraries available. Generators – scaffolds for your projects LiveReload Watch Process Feedback

Blogs 35 top examples of JavaScript | JavaScript JavaScript creates platforms that can engage a user and ensure that they remember your site and continue to revisit. It can be used to create games, APIs, scrolling abilities and much more. The internet is full of web design inspiration, including great examples of JavaScript being used to bring a website to life and provide great user experiences. Here we pick some of our favourite examples of JavaScript in action for your inspiration. 01. If you've ever watched Cosmos, you may remember Carl Sagan talking about the Cosmic Calendar. 14 billion years of events is a huge dataset, and displaying it in a browser is no easy task. The son of a historian, Stauber created Histography as a student at Bezalel Academy of Arts and Design, under the guidance of Ronel Mor. The site scans and indexes events from Wikipedia, grabs the article, and pulls in a Google image and YouTube video. 02. 03. For this website about the history of the St. 04. 05. 06. 07. 08. tota11y 09. 10. 11.

8 Amazing jQuery Lightbox Plugins You Need to Check Out jQuery can be defined as a cross browser java script library. It is a multi-browser java script library and is basically designed for the purpose of simplifying the scripting of HTML on the client side. This is also the most popular java script library which is used by the people these days. jQuery has a lot of advantages such as it is absolutely free of any cost and it is also open source software. Using jQuery the developers can also create plug-ins and also create low level interactions. 1) Pirobox 2) Shadowbox Js Shadowbox is a web-based media viewer application that supports all of the web’s most popular media publishing formats. 3) Colorbox A lightweight customizable lightbox plugin for jQuery. 4) Ceebox a Thick box Videobox Mashup 5) Pretty Photo jQuery Lightbox “prettyPhoto is a jQuery lightbox clone. 6) Lightview Lightview was built to change the way you overlay content on a website. 7) GreyBox GreyBox can be used to display websites, images and other content in a beautiful way.

Google JavaScript Style Guide We follow the C++ formatting rules in spirit, with the following additional clarifications. Curly Braces Because of implicit semicolon insertion, always start your curly braces on the same line as whatever they're opening. For example: if (something) { // ... } else { // ... } Array and Object Initializers Single-line array and object initializers are allowed when they fit on a line: Multiline array initializers and object initializers are indented 2 spaces, with the braces on their own line, just like blocks. Long identifiers or values present problems for aligned initialization lists, so always prefer non-aligned initialization. Not like this: Function Arguments When possible, all function arguments should be listed on the same line. // Four-space, wrap at 80. When the function call is itself indented, you're free to start the 4-space indent relative to the beginning of the original statement or relative to the beginning of the current function call. Passing Anonymous Functions Blank lines

Is it possible to use any HTML5 fanciness to export local storage to Excel

Related:  GamesJavaScript