Iterators in JavaScript PRO
JavaScript allows us to use iterators for going over the properties of a specific object or for going over the elements of a specific array. The following code sample shows how simple it is to use iterators in JavaScript. <!DOCTYPE html> <html> <head> <title>The Iterator Function</title> </head> <body> <script type=”text/javascript”> var student = { name: […]
MooTools Cookie Object PRO
MooTools provides us with Cookie, a global object that provides us with a clean and simple access to the cookies on our web browser. The following code sample shows how simple it is to create a new cookie and how simple it is to read the value of a cookie that already exists. <!DOCTYPE html> […]
MooTools Request Class PRO
The MooTools JavaScript library provides us with the Request class. This class wraps the XmlHttpRequest object and allows us implementing ajax in a much simpler way. The following code sample shows how simple it is to use the MooTools Request class. It includes two files. The first file is the HTML file that includes code […]
Paper.js Verctor Graphics PRO
Paper.js is an open source JavaScript library that provides us with vector graphics capabilities. Paper.js uses the HTML5 well known canvas. The following code sample shows how simple it is to use this library. <!DOCTYPE html> <html> <head> <title>paper.js demo</title> <script type=”text/javascript” src=”paper-full.min.js”></script> </head> <body> <canvas id=”ourcanvas” resize></canvas> <script type=”text/paperscript” canvas=”ourcanvas”> var path = new […]
Math.js Jump Start PRO
Math.js is a lightweight open source JavaScript library that provides us with an extensive collection of mathematical useful functions. You can easily download the Math.js library code browsing in GitHub at https://github.com/josdejong/mathjs. The following code sample shows how simple it is to use this library. <!DOCTYPE html> <html> <head> <title>math.js demo</title> <script type=”text/javascript” src=”math.min.js”></script> </head> […]
String.js Jump Start PRO
String.js is a lightweight open source JavaScript library that provides us with useful functions for working with strings. You can easily download the String.js library code browsing in GitHub at https://github.com/jprichardson/string.js. The string.js library adds the S property to the window global object. The following code sample shows how simple it is to use this […]
Google Web Font Loader Jump Start PRO
Google Web Fonts Loader is a JavaScript library developed by Google that allows you to dynamically load any of the free web fonts developed by Google. Using the Google Web Fonts Loader library we can use multiple different web font providers. The documentation and source code of the Web Font Loader JavaScript library is available as […]
Turn.js Digital Publishing PRO
Turn.js is a JavaScript library that allows us to create digital books the user can flip through their pages. Although the library is available as an open source project on GitHub there are some restrictions on using it. Make sure you check the license terms before you choose to use it. The following code sample […]
OpenLayers Dynamic Maps PRO
The OpenLayers open source project allows us to add dynamic maps into our web pages. Using this library we can avoid the use of Google Maps. The following code sample shows how simple it is to use OpenLayers together with data retrieved from openstreetmap.org. <!DOCTYPE html> <html lang=”en”> <head> <title>openlayers simple demo</title> <link rel=”stylesheet” href=”http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/theme/default/style.css” […]
Goldman Sachs Collections PRO
The Goldman Sachs Collections framework (AKA GS Collections) provides us with an alternative implementation for the JDK collections framework. GS Collections provides us with capabilities similar to those we find in programming languages such as Scala, C# and Samlltalk. Using this framework together with lambda expressions allows us writing significantly shorter code. The following code […]