Developing Simple node.js Web Application on Our Desktop PRO
We can easily set up an up and running HTTP server on our desktop that runs a web application developed in node.js. We just need to write our code in a separated JavaScript file and execute it. var http = require(‘http’); var server = http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’:’text/plain’}); res.end(‘Hello World!\n’); }); server.listen(1400,’127.0.0.1′); The following video clip […]
Using node.js with MySQL PRO
Developing a web application using the node.js framework we can easily write code that connects with a MySQL database. The mysql module provides us with everything we need. The following code sample shows how simple it is to use this module. var mysql = require(‘mysql’); var connection = mysql.createConnection({ host: ‘server.zindell.com’, user: ‘nodejsdemo’, password: ‘lifemichael’, […]
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” […]