background preloader

Closure Tools

Closure Tools
What is the Closure Compiler? The Closure Compiler is a tool for making JavaScript download and run faster. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. How can I use the Closure Compiler? You can use the Closure Compiler as: An open source Java application that you can run from the command line. To get started with the compiler, see "How do I start" below. What are the benefits of using Closure Compiler? Efficiency. Related:  Outils, scripts et divers choses utiles

Grunt: The JavaScript Task Runner Closure Compiler - Javascript Compiler by Google - Compress Javascript with Closure Compiler Yesterday, Google introduced Closure Tools (announcement) to enable easy creation of web applications. The tool set contains: Closure Compiler, Closure Library and Closure Templates. Closure Compiler is a Javascript optimizer that compiles javascript code into a compact, high performance form. The compiler does more than a standard Javascript compressor. The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs. Closure Compiler by Google - reduces the size of your JavaScript files and makes them more efficient As mentioned before, Closure compiler is more than a standard Javascript compressor. The compiler also offers a Firebug extension, named Inspector, for better debugging. Closure Compiler by Google does more than removing whitespace.

YUI Compressor According to Yahoo!'s Exceptional Performance Team, 40% to 60% of Yahoo!'s users have an empty cache experience and about 20% of all page views are done with an empty cache (see this article by Tenni Theurer on the YUIBlog for more information on browser cache usage). This fact outlines the importance of keeping web pages as lightweight as possible. In terms of code minification, the most widely used tools to minify JavaScript code are Douglas Crockford's JSMIN, the Dojo compressor and Dean Edwards' Packer. The goal of JavaScript and CSS minification is always to preserve the operational qualities of the code while reducing its overall byte footprint (both in raw terms and after gzipping, as most JavaScript and CSS served from production web servers is gzipped as part of the HTTP protocol). Documentation: Detailed description of the YUI Compressor and how to use it. How does the YUI Compressor work? Using the YUI Compressor from the command line Additional notes Support & Community

Project Silk: Client-Side Web Development for Modern Browsers patterns & practices Developer Center September 2011 Project Silk provides guidance for building maintainable cross-browser web applications that are characterized by an intentional design, rich interactivity, and a responsive user interface (UI), resulting in an immersive and engaging user experience (UX). Such applications take advantage of the latest web standards, including HTML5, CSS3, and ECMAScript version 5, and modern web technologies such as jQuery and ASP.NET MVC3. An intentional design indicates that deliberate attention was paid to the modularity of the JavaScript code, and the usability of the application was an explicit focus. Under the direction of the team's web designer, UI and UX concerns received special attention, and this guidance aims to help you be successful addressing these concerns in your own applications. This guidance is intended for web developers and assumes you have some hands-on experience with HTML, CSS, JavaScript, jQuery, and ASP.NET MVC.

boxbox - javascript physics made easy what is boxbox? boxbox is a fun and simple framework for making games with the box2d physics engine. no, i mean really, what is it boxbox is a framework for box2dweb, a JavaScript port of box2dflash, an ActionScript port of box2d, a C++ library. The box2d physics engine is hard to use for a beginner. Further, its C++ style API doesn't make sense to JavaScript programmers. boxbox tries to solve both problems while adding its own sugar along the way. features simple API work with entities rather than fixtures, bodies, and shapes attach events to entities rather than the whole world reuse common configuration among similar entities built in canvas rendering with image support demos Mouse wheel programming in JavaScript Quick links: source · test page · long test page (with scrollbars) · compatibility Though many people still find this page useful, there have been some changes in the browsers since last update of this page, and I generally consider some information here to be outdated. However, I suggest using MooTools or other general Javascript frameworks that provide portable and maintainable basis for writing Javascript code. Web applications are becoming more and more like “normal” desktop applications. Of course, they are more and more functional, but smooth user interface acts the primary role. So we have drag and drop, autocompletition, and much more. This page, however, is not about AJAX (or any other buzzword). Annotated code Below is annotated javascript code, which should explain the magic behind mouse wheel generated events. /** This is high-level function. * It must react to delta being more/less than zero. Handler function If delta is positive, wheel was scrolled up. Compatability Usability

uglify-js UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. Note: uglify-js@3 has a simplified API and CLI that is not backwards compatible with uglify-js@2.Documentation for UglifyJS 2.x releases can be found here.uglify-js only supports JavaScript (ECMAScript 5).To minify ECMAScript 2015 or above, transpile using tools like Babel. Install First make sure you have installed the latest version of node.js (You may need to restart your computer after this step). From NPM for use as a command line app: npm install uglify-js -g From NPM for programmatic use: npm install uglify-js uglifyjs [input files] [options] UglifyJS can take multiple input files. If no input file is specified, UglifyJS will read from STDIN. If you wish to pass your options before the input files, separate the two with a double dash to prevent input files being used as option arguments: uglifyjs --compress --mangle -- input.js Command line options -h, --help Print usage information. CLI source map options Example: fs

Crockford on JavaScript -- Volume 1: The Early Years - Douglas Crockford - YUI Theater ▶ Play His talk is entitled "Polymer, Building blocks for the web" with the following description. From "a" to "select", elements are the building blocks of the web. But modern applications have outgrown these built-in elements, forcing app developers to rely on JavaScript frameworks to provide dynamic, custom behavior. The resulting apps are frequently complex and monolithic; a component developed for one may not work in another. In this talk we'll take a look at Polymer, a new library that allows developers to create their own HTML elements and compose them into complete applications. Rob Dodson is a Developer Advocate for the Google Chrome team, focusing on Polymer and web components.

10 cool HTML5 games and how to create your own Thanks to Apple dropping support for Flash on iOS, HTML5 has gained a lot of traction and is getting very popular. For games, HTML5 (understand canvas and a lot of javascript) is slowly replacing Flash on online gaming websites and mobile games. I have done in this post a selection of cool and popular HTML5 games, maybe it will give you some motivation to create your own. 10 cool HTML games A list of pretty cool games, make sure to check out the source to understand how they work. 1. Control two characters at the same time and try to let them meet. 2. Defend your planet against incoming meteorites. 3. Addicting simple game where you race with a stick figure in levels designed by other users. 4. Your hero has fallen into a sinkhole and has a broken arm. 5. Not exactly a game, but a game emulator that gives you access to old games that you’ve probably missed. 6. A shoot-em-up with cool isometric 3D graphics. 7. A game created by Kevin Roast. 8. 9. A pretty entertaining tower defence game.

Related: