background preloader

JavaScript

Facebook Twitter

Show If. Learning JavaScript Design Patterns. I would like to thank Rebecca Murphey for inspiring me to open-source this mini-book and release it for free download and distribution - making knowledge both open and easily available is something we should all strive for where possible. I would also like to extend my thanks to the very talented Alex Sexton who was kind enough to be the technical reviewer for this publication. I hope that it helps you learn more about design patterns and the usefulness of their application to JavaScript. Volume 2 of Essential JavaScript Design Patterns is currently being written and will be more detailed than this first edition. The ETA for it's online release is late Q4, 2011. For more detailed coverage of specific patterns, you may be interested in my posts on the Pub/Sub (Observer) or Decorator patterns.

At the beginning of this book I will be focusing on a discussion about the importance and history of design patterns in any programming language. AngularJS — Superheroic JavaScript MVW Framework. Ember.js - About. AngularJS — Superheroic JavaScript MVC Framework. JsPDF - Create PDFs with HTML5 JavaScript Library. 10 Useful JavaScript Solutions for Charts and Graphs. The visual structures such as Graphs and Charts are a valuable presence in web development.

10 Useful JavaScript Solutions for Charts and Graphs

The visual structures can easily simplify complex data and output that can be chosen to put a list of JavaScript graphs. Today we present 10 such JavaScript solutions for Charts and Graphs to make easy your website development much easier. JS Charts JS Charts is a JavaScript chart generator that requires little or no coding. JS Charts allows you to easily create charts in different templates like bar charts, pie charts or simple line graphs.

jQuery Visualize The Visualize plugin parses key content elements in a well-structured HTML table, and leverages that native HTML5 canvas drawing ability to transform them into a chart or graph visualization. Highcharts.

Jquery

10 things you didn't know JavaScript could do. Using Google's Closure to Compile and Verify your JavaScript. 7, Mar 2013 A large application is nearly guaranteed to come with an equally large amount of JavaScript attached to it.

Using Google's Closure to Compile and Verify your JavaScript

During development it makes sense to divide the JavaScript of the application into multiple sensibly named files both to make finding specific functionality in the code base easier, and to keep the file length to a reasonable size for readability/comprehension purposes. More importantly though, this allows you to build modular, reusable components by separating functionality and sharing common methods within the application. However, when it comes time to move your site to the production environment, this development processes' inefficiencies become noticeable in slow loading pages. The most obvious pitfall is the fact that having multiple different files means that new HTTP requests have to be issued for each file, bringing with it an additional round trip time.

Introducing Google Closure. Tips, tricks, tutorials & screencasts to improve your JavaScript. Documentation. JSHint is a program that flags suspicious usage in programs written in JavaScript.

Documentation

The core project consists of a library itself as well as a CLI program distributed as a Node module. More docs: List of all JSHint options · CLI flags · Writing your own reporter · FAQ Basic usage The easiest way to use JSHint is to install it as a Node program. To do so, simply run the following command in your terminal (flag -g installs JSHint globally on your system, omit it if you want to install JSHint in the current working directory): $ npm install jshint -g After you've done that you should be able to use the jshint program. . $ jshint myfile.js myfile.js: line 10, col 39, Octal literals are not allowed in strict mode. 1 error.

Nouvelle Vague by ultranoir. Stringify - JavaScript. The JSON.stringify() method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified.

stringify - JavaScript

Syntax JSON.stringify([, [, ]]) Parameters value The value to convert to a JSON string. replacer Optional A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting the properties of the value object to be included in the JSON string. Space Optional. A Javascript When Function. Mon Feb 20 2012 function when(conditionFunc, execFunc, interval){ if (conditionFunc()){ execFunc(); }else{ setTimeout(function(){ when(conditionFunc, execFunc, interval);}, interval); } } You have some code which should only execute when a condition is true.

A Javascript When Function

E.g. You have code which relies on a javascript library but can't be sure the library has loaded yet and don't want the code to execute until it has. 35 top examples of JavaScript. JavaScript creates platforms that can engage a user and ensure that they remember your site and continue to revisit.

35 top examples of JavaScript

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. Histography 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. Badass JavaScript.

Superhero.js.