Archive for the 'JavaScript' Category

Canvas2Image - converts what you draw on WHATWG canvas to downloadable images on the fly

Here comes a small JavaScript library, Canvas2Image that you could include on your web page, and it allows those lines and boxes that you draw on a WHATWG canvas (made using new HTML <canvas></canvas> tag pair) to be converted into images on the fly for download.

Continue reading ‘Canvas2Image - converts what you draw on WHATWG canvas to downloadable images on the fly’

Google Gears will include Image manipulation API

Google Gears will have a set of API for manipulating images. Such as cropping, resizing and composing images etc on the client-side using JavaScript.

Continue reading ‘Google Gears will include Image manipulation API’

How well do you know Prototype? You should fully utilize it!

<script type=”text/javascript” src=”prototype.js”></script>

Juiry Zaytsev, someone who has used Prototype for almost a year for building dynamic web apps, has experienced many stupid questions raised on the Prototype discussion IRC channel. According to Juiry, that Prototype is only used at about 15% by most developers. Such as those include the 100KB Prototype.js in their web app, but what they use is only the Ajax.Request function, instead of the many short cuts and convenient functions provided by Prototype.

Continue reading ‘How well do you know Prototype? You should fully utilize it!’

Method Overloading is possible in JavaScript!

In a full-fledged Object Oriented Programming language such as Java, method overloading is the technique that you could use to create few functions or methods that having the same names but taking different arguments or parameters. Such as follows, the method findUser(), findUser(String), findUser(String, String) in Java.

public class Users
{
   public Collection findUser()
   {
      // the findUser() is a method that returns
      // all users in a java.util.Collection object

   }

   public Collection findUser(String name)
   {
      // the findUser(String) is a method that returns the users matched
      // by the specified name,
      // result returned in a java.util.Collection object

   }

   public Collection findUser(String firstMame, String lastName)
   {
      // the findUser(String,String) is a method that
      // returns the users matched by the specified
      // first and last name, results returned in a java.util.Collection object

   }
}

Continue reading ‘Method Overloading is possible in JavaScript!’

Prototype - a fantastic JavaScript Framework, simplifies Ajax coding

Prototype - a fantastic JavaScript Framework, simplifies Ajax codingWhat is Prototype? Prototype is a JavaScript framework that simplifies AJAX coding and extends the DOM structure. Prototype comes with several short-cut coding methods and modules to allow you to shorten your AJAX coding and it’s browser-safe. Prototype is now available with the latest version, 1.6 for download.

To start using Prototype in your web apps, it’s easy, just download the prototype.js file and include it in any JavaScript tag pairs shown as follows then you can start using the simplified coding in AJAX offered by Prototype.

<script src=”prototype.js” type=”text/javascript”></script>

Continue reading ‘Prototype - a fantastic JavaScript Framework, simplifies Ajax coding’