<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Eltit Golb &#187; information technology</title>
	<atom:link href="http://roberto.open-lab.com/category/information-technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://roberto.open-lab.com</link>
	<description>think upstream</description>
	<lastBuildDate>Thu, 26 Jan 2012 17:19:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='roberto.open-lab.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Eltit Golb &#187; information technology</title>
		<link>http://roberto.open-lab.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://roberto.open-lab.com/osd.xml" title="Eltit Golb" />
	<atom:link rel='hub' href='http://roberto.open-lab.com/?pushpress=hub'/>
		<item>
		<title>Easy to confirm!</title>
		<link>http://roberto.open-lab.com/2012/01/26/easy-to-confirm/</link>
		<comments>http://roberto.open-lab.com/2012/01/26/easy-to-confirm/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 11:00:46 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">https://rbicchierai.wordpress.com/?p=759</guid>
		<description><![CDATA[A jQuery confirm plugin &#160; I’m re-writing some components for our&#160; world-wide selling Teamwork, and I was in the need to have a nicer way to confirm some “dangerous” user actions. The standard JavaScript solution is something like &#160; While the code is very simple, the popup alert is unfashionable and old-smelling. The best solution [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=759&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>A jQuery confirm plugin</h1>
<p>&#160;</p>
<p>I’m re-writing some components for our&#160; world-wide selling <a href="http://twproject.com" target="_blank">Teamwork</a>, and I was in the need to have a nicer way to confirm some “dangerous” user actions.</p>
<p>The standard JavaScript solution is something like</p>
<p><pre class="brush: jscript;">
if (confirm(“do you want to destroy everything?”)) 
  … &lt;em&gt;here the code for destroying&lt;/em&gt; 
</pre></p>
<p>&#160;</p>
<p>While the code is very simple, the popup alert is unfashionable and old-smelling.</p>
<p>The best solution I found is the <a href="http://nadiana.com/jquery-confirm-plugin" target="_blank">Nadia Alramli’s jQuery confirm plugin</a> that I have already used massively in <a href="http://licorize.com" target="_blank">Licorize</a>.</p>
<p>The first great idea in the Nadia’s plugin is that the confirm question is shown exactly where you clicked for the action.</p>
<p>The second idea is that the “confirm” is just “applied after” your code behavior.</p>
<p>Let se the simplest example (from <a href="http://nadiana.com/jquery-confirm-plugin" target="_blank">Nadias’ blog</a>):</p>
<p><pre class="brush: jscript;">
// The action.
$('a').click(function() {
  alert('click');
  return false;
});
 
// The most simple use.
$('a').confirm();
</pre></p>
<p>&#160;</p>
<p>As you can see, first you bind the event normally, then you will apply the confirm.</p>
<p>This approach is very nice, but its is very “javascript oriented”; what I mean is that you need a js piece of code for setting up the confirm, and this is a little bit rigid for an inline usage.</p>
<p>Example:</p>
<p><pre class="brush: xml;">
&lt;button onclick=”destroyAll()”&gt;
</pre></p>
<p>&#160;</p>
<p>where “destroyAll” is your function.</p>
<p>&#160;</p>
<p>So I wrote this little jQuery plugin that can be used like this:</p>
<p><pre class="brush: jscript;">&lt;button onclick=”$(this).confirm(destroyAll)&gt;</pre></p>
<p>Here the code:</p>
<p><pre class="brush: jscript;">
 $.fn.confirm = function(action, message) {
    if (typeof(action) != &quot;function&quot;)
      return;
    this.each(function() {
      var el = $(this);
      var div = $(&quot;&lt;div&gt;&quot;).addClass(&quot;confirmBox&quot;).
              html(message ? message : i18n.DO_YOU_CONFIRM);
      div.css({&quot;min-width&quot;:el.outerWidth(),&quot;min-height&quot;:el.outerHeight()});
      div.oneTime(5000, &quot;autoHide&quot;, function() {
        $(this).fadeOut(100, function() {
          el.show();
          $(this).remove();
        });
      });
      var no = $(&quot;&lt;span&gt;&quot;).addClass(&quot;confirmNo&quot;)
              .html(i18n.NO).click(function() {
        $(this).parent().fadeOut(100, function() {
          el.show();
          $(this).remove();
        }).stopTime(&quot;autoHide&quot;);
      });
      var yes = $(&quot;&lt;span&gt;&quot;).addClass(&quot;confirmYes&quot;)
              .html(i18n.YES).click(function() {
        $(this).parent().fadeOut(100, function() {
          el.show().oneTime(1, &quot;doaction&quot;, action);
          $(this).remove();
        }).stopTime(&quot;autoHide&quot;);
      });

      div.append(&quot;&amp;nbsp;&amp;nbsp;&quot;)
              .append(yes)
              .append(&quot;&amp;nbsp;/&amp;nbsp;&quot;)
              .append(no);
      el.hide().after(div);

    });

    return this;
  };
</pre></p>
<p>few lines of CSS for the sake of completeness:</p>
<p><pre class="brush: css;">
.confirmBox{
    display:inline-block;
    z-index:10000;
    vertical-align:middle;
    text-align:center;
    font-size:larger;
    font-style:italic;
    color:#a0a0a0;
  }
  .confirmBox .confirmNo{
    color:#e06060;
    cursor:pointer;
    font-weight:bolder;
  }
  .confirmBox .confirmYes{
  color:#60e060;
  cursor:pointer;
    font-weight:bolder;
  }</pre></p>
<p>and two lines for internationalization:</p>
<p><pre class="brush: jscript;">
var i18n = {
    YES:&quot;Yes&quot;,
    NO:&quot;No&quot;,
    DO_YOU_CONFIRM:&quot;Do you confirm?&quot;
  };
</pre></p>
<p>&#160;</p>
<p>See a <a href="http://s3.amazonaws.com/OLtmp/bicch/confirm/testConfirm.html" target="_blank">Demo page here</a></p>
<p>This component is released under MIT license.</p>
<p>Your feedback will be appreciated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/759/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/759/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/759/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=759&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2012/01/26/easy-to-confirm/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>
	</item>
		<item>
		<title>To JSON or not to JSON</title>
		<link>http://roberto.open-lab.com/2012/01/18/to-json-or-not-to-json/</link>
		<comments>http://roberto.open-lab.com/2012/01/18/to-json-or-not-to-json/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 10:29:30 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">https://rbicchierai.wordpress.com/?p=746</guid>
		<description><![CDATA[How to simply convert a sqlite database to JSON Last week my collegue Matteo (aka pupunzi) was porting an iPad application (booo!) to HTML5 (yeah!). The iPad application was a virtual museum that was using a sqlite dabatase for reading data relative to rooms, biography, history and so on. Even if sqlite is internally supported [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=746&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>How to simply convert a sqlite database to JSON</h1>
<p>Last week my collegue Matteo (aka <a href="http://pupunzi.com/" target="_blank">pupunzi</a>) was porting an iPad application (booo!) to HTML5 (yeah!).</p>
<p>The iPad application was a virtual museum that was using a sqlite dabatase for reading data relative to rooms, biography, history and so on.</p>
<p>Even if sqlite is internally supported by some browsers (e.g. Chrome) the easiest way to read data in javascript is to have a JSON object.</p>
<p>I wrote a simple java code to dump the whole database into a JSON object.</p>
<blockquote>
<pre style="font-size:12px;line-height:18px;">
import net.sf.json.JSONObject;
import net.sf.json.JSONArray;
import java.sql.*;
import java.util.List;
import java.util.ArrayList;
import java.io.FileOutputStream;
public class DB2JSON {

  public static void main(String[] args) {

    if (args.length&lt;1)
      return;
    Connection conn = null;

    try {
      String dbFile = args[0];
      JSONObject ret = new JSONObject();
      Class.forName(&quot;org.sqlite.JDBC&quot;);
      conn = DriverManager.getConnection(&quot;jdbc:sqlite:&quot; + dbFile);
      Statement stat = conn.createStatement();

      ResultSet tables = stat.executeQuery(&quot;SELECT name
         FROM sqlite_master
         WHERE type=&#039;table&#039; ORDER BY name;&quot;);
      List tableNames = new ArrayList();
      while (tables.next()) {
        tableNames.add(tables.getString("name"));
      }
      tables.close();

      for (String tableName : tableNames) {
        JSONArray jsa = new JSONArray();

        ResultSet rows = stat.executeQuery("select * from " +
           tableName + ";");

        while (rows.next()) {
          JSONObject row = new JSONObject();
          ResultSetMetaData meta = rows.getMetaData();
          for (int i = 1; i &lt;= meta.getColumnCount(); i++) {
            row.element(meta.getColumnName(i), rows.getObject(i));
          }
          jsa.add(row);
        }

        rows.close();
        ret.element(tableName, jsa);
      }

      conn.close();

      // result on console
      System.out.println(ret.toString());

      //result on file
      FileOutputStream fos = new FileOutputStream(dbFile+&quot;.json&quot;);
      fos.write(ret.toString().getBytes());
      fos.close();     

    } catch (Throwable e) {
      try {
        if (conn != null)
          conn.close();
      } catch (SQLException s) {
      }
      e.printStackTrace();
    }
  }
}
</pre>
</blockquote>
<p>The resulting JSON object will have a property for each table containing an array of records. Different types of properties are supported (String, int, long, dates etc.)</p>
<p>There are two dependencies to external libraries:</p>
<ol>
<li> <a href="http://json-lib.sourceforge.net/">http://json-lib.sourceforge.net/</a></li>
<li><a href="http://www.zentus.com/sqlitejdbc/">http://www.zentus.com/sqlitejdbc/</a></li>
</ol>
<p>Enjoy.</p>
<p>P.S.: the pupunzi’s porting result is an HTML5 application that runs everywhere and it is looks even more beautiful than the iOS one <img class="wlEmoticon wlEmoticon-smile" style="border-style:none;" src="http://rbicchierai.files.wordpress.com/2012/01/wlemoticon-smile.png?w=600" alt="Smile" /> !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/746/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=746&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2012/01/18/to-json-or-not-to-json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2012/01/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Tassellate: playing on CANVAS</title>
		<link>http://roberto.open-lab.com/2011/02/10/tassellate-canvas/</link>
		<comments>http://roberto.open-lab.com/2011/02/10/tassellate-canvas/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 15:08:36 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">https://rbicchierai.wordpress.com/?p=693</guid>
		<description><![CDATA[I’ve enjoyed so much playing on HTML5 &#60;CANVAS&#62; that now I cannot stop… (test demo here) Now I’m playing on a component that I’d like to use as replacement for the current “weekly review” game on Licorize. If you are wondering about a “game” on a GTD operation like “weekly review”, have a look at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=693&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve enjoyed so much playing on HTML5 &lt;CANVAS&gt; that now I cannot stop…</p>
<p><a title="Tassellate at work!" href="http://licorize.com/applications/licorize/site/test/canvas/tassellate.jsp" target="_blank"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image18.png?w=624&#038;h=430" border="0" alt="image" width="624" height="430" /></a></p>
<p>(<a href="http://licorize.com/applications/licorize/site/test/canvas/tassellate.jsp" target="_blank">test demo here</a>)</p>
<p>Now I’m playing on a component that I’d like to use as replacement for the current “weekly review” game on <a href="http://licorize.com" target="_blank">Licorize</a>. If you are wondering about a “game” on a GTD operation like “weekly review”, have a look at <a href="http://pietro.open-lab.com/2010/11/09/game-mechanics-for-thinking-users/" target="_blank">Game mechanics for thinking users</a> article by <a href="http://pietro.open-lab.com" target="_blank">Pietro Polsinelli</a>.</p>
<p>The goal is to transmit the idea of having something to be “cleared”; a picture covered with black pieces should work fine!</p>
<p>The requirement is that the number of pieces covering the image must be pre-determined.</p>
<p>First of all I need an algorithm to “tassellate” the image with random shaped triangles. Actually the triangles are not overlaying, so I divide recursively the space available.</p>
<p>Go have a simple algorithm, first I split the image in two triangles, then I apply to both the recursive splitting.</p>
<p>A single splitting step:<a href="http://rbicchierai.files.wordpress.com/2011/02/image19.png"><img style="display:inline;margin-left:0;margin-right:0;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb14.png?w=275&#038;h=167" border="0" alt="image" width="275" height="167" align="right" /></a></p>
<p>1) choose a random side</p>
<p>2) find a point (x) on that side, nearly in the middle</p>
<p>3) link the point (x) with the opposite corner and generate two triangles</p>
<p>4) apply splitting on both triangles</p>
<p>here is the code:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image20.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb15.png?w=562&#038;h=389" border="0" alt="image" width="562" height="389" /></a></p>
<p>Then the recursive function: notice that I have to use a queue to “balance” the recursion on both splitted parts, otherwise I will divide only the first triangle reaching the exit condition (x pieces reaced).</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image21.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb16.png?w=520&#038;h=345" border="0" alt="image" width="520" height="345" /></a></p>
<p>Then I used my simple Stage object to manage canvas interactions (read <a href="http://roberto.open-lab.com/2011/02/04/lenscape-a-canvas-interaction-tutorial/">lenscape a canvas interaction tutorial</a> for details) as click on triangles, mouse over, etc…</p>
<p>I’ve also added a sound on “remove piece” button, but dealing with the &lt;AUDIO&gt; tag is another history…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/693/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=693&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2011/02/10/tassellate-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Lenscape, a canvas interaction tutorial</title>
		<link>http://roberto.open-lab.com/2011/02/04/lenscape-a-canvas-interaction-tutorial/</link>
		<comments>http://roberto.open-lab.com/2011/02/04/lenscape-a-canvas-interaction-tutorial/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 16:11:00 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">https://rbicchierai.wordpress.com/?p=646</guid>
		<description><![CDATA[Recently I started playing with the HTML5 &#60;CANVAS&#62; object sometimes having fun and sometimes feeling pain. I would like to share here my pains with your all (see example and bookmarks) I approached html drawing far in the past when svg was a weak light in the darkness of browser graphics. Mainly due to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=646&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I started playing with the HTML5 &lt;CANVAS&gt; object sometimes having fun and sometimes feeling pain. <strong>I would like to share here my pains with your all</strong> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://licorize.com/applications/licorize/site/test/canvas/lenscape.jsp" target="_blank"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image16.png?w=592&#038;h=301" border="0" alt="image" width="592" height="301" /></a></p>
<p><span style="font-size:xx-small;">(see </span><a href="http://licorize.com/applications/licorize/site/test/canvas/lenscape.jsp" target="_blank"><span style="font-size:xx-small;">example</span></a><span style="font-size:xx-small;"> and </span><a href="http://licorize.com/projects/rbicchierai/blogmaterial/canvas" target="_blank"><span style="font-size:xx-small;">bookmarks</span></a><span style="font-size:xx-small;">) </span></p>
<p>I approached html drawing far in the past when <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" target="_blank">svg</a> was a weak light in the darkness of browser graphics. Mainly due to the lack of IE support for svg at the time I chose to create my own graphic library emulating  pixel drawing with thousands of lilliputian &lt;div&gt;.</p>
<p>In the following years I had only sparse contacts with html graphics but always having in mind the svg approach, where a line, a circle or whatever is a solid xml tag.</p>
<p>e.g: &lt;ellipse cx=&#8221;300&#8243; cy=&#8221;150&#8243; rx=&#8221;200&#8243; ry=&#8221;80&#8243; style=&#8221;fill:rgb(200,100,50);”/&gt;</p>
<p>this is really “natural” for me, html-writer: every single element has its own tag, and we are all happy!</p>
<p>Last month here, in Open Lab, we decided to start developing our first game (first for the company but not for the people working in it) and we decided to develop it using HTML5!</p>
<p>It’s time for me to resurrect dormant skills, and have a look at what is happening in the world of html gaming.</p>
<p><strong>Surprise</strong>! Nobody is using svg for gaming, the main road is deeply tracked through <a href="http://en.wikipedia.org/wiki/Canvas_element" target="_blank">&lt;canvas&gt;</a> fields;  so then I started studying it.</p>
<p>First of all I got a punch in the stomach learning that a canvas is, as the word says, only a place where to “draw” something, not a place where to “store” something. That means that once you have put something in a canvas, there is no way to recall  it, or even worst to detect its presence.</p>
<p>This implies that if you want, for instance, to do something when clicking on a “circle” you cannot “bind” an event on that circle, simply because that “circle” doesn’t exist.  So if you need to interact with objects in the scene you need to work around it.</p>
<p>Actually this tutorial will explain how to approach canvas interaction,  <strong>so this will result as a shortcut for avoiding the pain and getting only the fun part</strong>!</p>
<p><strong> </strong></p>
<p><strong>Disclaimer</strong>: I know there are lots of html gaming engines as <a href="http://ajaxian.com/archives/aves-game-engine" target="_blank">Aves</a> recently acquired by Zinga, <a href="http://labs.hyperandroid.com/animation" target="_blank">CAAT</a> by HyperAndroid, <a href="http://strikedisplay.blogspot.com/" target="_blank">Strikedisplay</a> by Josh Strike or <a href="http://impactjs.com/" target="_blank">Impact</a> by Dominic Szablewski (this list is far from complete). So if you are not interested in going in depth in canvas technicalities, this is a good point where to stop reading.</p>
<p>If you are interested in going deeper, first of all I suggest you to have a look at what is happening in the canvas world:  <a href="http://www.canvasdemos.com">canvasdemos</a> is a great source of inspiration. Then have a look to the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html" target="_blank">canvas element reference</a>, just to taste the complexity…</p>
<p>I chose as final destination of this short trip in the canvas world the construction of a simple application,that emulates a lens moving on a picture. In the meantime I’d like to lay the foundations of my own canvas animation(?) library.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image2.png"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb1.png?w=165&#038;h=166" border="0" alt="image" width="165" height="166" align="left" /></a>Summing up I’m going to realize a lens, that will enlarge a part of an underlying background image.</p>
<p>The lens can be moved over the image, to get a detailed view, using drag&amp;drop.</p>
<p>The first step is to have a large image, larger than the screen (e.g.: 4000 x 2000) with full resolution, and use it as canvas background.</p>
<p>In order to have a canvas background you can use at least two different approaches:</p>
<p>1) using CSS background-image. This is an interesting approach as the background is not in the canvas itself, so you do not need to redraw it once you clear the canvas. In my case this solution doesn’t fit as I need to stretch the image, and moreover this feature is not supported by all browsers, actually even canvas is not supported….</p>
<p>2) coping “bits” from an existing image to the canvas. I choose this approach even if this requires to redraw the background after each “clear” action, as this approach is supported by all browser canvas implementations.</p>
<p>First two rows of code: a general style for canvas and the “large” image</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image3.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb2.png?w=583&#038;h=148" border="0" alt="image" width="583" height="148" /></a></p>
<p>As the image is “large” everything starts at the “onload” event on the image, that may happen seconds after the page is loaded.</p>
<p>Just a couple of global variables to refer to the image, the stage, and the context.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image4.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb3.png?w=247&#038;h=72" border="0" alt="image" width="247" height="72" /></a></p>
<p><strong><em>img </em></strong>variable is used only for shortening code and is a jQuery proxy for the &lt;img&gt;. I used jQuery only because I’m used to use it, but it isn’t a requirement.</p>
<p><strong><em>ctx</em></strong> is the canvas context and is the main entry point for canvas operation (have a look at the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#2dcontext" target="_blank">complete reference of 2d context</a>); here <strong><em>context</em></strong> is reached via a global variable only for shortening code but the right place (“right” in terms of object modeling) should be in the “stage” object.</p>
<p><strong><em>stage </em></strong>is the “object model” of our environment, this supplies the lack of state of canvas itself, it holds all the objects of our “world” in an array.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image5.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb4.png?w=170&#038;h=88" border="0" alt="image" width="170" height="88" /></a></p>
<p>First setup fills variables and then initializes the stage:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image6.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb5.png?w=564&#038;h=277" border="0" alt="image" width="564" height="277" /></a></p>
<p>We are creating a canvas with the same aspect ratio of the original image. The Canvas object is our model for html  canvas, it exposes two methods: <strong><em>init</em></strong> and <strong><em>draw</em></strong>.</p>
<p><strong><em>Init</em></strong> method is responsible for canvas creation, context acquisition, and events binding:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image7.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb6.png?w=362&#038;h=259" border="0" alt="image" width="362" height="259" /></a> …</p>
<p><strong>Draw</strong> method is called every time you need to refresh the scene (really often during interactions) and, in our example, is here only to repaint the background:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image8.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb7.png?w=810&#038;h=115" border="0" alt="image" width="810" height="115" /></a></p>
<p>so, just clear and use the <strong><em>drawImage</em></strong> function to perform a bulk copy from our “large” off-screen  image to the canvas. This is a sort of powerful <a href="http://en.wikipedia.org/wiki/Bit_blit" target="_blank">bitBlit</a> operation that supports crop, translate and resize operations.</p>
<p>Then the <strong><em>Lens</em></strong> object: it is responsible for holding the lens position and magnification. It exposes three methods: <strong><em>draw</em></strong>, <strong><em>moveTo</em></strong>, <strong><em>setMagnification</em></strong>.</p>
<p>The Lens constructor:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image9.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb8.png?w=717&#038;h=427" border="0" alt="image" width="717" height="427" /></a></p>
<p>A little complication here is the fact that we are zooming over an image off-screen while we are moving over the canvas, so we need some scaling factor to calculate the position of the underlying point in the “large” image.</p>
<p>Then lens drawing.</p>
<p>The lens effect is rendered by copying a part of the “large” image, eventually magnified, by cropping the image in a round shape, and applying a radial gradient on an alpha channel.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image10.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb9.png?w=761&#038;h=612" border="0" alt="image" width="761" height="612" /></a></p>
<p>Note once again the usage of <strong><em>drawImage</em></strong> method to copy and enlarge the image and the  <strong><em>clip</em></strong> method for creating a circular clipping region. Then we will apply the radial gradient using color with an alpha channel.</p>
<p>The lens modeled using a js object makes it comfortable to have one or more instances of the same object:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image11.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb10.png?w=569&#038;h=121" border="0" alt="image" width="569" height="121" /></a></p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image12.png"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb11.png?w=390&#038;h=225" border="0" alt="image" width="390" height="225" align="left" /></a></p>
<p>Here you see two lenses with different sizes and different magnification factors.</p>
<p>Now everything is working but there is no interaction with the user.</p>
<p>Lets try to add <strong>drag&amp;drop</strong> capability.</p>
<p>I have to cite <a href="http://www.html5canvastutorials.com/">html5canvastutorials</a> that helped me understand the first steps in managing interactions.</p>
<p>In order to start dragging we have to intercept the <strong><em>mouseDown</em></strong> event on the lens, but as I told you before, canvas do not retain the state of the object you&#8217;ve drawn on, so you cannot bind any event on the circle containing the lens: you can only bind events on the whole canvas, so if the user clicks the mouse on the lens you will receive the event on the canvas, not on the circle.</p>
<p>How to determine if there is <em>your</em> lens under the mouse? A simple, mathematical solution is to calculate the distance between the mouse and the lens center (you have all you need, mouse x-y coordinates from the js event, and the lens center from our Lens object), then if distance is  lower than the lens radius the click was inside, out otherwise. <a href="http://rbicchierai.files.wordpress.com/2011/02/image13.png"><img style="display:inline;margin-left:0;margin-right:0;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb12.png?w=260&#038;h=168" border="0" alt="image" width="260" height="168" align="right" /></a></p>
<p>This approach will work fine mainly for rectangles and circles, but how to manage a complex shape like the one in the picture? (yes, <strong>I know that this sucks</strong>!)</p>
<p>In this case the “math” approach is definitively more complex.</p>
<p>Hopefully canvas can answer the question “is this point in path?”. The “sole” limitation is that you can ask this question “only while” your are drawing, that in terms of canvas context is only between <strong>context.beginPath()</strong> and <strong>context.closePath()</strong> calls; so we have to store somewhere the mouse coordinates, then ask <strong>isPointInPath(mouseX, mouseY)</strong> and<strong> </strong>store the result on the Lens object.</p>
<p>Summing up: all events are binded to the canvas object, the stage redrawing is called on mouse move, and the “over” state is recorded on the Lens object. <strong>Mousedown</strong>, <strong>mouseup</strong>, and <strong>mouseleave</strong> only perform simple operations.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2011/02/image14.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image_thumb13.png?w=623&#038;h=623" border="0" alt="image" width="623" height="623" /></a></p>
<p><strong><em>Stage</em></strong> holds the object currently in drag status.</p>
<p>Note that we move the object that is first dragged on top of the stage.<strong>stageObjects</strong> list; this will act as a z-order operation, bringing the object to the front.</p>
<p><a href="http://licorize.com/applications/licorize/site/test/canvas/lenscape.jsp" target="_blank"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image15.png?w=654&#038;h=245" border="0" alt="image" width="654" height="245" /></a></p>
<p>The running example is <a href="http://licorize.com/applications/licorize/site/test/canvas/lenscape.jsp" target="_blank">here</a>, and source code <a href="http://licorize.com/applications/licorize/site/test/canvas/lenscape.htm" target="_blank">here</a> under MIT licence, so feel free to change and reuse.</p>
<p>All the material referred in this post is in my <a href="http://licorize.com" target="_blank">Licorize</a> booklet for canvas related material: <a href="http://licorize.com/projects/rbicchierai/blogmaterial/canvas" target="_blank">http://licorize.com/projects/rbicchierai/blogmaterial/canvas</a></p>
<p>I took the photos used as examples in my travels.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/646/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/646/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/646/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=646&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2011/02/04/lenscape-a-canvas-interaction-tutorial/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Ultra-light jQuery calendar</title>
		<link>http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/</link>
		<comments>http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 20:09:54 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[date picker]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://rbicchierai.wordpress.com/?p=555</guid>
		<description><![CDATA[CalendarPicker: a new concept for date selection. Read the component history. Sometime I maintain my promises (rarely indeed ), so I worked a little bit on CalendarPicker, receiving some suggestions from my previous post. First of all thanks to everybody for precious feedbacks. The hottest news in CalendarPicker is the usage  of mouse wheel to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=555&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>CalendarPicker: a new concept for date selection.</h2>
<p style="text-align:right;"><a href="http://roberto.open-lab.com/2010/03/23/so-hard-to-have-a-date/" target="_blank">Read the component history</a>.</p>
<p>Sometime I maintain my promises (rarely indeed <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ), so I worked a little bit on CalendarPicker, receiving some suggestions from my <a href="http://roberto.open-lab.com/2010/03/23/so-hard-to-have-a-date/" target="_blank">previous post</a>.</p>
<p>First of all thanks to everybody for precious feedbacks.</p>
<p>The hottest news in CalendarPicker is the usage  of mouse wheel to change dates; it is enabled on years, months and days bars.</p>
<p>I used the great <a href="http://brandonaaron.net/code/mousewheel/docs" target="_blank">mousewheel plugin</a> by <a href="http://brandonaaron.net/code/mousewheel/docs" target="_blank">Brandon Aaron</a>; just include the script for activate it.</p>
<p>Then I changed a little the CSS to enhance “today” with a yellow border.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/04/image.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/04/image_thumb.png?w=229&#038;h=117" border="0" alt="image" width="229" height="117" /></a> <a href="http://rbicchierai.files.wordpress.com/2010/04/image1.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/04/image_thumb1.png?w=229&#038;h=119" border="0" alt="image" width="229" height="119" /></a></p>
<p>Another new feature is the ability of customizing the amount of  years/month/days displayed, so you can have bizarre configurations like these:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/04/image2.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/04/image_thumb2.png?w=292&#038;h=106" border="0" alt="image" width="292" height="106" /></a> <a href="http://rbicchierai.files.wordpress.com/2010/04/image3.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/04/image_thumb3.png?w=292&#038;h=103" border="0" alt="image" width="292" height="103" /></a></p>
<p><a href="http://haineault.com/">Maxime Haineault</a> argued that the next/prev buttons are no fashionable: now you can hide them!</p>
<p>Introducing the wheel movement I had to optimize calls, so callback function is invoked only when the user stops to play with the wheel.</p>
<p>I tried to maintain the code short (actually 180 rows), but the customization of years/months/days requires some computation for cell size; I first tried using only css properties in order to makes cells sharing space equally, but no luck. I need a css-expert&#8217;s hint!</p>
<p>You can see CalendarPicker <a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" target="_blank">at work here</a>.</p>
<p>Feedback welcome!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/555/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/555/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=555&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/04/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/04/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/04/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/04/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>So hard to have a date</title>
		<link>http://roberto.open-lab.com/2010/03/23/so-hard-to-have-a-date/</link>
		<comments>http://roberto.open-lab.com/2010/03/23/so-hard-to-have-a-date/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 09:09:03 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[date picker]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://rbicchierai.wordpress.com/?p=449</guid>
		<description><![CDATA[An overview of 13+1  jQuery calendars, and a new ultra-light calendar picker. When I was teenager (oh God, so many years ago!), my secret dream was to have a date with Elisa, curly hairs, blue eyes, tall, wonderful, curvy-classmate; actually this was the secret dream of every boy in my class. Unluckily  I looked younger, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=449&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>An overview of 13+1  jQuery calendars, and a new ultra-light calendar picker.</h1>
<p>When I was teenager (oh God, so many years ago!), my secret dream was to have a date with Elisa, curly hairs, blue eyes, tall, wonderful, curvy-classmate; actually this was the secret dream of every boy in my class. Unluckily  I looked younger, thinner, callow then others boys, so there was no chance of it coming true. So I decided to learn programming!</p>
<p>Today, I <em>still need a date</em>, well not the same kind of  “date”, a “date” in the sense of <strong>calendar</strong> ones, amazing how the years change your priorities!</p>
<p>Developing a new secret product (actually Licorize!) I needed to pick a date in order to roll-unroll the user log.</p>
<p>Using a third party component is a way to speed-up my development,  I narrowed my research to jQuery components; probably there are lots of calendar component for motools,  prototype, or stand alone ones, but jQuery is my choice, not going to change that!</p>
<p>I initially thought this was a simple quest: “of course there will be thousands of date pickers to choose…”</p>
<p>But nowadays is still hard to have a date, at least in a stylish way…</p>
<p>…  (<strong>if you want to see my component at work just go straight </strong><a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" target="_blank">here</a><strong> </strong>).</p>
<p>Here is the list of calendar components I’ve tried (before developing my own!).</p>
<h2><a href="http://www.eyecon.ro/datepicker/" target="_blank">Eyecon Date Picker</a></h2>
<p>Firstly I came to <a href="http://www.eyecon.ro/datepicker/" target="_blank">Eyecon Date Picker</a>. This is a really nice component. What I loved on this component is the flexibility for moving far in the past (or the future) with few clicks. <a href="http://rbicchierai.files.wordpress.com/2010/03/image19.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb19.png?w=185&#038;h=143" border="0" alt="image" width="185" height="143" /></a><a href="http://rbicchierai.files.wordpress.com/2010/03/image20.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb20.png?w=192&#038;h=144" border="0" alt="image" width="192" height="144" /></a><a href="http://rbicchierai.files.wordpress.com/2010/03/image21.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb21.png?w=190&#038;h=143" border="0" alt="image" width="190" height="143" /></a></p>
<p>Clicking on the top row the component changes “scale” moving through years or months.</p>
<p>Date Picker  is released under MIT and GPL license, so it is usable also in commercial products (that actually is my case).</p>
<p>Date picker is fully skinnable, is quite light,  and really easy to use.</p>
<p>Basic usage is really straightforward:</p>
<blockquote>
<div>
<pre>$('#date').DatePicker({
	flat: true,
	date: '2008-07-31',
	current: '2008-07-31',
	calendars: 1,
	starts: 1
});</pre>
</div>
</blockquote>
<p>Another interesting feature is that it supports period selection:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image22.png"><img style="display:inline;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb22.png?w=570&#038;h=176" alt="image" width="570" height="176" /></a></p>
<p>and a cell renderer that can be used to highlight holidays, disable some days or whatever your application needs.</p>
<p>I was so happy to have found this component that I included it immediately on Licorize, before discovering a little spot that made me discard it: when you change scale by clicking on a month or on a year it closes the popup (when in popup mode). It is completely acceptable in mostly cases, but unluckily not in mine.</p>
<h2><a href="http://jqueryui.com/demos/datepicker/" target="_blank">jQuery UI Datepicker</a></h2>
<p>Then I tried the “standard” <a href="http://jqueryui.com/demos/datepicker/" target="_blank">jQuery UI Datepicker</a>, that is a really rock solid component. <a href="http://rbicchierai.files.wordpress.com/2010/03/image23.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb23.png?w=236&#038;h=197" border="0" alt="image" width="236" height="197" align="left" /></a>Supports keyboard navigation, internationalization, lots of options, events, and methods. It is skinnable with ui theme roller.</p>
<p>It is hard to find a component so well engineered.</p>
<p>It relies on an input field, this means it is intended mainly for  data insertion. It can be used as stand-alone calendar too.</p>
<p>Probably playing with the options you can steer Datepicker where you need.</p>
<p>The minimal usage is really “minimal”:</p>
<blockquote>
<div>
<pre>$("#datepicker").datepicker();
...</pre>
</div>
<div>
<pre>&lt;input type="text" id="datepicker"&gt;</pre>
</div>
</blockquote>
<p>On the other hand,  mastering this component is not a joke with dozen of parameters. Even the weight is considerable (if you are interested in this single component only). This happens for every jQuery.ui component, either you accept it and embrace the whole platform or you extract a single part – it may be hard. This is why I didn’t adopt it.</p>
<h2><a href="http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/" target="_blank">Date Range Picker</a></h2>
<p>An interesting extension of jQuery.ui date picker is <a href="http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/" target="_blank">Date Range Picker</a> by Filament Group.</p>
<p>This manifests the quality of ui components. Seeing this component at work is quite impressive:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image24.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb24.png?w=578&#038;h=234" border="0" alt="image" width="578" height="234" /></a></p>
<p>It supports preset ranges in menu (e.g.: “Office closed”), range clicking and other catching features. In one world <strong>power</strong>, but definitively not lightness!</p>
<h2><a href="http://keith-wood.name/datepick.html" target="_blank">jQuery Datepicker</a></h2>
<p>Keith Wood  released <a href="http://keith-wood.name/datepick.html" target="_blank">jQuery Datepicker</a> under both GPL and MIT license.</p>
<p>Great the demo/documentation site!</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image25.png"><img style="display:inline;border-width:0;margin:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb25.png?w=215&#038;h=186" border="0" alt="image" width="215" height="186" align="right" /></a><a href="http://rbicchierai.files.wordpress.com/2010/03/image26.png"><img style="display:inline;border-width:0;margin:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb26.png?w=216&#038;h=154" border="0" alt="image" width="216" height="154" align="right" /></a>jQueri.ui datepicker is based on this component: the ui one has only less features… this should give you an idea about the power of this plugin.</p>
<p>Every kind of feature is supported, multi-languages, cell renderer, range selection, inline, years/months fast switching, cell disabling, date formats, multi events and much more.</p>
<p>The usage is simple, as simple as your requirements are.</p>
<p>Keith developed also the <a href="http://keith-wood.name/dateEntry.html" target="_blank">Date Entry</a> plugin <a href="http://rbicchierai.files.wordpress.com/2010/03/image27.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb27.png?w=130&#038;h=31" border="0" alt="image" width="130" height="31" /></a> a single input field with a pad for changing date fields.</p>
<h2><a href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/" target="_blank">jQuery date picker</a></h2>
<p>Kelvin Luck gives us a strong <a href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/" target="_blank">jQuery date picker</a>. It is unobtrusive and really well documented, lots of use cases are ready to be used.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image9.png"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb9.png?w=194&#038;h=162" border="0" alt="image" width="194" height="162" align="left" /></a></p>
<p>It can be used both inline or as input field, in single or multiple views for period selection.</p>
<p>The basic usage is the standard one:</p>
<div>
<pre>$('.date-pick').datePicker();</pre>
</div>
<p>It supports internationalization and cell rendering.</p>
<p>Probably the look-and-feel is not at the top.</p>
<h2><a href="http://tedserbinski.com/jcalendar/index.html#demo" target="_blank">jCalendar</a></h2>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image28.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb28.png?w=197&#038;h=175" border="0" alt="image" width="197" height="175" align="right" /></a>I have to cite the <a href="http://tedserbinski.com/jcalendar/index.html#demo" target="_blank">jCalendar</a> by Ted Serbinsky:</p>
<p>This is an outdated component and how the author says “this project has been  superceded by the most excellent <a href="http://jqueryui.com/">jQuery UI</a>”</p>
<p>So why didn’t I  believe in Ted and do the same thing? We’ll see that after all the reviews.</p>
<h2><a href="http://teddevito.com/demos/calendar.php" target="_blank">jQuery date-picker</a></h2>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image42.png"></a></p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image43.png"><img style="display:inline;border-width:0;margin:0 5px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb29.png?w=204&#038;h=239" border="0" alt="image" width="204" height="239" align="left" /></a></p>
<p>Now is the turn of  Ted Devito with <a href="http://teddevito.com/demos/calendar.php" target="_blank">jQuery date-picker</a>:</p>
<p>This is a quite rough (and even uncompleted) component, at least compared with previous jquery ones, but at least it has the gift of simplicity.</p>
<p>Usage is in jQuery style:</p>
<p>$(&#8216;input&#8217;).simpleDatepicker();</p>
<h2><a href="http://eisabainyo.net/demo/jquery.calendar-widget.php" target="_blank">jQuery Calendar Widget</a></h2>
<p>Then I found <a href="http://eisabainyo.net/demo/jquery.calendar-widget.php" target="_blank">jQuery Calendar Widget Plugin</a> by Ei Sabai Nyo that is by far the most compact calendar I ever found: <strong>99 lines</strong> of (unpacked <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) code!</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image30.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb30.png?w=443&#038;h=192" border="0" alt="image" width="443" height="192" /></a></p>
<p>Ok, probably it is not so powerful, but can be easily integrated and used in your applications; yours, not in mine!</p>
<h2><a href="http://code.google.com/p/dyndatetime/" target="_blank">Dyndatetime</a></h2>
<p><a href="http://code.google.com/p/dyndatetime/" target="_blank">Dyndatetime</a> is an iron-looking date selector. Releases under GNU by thetoolman, it has a cold appearance, but is filled of interesting features. First of all it allows fast year switching by holding the fast back /forward buttons.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image31.png"><img style="display:inline;border-width:0;margin:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb31.png?w=234&#038;h=163" border="0" alt="image" width="234" height="163" /></a><a href="http://rbicchierai.files.wordpress.com/2010/03/image32.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb32.png?w=233&#038;h=212" border="0" alt="image" width="233" height="212" /></a></p>
<p>Documentation is at least weak, well ok absent, but there is a test page with a couple of examples. It supports multiple languages, date formats, time formats (!)  and some small custom features. Easy to use and effective.</p>
<h2><a href="http://www.overset.com/2008/05/12/multiday-calendar-datepicker-jquery-plugin/" target="_blank">jCal</a></h2>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image33.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb33.png?w=349&#038;h=244" border="0" alt="image" width="349" height="244" align="right" /></a>Another nice example is <a href="http://www.overset.com/2008/05/12/multiday-calendar-datepicker-jquery-plugin/" target="_blank">jCal </a>by Jim Palmer.</p>
<p>This is a multiday calendar date picker. The focus here is on date range selection, but this seems a nice piece of code.</p>
<p>It is released under MIT license.</p>
<h2><a href="http://jonathanleighton.com/projects/date-input" target="_blank">jQuery Date Input</a></h2>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image34.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb34.png?w=240&#038;h=214" border="0" alt="image" width="240" height="214" align="right" /></a>Last but not least is the <a href="http://jonathanleighton.com/projects/date-input" target="_blank">jQuery Date Input</a> by Jon Leighton, “no frills”, as the author says. “No frills” but a really mature component. Release under MIT license supports all main features like first day of week,  date formatting, css.</p>
<p>Stable and cool, is really pleasant to use.</p>
<p>But it is still not on my way.</p>
<h2>… and now?</h2>
<p>At this point you are probably asking <strong>what I’m looking for</strong>: well have you seen on these components a shine of innovation?</p>
<p><em>I want something more, more original, prettier, cool… not another grid, please!</em></p>
<p>Someone can argue there is no reason to innovate on calendars. A calendar is a calendar, full stop!</p>
<p>Well I’m usually reluctant to change user habits, but sometime I need fresh new air. Licorize, ops, my secret product, is full of new user interface techniques, so why not innovate moving in time?</p>
<p>The inspiration come to me looking at <a href="http://haineault.com/media/jquery/ui-timepickr/page/#d-demo-wrapper-1" target="_blank">jQuery timepickr</a> by Maxime Haineault:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/03/image35.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image_thumb35.png?w=424&#038;h=134" border="0" alt="image" width="424" height="134" /></a></p>
<p>This is a new way to select hours. It’s usage is practical and immediate. The author was brave in choosing to accept the practical limitation of 15 minutes steps, that could receive lots of user complaints, but this always happens when innovating.</p>
<h2>And now, I’m proud to announce my new free-light-weight-jquery-date-picker…</h2>
<p>(read about the <a href="http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/">new version here</a>)</p>
<p><a name="mine"></a></p>
<p><a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" target="_blank"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/03/image41.png?w=258&#038;h=163" border="0" alt="image" width="258" height="163" /></a></p>
<p>At last I decided to develop my own component. I called it <a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" target="_blank">CalendarPicker</a> (<a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" target="_blank">try a demo here</a>). Calendar picker is released it under MIT license.</p>
<p>Eureka! It looks different from all the others, supports multiple languages, and allows fast movement across months and years.</p>
<p>I know that this approach is not suitable for every context, but I hope someone else will find it useful.</p>
<p>The basic usage looks like:</p>
<p><code>$("#calendarFilterBox").calendarPicker(); </code></p>
<p>Of course you will probably need to do something with the selected date <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In this case the callback function will help you:</p>
<pre><code>var dateSelector;
$(function(){
  dateSelector=$("#calendarFilterBox").calendarPicker({callback:function(cal){
    alert(cal.currentDate);
  }});
});
</code></pre>
<p>A function will allow to change the current date. For instance to set date to today:</p>
<pre><code>dateSelector.changeDate(new Date());</code></pre>
<p>A more comprehensive example with names customization looks like this:</p>
<pre><code>$(function(){
  dateSelector=$("#calendarFilterBox").calendarPicker({
    monthNames:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "<em>…more…</em>],
    dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    callback:function(cal){
       $("#mydate").html(cal.currentDate+"");
  }});
});
</code></pre>
<p>Your feedback will be deeply appreciated, as always.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/449/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/449/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=449&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/03/23/so-hard-to-have-a-date/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb19.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb20.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb21.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb22.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb23.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb25.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb26.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb27.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb28.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb29.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb30.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb31.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb32.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb33.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb34.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image_thumb35.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/image41.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>An html sanitizer for C#</title>
		<link>http://roberto.open-lab.com/2010/03/04/a-html-sanitizer-for-c/</link>
		<comments>http://roberto.open-lab.com/2010/03/04/a-html-sanitizer-for-c/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 11:23:01 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[sanitizer]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://rbicchierai.wordpress.com/?p=442</guid>
		<description><![CDATA[After 3 months gestation and some bug fixes, HtmlSanitizer is reporting no hacking successes. Does it mean that it rocks? I don’t think so, but it is probably strong enough to sail in stormy waters. See my previous post to know how it works, but mainly test it online with the Patapage playground. Being honest [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=442&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://rbicchierai.files.wordpress.com/2010/03/sanitizer.jpg"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="sanitizer" src="http://rbicchierai.files.wordpress.com/2010/03/sanitizer_thumb.jpg?w=229&#038;h=278" alt="sanitizer" width="229" height="278" align="left" border="0" /></a> After 3 months gestation and some bug fixes, <a href="http://roberto.open-lab.com/2009/11/05/a-java-html-sanitizer-also-against-xss/" target="_blank">HtmlSanitizer</a> is reporting no hacking successes.</p>
<p>Does it mean that it rocks? I don’t think so, but it is probably strong enough to sail in stormy waters.</p>
<p>See my <a href="http://roberto.open-lab.com/2009/11/05/a-java-html-sanitizer-also-against-xss/" target="_blank">previous post</a> to know how it works, but <strong>mainly</strong> <a href="http://patapage.com/applications/pataPage/site/test/testSanitize.jsp" target="_blank">test it online</a> with the Patapage playground.</p>
<p>Being honest I received some complaints concerning the black list approach to CSS styles, but no one has hacked the current version (yet <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ). In any case the code is open to changes, and I’m happy to receive your feedbacks.</p>
<p>Now we are proud to announce that there is a porting to C# by Beyers Cronje (thank you). You can find C# sources <a href="http://patapage.com/applications/pataPage/site/test/HtmlSanitizer.cs" target="_blank">here</a> (and Java ones <a href="http://patapage.com/applications/pataPage/site/test/HtmlSanitizer.html" target="_blank">here</a>). <span style="color:#ff0000;"> Warning: source code is already patched as suggested by Isaiah</span>.</p>
<p>Other portings are welcome!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/442/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=442&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/03/04/a-html-sanitizer-for-c/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/03/sanitizer_thumb.jpg" medium="image">
			<media:title type="html">sanitizer</media:title>
		</media:content>
	</item>
		<item>
		<title>A delicious javascript tagging input field</title>
		<link>http://roberto.open-lab.com/2010/02/10/a-delicious-javascript-tagging-input-field/</link>
		<comments>http://roberto.open-lab.com/2010/02/10/a-delicious-javascript-tagging-input-field/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 15:42:54 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[jquery; tagging; tag; delicious; api]]></category>

		<guid isPermaLink="false">http://rbicchierai.wordpress.com/?p=404</guid>
		<description><![CDATA[A brief review of existing components and the presentation of the powerful “jquery.tagInput” Once again, working on one of our new secret products (which is called Licorize ), I was in need to select a third party component for speeding up development:  this time, a tagging field. &#8230; before continue reading do you like to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=404&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>A brief review of existing components and the presentation of the powerful “jquery.tagInput”</h1>
<p>Once again, working on one of our new secret products (which is called Licorize <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ), I was in need to select a third party component for speeding up development:  this time, a tagging field.</p>
<p>&#8230; before continue reading do you like to go straight to <a title="Demo of tag javascript component" href="http://bugsvoice.com/applications/bugsVoice/site/test/tagInputDemo.jsp" target="_blank">live demo</a>?</p>
<p>I realized in seconds that I already had in mind a delicious solution. <a href="http://delicious.com/" target="_blank">Delicious</a> (.com) and its wonderful tagging system its really nearly what I wanted, probably even a little more…</p>
<p>What I really love in this component as seen on Delicious is the smoothness of user interaction. Let me explain the concept: try to write a tag directly from the input field and the drop down will show your already used tags, in order of frequency. Amazing, mainly it saves me scrolling the list: most used on top, golden rule. This is not different from what usually the other components do, but in this case the string searched is a little bit “boldified”. This is stylish!</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/02/image.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image_thumb.png?w=581&#038;h=244" border="0" alt="image" width="581" height="244" /></a></p>
<p>Another nice feature of delicious’s tagging field is the integration with “recommended” and “popular”: not only by clicking the tag it is inserted/removed like every nerd-programmer will be able to imagine, but even while you are typing in the input field, the suggested tag is magically highlighted &#8211; this is a masterpiece!</p>
<p>Of course the interface behavior is supported by meaningful contents: suggested tags are computed on the base of the analysis of the url contents and mainly, I suppose,  on other users tagging criteria; having million of users makes the term “statistic” meaningful.</p>
<p>(BTW you can access this data using the Delicious <a href="http://delicious.com/help/api#posts_suggest">api</a>)</p>
<p>The only things I would change in this jewel is the tag separator from [space] to [comma]; this will give you the capability to add multiple word tags, even if it may induce the user in using the tag field as a sort of notes one. So the separator “flavor” may open a <a href="http://en.wikipedia.org/wiki/Pandora%27s_box" target="_blank">Pandora&#8217;s box</a>: if ever in my life I’ll write a tag component &#8211; which I&#8217;ll try to avoid as much as possible.</p>
<p>Apart from the separator, I needed exactly this component, but unluckily it is entangled in Delicious’ js library, so I decided to have a look at available jQuery based components.</p>
<p>As usual this list does not pretend to be complete as I’m focused on developing products, not on writing reviews, but someone else could find my hints useful (I have already wrote some reviews on <a href="http://roberto.open-lab.com/2009/12/21/javascript-charting-tools-an-overview/" target="_blank">charting</a> and <a href="http://roberto.open-lab.com/2010/01/18/javascript-grid-editor-i-want-to-be-excel/" target="_blank">grid</a> components).</p>
<p>The top ranked one  is <a href="http://remysharp.com/2007/12/28/jquery-tag-suggestion/" target="_blank">jQuery tag suggestion</a> by Remy Sharp.</p>
<p><a href="http://remysharp.com/wp-content/uploads/2007/12/tagging.php" target="_blank"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image1.png?w=517&#038;h=70" border="0" alt="image" width="517" height="70" /></a></p>
<p>This nice component is very easy to use and is based on an array of suggested tags that can be supplied via a js array or via Ajax.</p>
<p>A basic axample:</p>
<blockquote>
<pre>$('input.tagSuggest').tagSuggest({  tags: ['javascript', 'js2', 'js', 'jquery']});</pre>
</blockquote>
<p>An Ajax example</p>
<blockquote>
<pre>$('#tags').tagSuggest({  url: '/tag-suggestion'});</pre>
</blockquote>
<p>Layout is configurable via css, and some parameters will help you in fine tuning this component.</p>
<p>Even if this is a nice component it is quite far from Delicious one, at least because it does not implement multiple tag collection: mine, suggested, popular. Another little limitation is that the suggested tag list is static, even if called through Ajax.</p>
<p>Another cool component is <a href="http://plugins.jquery.com/project/tagger" target="_blank">Tagger</a> by <a href="http://chrisiufer.com/" target="_blank">Chris Iufer</a>.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/02/image2.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image_thumb1.png?w=237&#038;h=116" border="0" alt="image" width="237" height="116" /></a></p>
<p>Here the focus is on maintaining  a tag list, instead of filling a field.</p>
<p>Usage is really simple:</p>
<blockquote><p>&lt;input class=&#8221;tagger&#8221; type=&#8221;text&#8221; name=&#8221;tags[]&#8221; /&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>$(document).ready(function(){</p>
<p>// add to tagger element by index</p>
<p>$(&#8216;.tagger&#8217;).eq(0).addTag(&#8216;photo, design, creative&#8217;);</p>
<p>// add to a specific tagger element by Id</p>
<p>$(&#8216;#places&#8217;).addTag(&#8216;mountain view&#8217;);</p>
<p>$(&#8216;#places&#8217;).addTag(&#8216;chico&#8217;);</p>
<p>});</p>
<p>&lt;/script&gt;</p></blockquote>
<p>But this is even farther from my goal…</p>
<p>Even <a href="http://plugins.jquery.com/project/ptags" target="_blank">Pines Tags</a> by Hunter Perrin goes in the wrong direction, at least compared with Delicious. It is focused mainly on writing / removing tags (like the previous one):</p>
<p><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image4.png?w=516&#038;h=83" border="0" alt="image" width="516" height="83" /></p>
<p>The documentation is little bit weak but usage is still easy:</p>
<blockquote><p>$(&#8220;#tags&#8221;).ptags();</p></blockquote>
<p>In the same flow is <a href="http://www.benoitvidis.com/2009/09/jtags-plugin/" target="_blank">JTAG</a> by <a href="http://www.benoitvidis.com/">Benoît Vidis</a></p>
<p><a href="http://www.benoitvidis.com/files/code/jtags/jtags.demo.htm"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image5.png?w=649&#038;h=71" border="0" alt="image" width="649" height="71" /></a></p>
<p>cute, but not my prefered one.</p>
<p>Another component that cought my attention was <a href="http://www.geddesign.com/projects/jquery-magictags/" target="_blank">MagicTags</a> by Dave Geddes.</p>
<p><a href="http://www.geddesign.com/projects/jquery-magictags/" target="_blank"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image6.png?w=546&#038;h=137" border="0" alt="image" width="546" height="137" /></a></p>
<p>Nice graphics, but here the core seems the transitions effects, making the usage of this component at bit annoying.</p>
<p>Nice look, but similar behavior for  <a href="http://devthought.com/wp-content/projects/jquery/textboxlist/Demo/" target="_blank">TestBoxList</a> by <a href="http://devthought.com/">Guillermo Rauch</a>.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/02/image9.png"><img style="display:inline;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image_thumb4.png?w=474&#038;h=51" border="0" alt="image" width="474" height="51" /></a></p>
<p>That’s all folks!  I didn’t find other components, maybe the “tag” search key induces too much noise in search engines, but differently from usual there aren&#8217;t dozens of components, the choice is limited.</p>
<p>So I reached this sad conclusion:</p>
<p><strong>I MUST WRITE MY OWN COMPONENT!</strong></p>
<p>At least now my requirements are clear:</p>
<ol>
<li>supporting already used tag list, eventually filled with an Ajax call</li>
<li>filtering results using user inputs</li>
<li>supporting suggested tags, with “smart” selection</li>
<li>supporting multiple separators</li>
<li>supporting frequency</li>
<li>having a nice-ligth-stylish look</li>
<li>be delicious!</li>
</ol>
<p>After a couple of days of programming this is the result:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/02/image7.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image_thumb2.png?w=602&#038;h=94" border="0" alt="image" width="602" height="94" /></a></p>
<p>typing on the text field a drop down will show your used tags:</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/02/image8.png"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/02/image_thumb3.png?w=603&#038;h=134" border="0" alt="image" width="603" height="134" /></a></p>
<p>I’ve set up a <a title="Demo of tag javascript component" href="http://bugsvoice.com/applications/bugsVoice/site/test/tagInputDemo.jsp" target="_blank">live demo</a> on <a title="BugsVoice" href="http://bugsvoice.com" target="_blank">BugVoice</a> site (new secret product is offline for the moment).</p>
<p>The usage is quite easy at least in the minimal configuration:</p>
<pre style="background-color:#f0f0f0;"><code>&lt;link rel=stylesheet href="jquery.tagInput.css" type="text/css"&gt;
&lt;script type="text/javascript" src="jquery.tagInput.js"&gt;&lt;/script&gt;</code></pre>
<p>insert your input field:</p>
<pre style="background-color:#f0f0f0;"><code>tags: &lt;input type="text" size="80" id="tag" &gt;</code></pre>
<p>then instantiate the component:</p>
<pre style="background-color:#f0f0f0;"><code>&lt;script type="text/javascript"&gt;
var myTags=[
  {tag:"js",freq:30},{tag:"jquery",freq:25},
  {tag:"pojo",freq:10},{tag:"agile",freq:4},
  {tag:"blog",freq:3},{tag:"canvas",freq:8},
  {tag:"dialog",freq:3},{tag:"excel",freq:4} ]   $("#tag").tagInput({ tags:myTags})
&lt;/script&gt;</code></pre>
<p>This is just a static case example; in case you have thousands of tags, you should use something like a Json Ajax call.</p>
<p>There are some configuration parameters, this is the complete list:</p>
<ol>
<li><strong>tags</strong>: is a Json array of objects with “tag” and “freq” properties; freq is not mandatory if you do not use it for sorting. It is not mandatory if jsonUrl is specified.</li>
<li><strong>jsonUrl</strong>: will receive the text of current tag typed in the “search” parameter.</li>
<li><strong>autoFilter</strong>:  true/false  default=true when active shows only matching tags, &#8220;false&#8221; should be used for server-side filtering</li>
<li><strong>autoStart: </strong>true/false default=false when active the dropdown will appear straight on entering the field, otherwise only while typing</li>
<li><strong>sortBy: </strong>&#8220;frequency&#8221;|&#8221;tag&#8221;|&#8221;none&#8221;  default=&#8221;tag&#8221;. When sorting by frequency is on, the filler should report the “freq” property for each tag</li>
<li><strong>tagSeparator: </strong>default=&#8221;,&#8221; any separator char as space, comma, semicolon</li>
<li><strong>boldify: </strong>true/false default true “boldify” the matching part of tag in the dropdown box</li>
<li><strong>suggestedTags: </strong>callback function to retrieve an object array like ["sugestedtag1","sugestedtag2","suggestedtag3"].If this parameter is not present tag suggestion functionality will be kept hidden.</li>
<li><strong>suggestedTagsPlaceHolder: </strong>jQuery proxy for suggested tag placeholder. If it is not supplied it is created below the input field. When placeholder is supplied (hence unique), tagField should be applied on a single input.Something like  $(&#8220;#myTagFiled&#8221;).tagField(&#8230;) will work fine: $(&#8220;:text&#8221;).tagField(&#8230;) probably not!</li>
</ol>
<p>so a more complex example will look like:</p>
<pre style="background-color:#f0f0f0;"><code>&lt;link rel=stylesheet href="jquery.tagInput.css" type="text/css"&gt;
&lt;script type="text/javascript" src="jquery.tagInput.js"&gt;&lt;/script&gt; 

tags: &lt;input type="text" size="80" id="tag" &gt;
suggested tags: &lt;span id="suggested" class="tagInputSuggestedTagList"&gt;&lt;/span&gt; 

&lt;script type="text/javascript"&gt;
  $(function(){
    $("#tag").tagInput({
      jsonUrl:"tags.jsp",
      sortBy:"frequency",
      suggestedTags:  ["jquery","tagging","tag","component"],
      tagSeparator:" ",
      autoFilter:false,
      autoStart:false,
      boldify:true,
      suggestedTagsPlaceHolder:$("#suggested")
    })
})
&lt;/script&gt;</code></pre>
<p>in this case the jsonUrl “tags.jsp” is a silly JSP page that will return 4 tags starting with the text typed by the user. Here the sample code:</p>
<pre style="background-color:#f0f0f0;"><code>&lt;%@ page import="net.sf.json.JSONArray, net.sf.json.JSONObject" %&gt;&lt;%
  JSONArray jsa= new JSONArray();
  String search=request.getParameter("search")
  search=null?"":search;
  for (int i=1;i&lt;5;i++){
    JSONObject o= new JSONObject();
    o.element("tag",search+i);
    o.element("freq",i);
    jsa.add(o);
  }
  out.print(jsa.toString());
%&gt;</code></pre>
<p>This component is released under <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a>. Enjoy it!</p>
<p>Any feedback will be really appreciated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/404/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=404&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/02/10/a-delicious-javascript-tagging-input-field/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/02/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript grid editor: I want to be Excel</title>
		<link>http://roberto.open-lab.com/2010/01/30/javascript-grid-editor-i-want-to-be-excel/</link>
		<comments>http://roberto.open-lab.com/2010/01/30/javascript-grid-editor-i-want-to-be-excel/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 08:31:00 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[spreadsheet]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://roberto.open-lab.com/?p=313</guid>
		<description><![CDATA[A short list of my favorite JavaScript grid components. How many times did you hear users asking you: “something simple, a grid like excel”? When I was a VB programmer, oh yes, I have this dark spot on my career, and it is not the only one… this request threw me in panic. Usually what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=313&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>A short list of my favorite JavaScript grid components.</h1>
<p>How many times did you hear users asking you: “something simple, a grid like excel”?</p>
<p>When I was a VB programmer, oh yes, I have this dark spot on my career, and it is not the only one… this request threw me in panic. Usually what your “killer” is asking you is not what you, programmer, are thinking of (namely the power of cell functions, programmability, graph etc., that probably your “killer” does not even imagine): what they are thinking about is the editor flexibility, the ability to add columns, rows, move cells blocks, copy and paste from different sources.</p>
<p>After the ritual pointing-out that your application is NOT Excel, the VB solution was to adopt the standard flexGrid or the mythical TrueDbGrid that made happy both the killer-user and the victim-programmer.</p>
<p>But my VB era is long gone and nowadays I’m fighting with JavaScript and Java web applications; how to address the same old request of “something like Excel”?</p>
<p>I spent some days looking around for a solution. I warn you that this post does not pretend to be a complete list of available grid/table editors and that my investigation is mainly  “emotional”: I want to feel on a web-app the same prickle that I experience when using Excel.</p>
<p>Of course it is not only romantic surfing, I needed to edit data to fill the graph snipplet for <a href="http://patapage.com" target="_blank">Patapage</a>, so there are some “nice to have” requirements: to be free of charge, light, based on jQuery, appealing. Server side aspects as pagination, sorting, CRUD etc. are for the moment not the crucial points as the amount of information I need to manage is limited and a totally client side solution would be acceptable.</p>
<p>Actually the implementations I found can be classified in three main groups:</p>
<ol>
<li><strong>data driven</strong>: these are generally components with all the features needed for listing a large number for rows, with server-side pagination, scrolling, search and sort functionality; generally are lacking editing functionality, or when the feature is present is single row based, reflecting the fact that there is an underlying database. Data binding is made through XML or Json, depending the language supported server-side</li>
<li><strong>light edit</strong>: here the focus is given to the “editing agility”, every row is always in editing status,  search and sort are rarely available and in any case working on a limited set of rows isn’t a real limitation. Data is filled starting from a JS object, calling methods, or from an html table.  Some of these implementation supply callback methods that can be used to interact server side.</li>
<li><strong>spreadsheets</strong>: oh yes! there are also some really sophisticated JS clones of the glorious one! These are generally  complex solution (in terms of dependencies), supporting formulas, graphs and lot of functionalities. Here the focus is the “simulation effect”, data management and server side integration are really in background.</li>
</ol>
<p>When I started my search I didn’t imagine that there were so many solutions, so I decided that it would be better here to limit the result to the ones based on jQuery. Lets go in depth :</p>
<h1></h1>
<h2>Data Driven</h2>
<p>One great example of this category is <a href="http://www.trirand.com/blog/" target="_blank">jqGrid</a> by Tony Tomov. This is a really well engineered solution released under MIT and GPL licenses.</p>
<p><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image51.png?w=464&#038;h=171" alt="image" width="464" height="171" align="left" border="0" />Supports pagination, search, sort and even edit. There are two specific versions for PHP and .NET that drastically reduce the server-side implementation effort. Loading data is supported in multiple ways through XML, JSON or JS arrays and examples are supplied for PHP and MySql. There is a third party Ruby example <a href="http://www.rubyrailways.com/add-a-powerful-ajax-table-to-your-rails-application-in-5-minutes/">here</a>.</p>
<p>It uses jQuery.UI components for display, so the look and feel is pretty.  Switching to edit mode is something perceivable, the user will see that the edit is active, but this is not necessarily bad in this class of components.</p>
<p>It supports sub-grids, multiple input types, master-detail, multi-selections and other useful features.<br />
Column configuration is done in a declarative way using JS objects:</p>
<blockquote>
<pre>colNames:['Inv No','Date', 'Client', 'Amount'],
colModel:[ {
  name:'id',
  index:'id',
  width:55,
  editable:false,
  editoptions:{readonly:true,size:10}
},…</pre>
</blockquote>
<p>that gives you the flexibility you need for well tailored applications.</p>
<p>Seems a rock solid components, the behavior in resizing, scrolling, paging is really pleasant.</p>
<p>Documentation is not the strongest point but there are lots of examples that will help setting up your grid.</p>
<p><a name="DataTables"></a>by Allan Jardine released under GPL v2 and BSD is a powerful data grid component.</p>
<p><a href="http://www.datatables.net/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image19.png?w=476&#038;h=195" alt="image" width="476" height="195" align="right" border="0" /></a></p>
<p>Supports pagination, resizing, filtering, multi-column sorting, jQuery UI theme roller, and lots of interesting features.</p>
<p>Data feeding is provided <em>a-la-carte</em>, from DOM, Ajax XML or JSON sources, JS arrays… it’s your choice!</p>
<p>There is also the icing on the cake: cells and rows grouping, cell custom renderer, multi-row selection and much more.</p>
<p>Provides cell editing via <a href="http://www.appelsiini.net/projects/jeditable" target="_blank">jEditable</a> cell-by-cell, not a row at once, and this in some cases could be a limitation; so you may need more that one update to change a row. Probably you can work around this trivia-point.</p>
<p>Configurations starts from zero-config in case of DOM feeding and can be refined to a real full-control using JS objects.</p>
<p>It is well-documented with a large set of examples and this is another plus!</p>
<p>A black spot (at least for me, Java programmer): server side examples in PHP only.</p>
<p>Another valid example is <a href="http://flexigrid.info/" target="_blank">Flexgrid</a> by <a name="Flexigrid"></a></p>
<p>What I really appreciated in this component is the lightness and its simplest feeding example based on an html table. In this case  the whole setup consists of:</p>
<blockquote>
<pre>$(“#mytable”).flexigrid();</pre>
</blockquote>
<p><a href="http://flexigrid.info/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image15.png?w=414&#038;h=289" alt="image" width="414" height="289" align="right" border="0" /></a></p>
<p>Of course this is a quite minimalist approach to this component that supports also XML and JSON data feeding.</p>
<p>Paging, sorting, resizing and other nice features like button injection are supported.</p>
<p>What is missing is the edit capability that is planned but still not released.</p>
<p>Similarly to the previous component the configuration (if needed <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) is done by JS objects.</p>
<p>Documentation: we all are programmers, we hate to write it but we love to read it… so here too is really succinct with few examples for PHP server-side both XML and JSON.</p>
<p><a href="http://dreakmore.info/tgrid/demos/" target="_blank">tgrid</a> by Mateusz Mikołajczyk is a lightweight datagrid, that supports all main features like sorting, paging, filtering.</p>
<p><a href="http://dreakmore.info/tgrid/demos/"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image141.png?w=473&#038;h=233" alt="image" width="473" height="233" align="left" border="0" /></a></p>
<p>I didn’t discover the license type so be careful on usage.</p>
<p>Data is fed by Ajax Json calls that make this component scalable enough.</p>
<p>Documentation supplied is “short” but with some examples, so setup is not a big deal.</p>
<p>This components supports a “row rough” edit, in the sense that it is not in-place, but out of the grid: it did not give me the right feeling. Taken out the edit, tgrid runs well.</p>
<p>Configuration does not offer many options; something nice is the cell custom renderer that allows you to format data.</p>
<p><a href="http://reconstrukt.com/ingrid/" target="_blank">Ingrid</a> (great name!) is a less powerful grid component, but it is really unobtrusive and cute enough to be considered. Released under GPL license, it supports column resizing, sorting, paging etc.</p>
<p><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image21.png?w=354&#038;h=242" alt="image" width="354" height="242" align="left" border="0" /></p>
<p>Data is fed only by providing an html table, and this could find some criticism.</p>
<p>Google Chrome support has some little creeps on display.</p>
<p>Multiple row selection is a nice feature that earns some points to this component.</p>
<p>Editing is not supported.</p>
<p>In the same spirit of loveliness <a href="http://www.overset.com/2008/08/30/animated-sortable-datagrid-jquery-plugin-jtps/">jTps</a> by Jim Palmer is released under MIT license.</p>
<p><a href="http://www.overset.com/2008/08/30/animated-sortable-datagrid-jquery-plugin-jtps/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image71.png?w=468&#038;h=205" alt="image" width="468" height="205" align="right" border="0" /></a></p>
<p>Paging, resizing, sorting are supported; a nice feature is smooth scrolling. Even in this case editing is not supported, but the real limit of this component is in term of scalability: data feeding does not support Ajax sub-sequential loading, so all data is loaded at once. Paging is only client side limiting the meaning of this feature.</p>
<p>Same category for <a href="http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml" target="_blank">dhtmlxGrid</a> by <a href="http://www.dhtmlx.com" target="_blank">DHTMLX</a>.</p>
<p><a href="http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml" target="_blank"><img style="display:inline;border:0;margin:0 5px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2011/02/image17.png?w=364&#038;h=270" alt="image" width="364" height="270" align="left" border="0" /></a>dhtmlxGrid is a JavaScript grid component with editing capabilities, and server-side data binding. It is a powerful component with so much advanced features (such as filtering, searching, grouping, charts integration, math formulas, etc.) that it could be included in “Spreadsheet” group too <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>dhtmlxGrid is distributed under GNU GPL v2, but also available under a commercial license.</p>
<p>It is built over a “dhtmlxcommon” js library instead of most famous jQuery or Prototye libraries, but this is not a big deal if you need such powerful component.</p>
<p>For the sake of completeness I have to cite <a href="http://dev.iceburg.net/jquery/tableEditor/demo.php" target="_blank">TableEditor</a> by Brice Burgess that seems a little bit outdated (even if really well indexed), and <a href="http://snowcore.net/jquery-data-grid-%D0%BF%D0%B8%D1%88%D0%B5%D0%BC-%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD" target="_blank">Snowcore’ jQuery Data Grid</a> that is in Russian and this fact did not help me to understand how to use it; moreover the site icon <a href="http://rbicchierai.files.wordpress.com/2010/01/noie.jpg"><img style="display:inline;border-width:0;" title="noie" src="http://rbicchierai.files.wordpress.com/2010/01/noie_thumb.jpg?w=15&#038;h=15" alt="noie" width="15" height="15" border="0" /></a> let’s me suppose that IE testing is not a priority for Snowcore <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>Light Edit</h2>
<p>This category, as before stated,  is mainly focused on edit agility instead of server-side data management. This fact steers the implementation towards a all-client-side approach. Implementations in this category are generally a little bit rough with respect to the previous ones.</p>
<p><a href="http://wiki.github.com/mleibman/SlickGrid"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image25.png?w=359&#038;h=331" alt="image" width="359" height="331" align="left" border="0" /></a>A  real interesting exception is the excellent <a href="http://wiki.github.com/mleibman/SlickGrid" target="_blank">SlickGrid</a> by Michael Leibman released under MIT style license.</p>
<p>Here the author is particularly careful in rendering performance; he uses a virtual rendering technique to limit the number of DOM elements in order to make SlickGrid really scalable. The example provided with 50000 rows really run in a flash.</p>
<p>The author states in the “grid vs data” paragraph that here the focus is on the grid, not on the data. Despite his intentions, sorting, resizing, filtering, resizing and edit callbacks, give this grid a place even in in the previous category.</p>
<p>Data feed can be done via JS arrays, or via Ajax using the Slick.Data.RemoteModel object provided.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/01/image9.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image_thumb9.png?w=267&#038;h=110" alt="image" width="267" height="110" align="right" border="0" /></a>Custom cell renderer allows you to express your creativity, as shown explicitly in the examples when injecting a Sparkline graph in the last column (see my <a href="http://roberto.open-lab.com/2009/12/21/javascript-charting-tools-an-overview/" target="_blank">previous post</a> for a excursus on charting components).</p>
<p>Rows multi-selection, ordering, and custom row rendering using John Resig&#8217;s <a href="http://ejohn.org/blog/javascript-micro-templating/">micro-templates</a> makes this component really flexible.</p>
<p>Configuration is done as usual using JS objects.</p>
<p>Having all this features and also having taken care of cell movements with the keyboard and easy editing is a great achievement!  Thanks Michael.</p>
<p>Once again Allan Jardine provides us a useful tool called <a href="http://www.sprymedia.co.uk/article/KeyTable">keytable</a> that injects Excel-like key movement on a generic table.</p>
<p><a href="http://www.sprymedia.co.uk/article/KeyTable"><img style="display:inline;border-width:0;margin:0 10px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image40.png?w=423&#038;h=142" alt="image" width="423" height="142" align="left" border="0" /></a>This can have multiple usages as exemplified on demos available on the site. It easy to understand how a key-movement can change the user experience when it is used on a powerful grid component like DataTables (<a href="#DataTables">see above</a>). Here the author’ <a href="http://www.sprymedia.co.uk/software/KeyTable/datatable.html">example</a>.</p>
<p>Another really basic example of editable table is supplied by Greg Weber with <a href="http://gregweber.info/projects/uitableedit">uiTableEdit</a>: there are no examples online, so I built a simple test page, and the components just add the capability to change the cell value. No key movement or other additional features are handled; it can be used as starting point for further refinement.</p>
<p><a href="http://joshhundley.com/teditable-in-place-editing-for-tables/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image36.png?w=244&#038;h=202" alt="image" width="244" height="202" align="right" border="0" /></a>Same kind of “roughness” for <a href="http://joshhundley.com/teditable-in-place-editing-for-tables/">tEditable</a> by Josh Hundley, where edit is click based, and key-movement is not supported. This do not mean that this tools is useless, just that it is really far from a complete solution.</p>
<p>It converts DOM cells to text-areas on the fly when editing, and this makes this component almost setup-free.</p>
<p>A part of this category (the rough part <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) is my contribution, used to fill data on <a href="http://patapage.com/applications/pataPage/site/test/testGraph.jsp">PataPage&#8217; charting playground</a>.</p>
<p><a href="http://patapage.com/applications/pataPage/site/test/testGraph.jsp"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image45.png?w=298&#038;h=144" alt="image" width="298" height="144" border="0" /></a> <a href="http://patapage.com/applications/pataPage/site/test/testGraph.jsp"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image48.png?w=286&#038;h=144" alt="image" width="286" height="144" border="0" /></a></p>
<p>Here the functionality are really basic: key-movement, edit, load from url, add and remove only are supported. The grid content is “saved” on a text area with \t and \n separators: same format expected when loading from url. I’m working for supporting  the ^v (paste) capability to facilitate user data insertion as block of cells.</p>
<h2>Spreadsheet</h2>
<p>Actually this category comprises solution wider than previous ones, in the sense that a complete solution will probably include all the features listed before; this is on one side a plus, but on the other side if you are interested in extracting some parts (e.g. table edit but not on formulas, server-side integration but not on key-movement etc.), this could be a little difficult due to the complexity of the solutions available.</p>
<p>Light years beyond other solutions at least as first impression, <a href="http://jqueryplugins.weebly.com/jquerysheet.html" target="_blank">jQuery.sheet</a> by Robert Plummer is a really wonderful library. I didn’t find the license type.</p>
<p><a href="http://jqueryplugins.weebly.com/jquerysheet.html"><img style="display:inline;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image60.png?w=609&#038;h=254" alt="image" width="609" height="254" border="0" /></a></p>
<p>Really looks like an Excel sheet and the key-movement seems realistic.</p>
<p>Data feeding is done using a DOM table, eventually Ajax-loaded, or by adding row and cols programmatically.</p>
<p>The grid supports resizing, but the real wondering feature is the cell-function support. Not limited to SUM, AVG and other standard functions, but also chart are allowed.</p>
<p>Lots of callback will help you to integrate the sheet on you application.</p>
<p>There are some little bugs on cell selection and some minor layout issue with Chrome, but the overall behavior is impressive.</p>
<p>The last, but definitively not least, example of websheet (a web spreadsheet) is the Googledocs one. It is a really good live-teaching example, and even if it is not a ready-to-use library I suggest you to open it and dissect it with, for instance, <a href="http://getfirebug.com/" target="_blank">Firebug</a>.</p>
<p>It is interesting to see how many tricks they used: the whole grid is one iframe, the rows are grouped in small tables of 20 rows (probably in order to scale on IE), the cell value is stored in the <em>td</em> dom; when you edit a cell a text area is printed over the cell (not inside), and so on.</p>
<p>I tried to implement my grid using the same structure, but after some hours I surrendered; the effort to “master” the layout was over my actual estimation, and I fell back to the solution discussed above.  Would be gorgeous to have a jQuery open-source implementation like this!</p>
<p>Google docs spreadsheet is the only application I found that gave me  the right prickle!</p>
<p>Well I stopped my searching here, and I didn’t explore Mootools, Sriptacolous, Ext and maverick ones in detail.</p>
<p>There is a booklet for this blog post <a href="http://licorize.com/projects/rbicchierai/i-want-to-be-excel" target="_blank">here on licorize.com</a>. (<a href="http://licorize.com" target="_blank">Licorize </a>is one of my latest creations, please take a look)</p>
<p>I’ll just list here some other libraries I found:</p>
<p><a href="http://blog.tremend.ro/wp-content/uploads/2006/09/spreadsheet_custom_build/test_spreadsheet.htm" target="_blank">Spreadsheet Dojo Widget</a> <a href="http://blog.tremend.ro/wp-content/uploads/2006/09/spreadsheet_custom_build/test_spreadsheet.htm"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image16.png?w=401&#038;h=198" alt="image" width="401" height="198" align="right" border="0" /></a></p>
<p><a href="http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image23.png?w=398&#038;h=202" alt="image" width="398" height="202" align="right" border="0" /></a></p>
<p><a href="http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html">Ext JS DataGrid</a></p>
<p><a href="http://developer.yahoo.com/yui/examples/datatable/index.html">YUI 2 DataTable</a><a href="http://developer.yahoo.com/yui/examples/datatable/index.html"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image24.png?w=402&#038;h=276" alt="image" width="402" height="276" align="right" border="0" /></a></p>
<p><a href="http://www.simple-groupware.de/cms/Spreadsheet/Home">Simple Spreadsheet</a><a href="http://www.simple-groupware.de/cms/Spreadsheet/Home"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image17.png?w=397&#038;h=250" alt="image" width="397" height="250" align="right" border="0" /></a></p>
<p><a href="http://www.blueshoes.org/en/javascript/spreadsheet/" target="_blank">BlueShoes SpSpeadsheet editor</a> <a href="http://www.blueshoes.org/en/javascript/spreadsheet/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image18.png?w=400&#038;h=204" alt="image" width="400" height="204" align="right" border="0" /></a></p>
<p><a href="http://trimpath.com/demos/test1/trimpath/spreadsheet_demo0.html" target="_blank">TrimSpreadsheet</a> <a href="http://trimpath.com/demos/test1/trimpath/spreadsheet_demo0.html"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image20.png?w=398&#038;h=126" alt="image" width="398" height="126" align="right" border="0" /></a></p>
<p><a href="http://www.sigmawidgets.com/products/sigma_grid2/">Sigma Grid 2.2</a><a href="http://www.sigmawidgets.com/products/sigma_grid2/"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image22.png?w=403&#038;h=207" alt="image" width="403" height="207" align="right" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=313&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/01/30/javascript-grid-editor-i-want-to-be-excel/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image51.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image19.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image141.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image21.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image71.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2011/02/image17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/noie_thumb.jpg" medium="image">
			<media:title type="html">noie</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image25.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image40.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image36.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image45.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image48.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image60.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image23.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image20.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image22.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>30 years riding IT: part3</title>
		<link>http://roberto.open-lab.com/2010/01/29/30-years-riding-it-part3/</link>
		<comments>http://roberto.open-lab.com/2010/01/29/30-years-riding-it-part3/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 07:04:43 +0000</pubDate>
		<dc:creator>Roberto Bicchierai</dc:creator>
				<category><![CDATA[in english]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[my life]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[mz-700]]></category>
		<category><![CDATA[sharp pc1500]]></category>

		<guid isPermaLink="false">http://rbicchierai.wordpress.com/?p=255</guid>
		<description><![CDATA[1983 Technology was running fast in that era, and just when I started studying Synthetic Programming (a way to use some more non documented function in your rpn code for HP41cv), (see previous blog) Massimo bought, in a Suisse shop, a terrific new programmable calculator the Sharp PC-1500, shouting me in panic. Sharp PC-1500 was, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=255&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1983</p>
<p>Technology was running fast in that era, and just when I started studying Synthetic Programming (a way to use some more non documented function in your rpn code for HP41cv), (<a href="http://roberto.open-lab.com/2009/10/16/30-year-riding-it-part2/">see previous blog</a>) Massimo bought, in a Suisse shop, a terrific new programmable calculator the Sharp PC-1500, shouting me in panic.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/pc1500.jpg"><img style="display:inline;border-width:0;" title="pc1500" src="http://rbicchierai.files.wordpress.com/2009/12/pc1500_thumb.jpg?w=574&#038;h=260" border="0" alt="pc1500" width="574" height="260" /></a></p>
<p>Sharp PC-1500 was, in my mind, the best technology the humanity could do in that years.</p>
<p>PC-1500 have a real-shaped keyboard, 4Kb RAM, a dot addressable display (7&#215;156 dot LCD), a plotter (not included) and a “standard” programming language that do not force me to think like a polish men <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  and “she” talks BASIC!</p>
<p>After two shop painted, three days as HiFi expert for Saba stand in a local electronic event, and selling of my “old” HP 41cv, I got enough money to take a train, go to Suisse and buy my “new” PC-1500.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/01/dia_00761.jpg"><img style="display:inline;margin-left:0;margin-right:0;border:0;" title="DIA_00761" src="http://rbicchierai.files.wordpress.com/2010/01/dia_00761_thumb.jpg?w=352&#038;h=391" border="0" alt="DIA_00761" width="352" height="391" align="right" /></a>In the meanwhile, my studies going slowly. Chemistry, Geometry, Physics, Design was interesting, but I spent a lot of days on my PC-1500, looking a way to make enough money to have the freedom to do what I really love: travel around the world taking pictures.</p>
<p>But my parents was more realistic than me and: “no exams? no money!”, so I enter a loop where I play with PC-1500 -&gt; no time to study -&gt; no exams passed -&gt; no money from parents -&gt; find a work to get money -&gt; spend money in traveling -&gt; study just a little -&gt; pass an exam -&gt; write a lot of code -&gt; do money …. and so on.</p>
<p>This style-of-life hang me on Engineering faculty for about 14 years <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>Back to PC1500:</p>
<p>Sharp PC1500 was a very well done product (was the “porting” of the Tandy/Radio Shack TRS-80 PC-2.), so was tested and robust.</p>
<p>PC-1500 with its printer/plotter was able to record the programs on audio cassettes. In this way we could save our production.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/asteroids.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="Asteroids" src="http://rbicchierai.files.wordpress.com/2009/12/asteroids_thumb.png?w=319&#038;h=365" border="0" alt="Asteroids" width="319" height="365" align="right" /></a> But the life it is not only work! Massimo and me were used to spend spare time playing the latest video game: asteroids! There we started, probably, the first experiment with “pair programming”: one to the joystick, the other one to the buttons. Sometime we get the hi-score and as there was only 3 char to write the name we create our brand: <strong>R&amp;M.</strong></p>
<p>With this brand we signed about 150 projects and product.</p>
<p>Back to PC1500 again:</p>
<p>The strongest exam on the first year for an Engineer was Mathematics I. Function studies, integral, series, and son on. Sometime have an idea on what you have to study for you exam could be helpful. So we start a production of mathematical software able to:</p>
<ol>
<li>Plot your function on PC-1500 plotter (plotting during the exam is a little bit noisy, but you can use your coat, even in July with 30°, to cover the plotter), its first and second derived.</li>
<li>Know a-priori if a series on integral converge or diverge.</li>
<li>Know a-priori if your function can have zeros</li>
</ol>
<p>With this tools, the written part of Mathematics I examination was like a joke.</p>
<p>Writing this software I learned a lot about basic, number, precision etc. So we were ready to start something more professional.</p>
<p>The “Medicina II” an University’s Clinic was looking for someone able to translate an old statistical program to its newest Apple IIe.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/appleiiright.jpg"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="appleii-right" src="http://rbicchierai.files.wordpress.com/2009/12/appleiiright_thumb.jpg?w=302&#038;h=352" border="0" alt="appleii-right" width="302" height="352" align="left" /></a></p>
<p>Software that we are called to translate was written “on paper” using a graphical notation and typed (or recalled) on a strange <a href="http://it.wikipedia.org/wiki/Olivetti_Programma_101" target="_blank">Olivetti Programma 101 “computer”</a></p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/olivetti_programma101.jpg"><img style="display:inline;border-width:0;" title="olivetti_programma101" src="http://rbicchierai.files.wordpress.com/2009/12/olivetti_programma101_thumb.jpg?w=334&#038;h=377" border="0" alt="olivetti_programma101" width="334" height="377" /></a></p>
<p>The work was amazing but we learnt for the first time that the BASIC is not exactly the same BASIC everywhere; and the calculus too, can be slightly different.</p>
<h3>LESSON 1: STANDARDS ARE STANDARDS, REAL WORLD NOT!</h3>
<p>But that was the very first “paid-software” we did.</p>
<p>Obviously at that time the code was to keep “secret” and we used several tricks to protect our production (control char like ^L in the source code, remove commands etc.).</p>
<p>The hungry of knowledge brought us explore wider territory.</p>
<p>I bought in Paris a funny book “Graphism Scientific pour l’ordinateur personnel” and we started new graphic experiment on pc1500’s plotter that was really not enough.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/image.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="image" src="http://rbicchierai.files.wordpress.com/2009/12/image_thumb.png?w=370&#038;h=433" border="0" alt="image" width="370" height="433" align="right" /></a> We discover in a dark side of S.Marta (S. Marta is were <a href="http://www.ing.unifi.it/" target="_blank">Engineering Faculty</a> is located in Florence. It is was a big old monastery with a kind of dungeon underground) a terminal connected to a PDP server. It was definitively forbidden for newbies like us, but after some days of circuiting the administrator we get a limited  access to read the on-line manual. But the manual was for “standard” user and we need something more, so we get a copy of administrator manual and we started to experimenting new powerful command. Unluckily something went wrong and we launched a process that write something in the “on-paper console” without a way to stop it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  . All this happened in the late evening with nobody near the printer and the printer well locked behind a strong door.</p>
<p>The day after, 1 kilometer of paper was finished and our first PDP experience too.</p>
<p>Working on PC-1500 was really less dangerous!</p>
<p>The AI (artificial intelligence) is (or was…)  an amazing science and we read something about experts systems, and that Lisp was the best language to implement it.</p>
<p>The mythical Texas Instruments’ Lisp machine was light year far for our dreams, and we have to arrange something less expensive.</p>
<p>We get some BASIC code for a Lisp interpreter written by I-don’t-remember-which University and we decide to “port” it to PC-1500. The article was full of theoretical induction about Lisp language, and the porting went quite smoothly.</p>
<p>The performances was not excellent, minutes to evaluate “(+ 1 2 3 4)”,  but the experiment was interesting at least because give use the chance to realize something based on strong theory and to learn something about Lisp. Our attempt to create an expert system sunk on the performance beach.</p>
<p>Not completely happy with Lisp interpreter experience we decide to develop a BASIC “expert system” trained in mushroom identification.</p>
<p>In our expert system experience we discover, for the first time that, sometime, a simple and direct solution could be more and more effective than a solution “based on strong theoretical fundaments”.</p>
<p>Our expert system was used and trained with fun for years by a mycological group in Florence: the Lisp one, died before to bloom.</p>
<h3>LESSON 2: SOMETHING RUNNING MAKES USER HAPPIER THAN A THEORY</h3>
<p>After AI we go back studying “graphism scientific”; reading French computer’s book is really <a href="http://rbicchierai.files.wordpress.com/2009/12/sharpentiers_08.jpg"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="sharpentiers_08" src="http://rbicchierai.files.wordpress.com/2009/12/sharpentiers_08_thumb.jpg?w=318&#038;h=365" border="0" alt="sharpentiers_08" width="318" height="365" align="left" /></a>funny experience. I suggest to taste “la mémoire vive de votre ordinateur”.</p>
<p>Another source of inspiration was the french magazine “<a href="http://www.sharpmz.org/sharpentiers.htm" target="_blank">Sharpentiers</a>” (that sound like “carpenter” that reflects quite well the “hand made” style of that years) dedicated to Sharp users.</p>
<p>In some week we develop a “3D wireframe CAD” for PC-1500 (do you know that for rotate a 3D object the algorithms uses the matrix? We do not! But we learned it some years late in our study, when the problem was completely solved: sometime studies are useful!).</p>
<p>The CAD was funny and even if data insertion for complex drawing was a nightmare, an Architect’s studio want to use it. So we “port” our Cad to the very best of Sharp: MZ-700.</p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/mz7001a.jpg"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="mz-700-1a" src="http://rbicchierai.files.wordpress.com/2009/12/mz7001a_thumb.jpg?w=323&#038;h=369" border="0" alt="mz-700-1a" width="323" height="369" align="right" /></a> They pay a lot of money, for that time our standard: 170.000 ITL (about 85€ )</p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/01/image26.png"><img style="display:inline;margin-left:0;margin-right:0;border:0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image_thumb15.png?w=222&#038;h=266" border="0" alt="image" width="222" height="266" align="left" /></a></p>
<p><a href="http://rbicchierai.files.wordpress.com/2009/12/clip_image0121.jpg"></a></p>
<p><a href="http://rbicchierai.files.wordpress.com/2010/01/image27.png"><img style="display:inline;border:0;margin:0 15px 0 0;" title="image" src="http://rbicchierai.files.wordpress.com/2010/01/image_thumb16.png?w=188&#038;h=260" border="0" alt="image" width="188" height="260" align="left" /></a></p>
<p>But the luck smiles to the brave, and in a Florence book store I found a strange blue book: the “PC 1500 Technical Reference Manual” was at that time in Italy one of the most wanted book for PC-1500 owner.</p>
<p>This manual opens the hardware and software architecture to our hands.</p>
<p>Sharing that information with our friend (share doesn’t necessary means “for free”, so this manual became a great business) we meet a large group of PC-1500 users.</p>
<p>There we discovered that one of pins in the PC-1500 connector, was suitable for one-to-one (probably now “pear-to-pear” sounds better) communication. First of all we need a 60pin half pass connector, but it was not available in almost all electronics’ shop in Italy.</p>
<p>Florence is the artisan’s mainland, and with the patience of our ancestors I build my 60pinhalfpass connector. Was really disgusting to see, but was working.</p>
<p>In the meanwhile the German PC-1500’s user group will develop the Macro assembler compiler and a Forth interpreter. We bought both.</p>
<p>With Technical manual, macro assembler, and cable we are ready to start the first 1-to-1 communication software. Obviously the only way we can use to communicate is to open/close a single port. It is not so easy to use one port for bidirectional communication, and we invented our protocol. The unexpected, sometime mystical, behavior force us to learn about timing, clock cycle, slopes, micro-instruction length, and all thing that make me happy to develop now in java without knowing anything about hardware and operating system too.</p>
<p>But in the end the communication software was very well running, and very useful to communicate with Massimo during one of infinite Engineering exams.</p>
<hr size="1" /><a name="_ftn1_7437"></a> http://www.pc1500.com/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rbicchierai.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rbicchierai.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rbicchierai.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.open-lab.com&amp;blog=9711353&amp;post=255&amp;subd=rbicchierai&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.open-lab.com/2010/01/29/30-years-riding-it-part3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/463bee7888aaf9f21ef6e6506622d6f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rbicchierai</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/pc1500_thumb.jpg" medium="image">
			<media:title type="html">pc1500</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/dia_00761_thumb.jpg" medium="image">
			<media:title type="html">DIA_00761</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/asteroids_thumb.png" medium="image">
			<media:title type="html">Asteroids</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/appleiiright_thumb.jpg" medium="image">
			<media:title type="html">appleii-right</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/olivetti_programma101_thumb.jpg" medium="image">
			<media:title type="html">olivetti_programma101</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/sharpentiers_08_thumb.jpg" medium="image">
			<media:title type="html">sharpentiers_08</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2009/12/mz7001a_thumb.jpg" medium="image">
			<media:title type="html">mz-700-1a</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image_thumb15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rbicchierai.files.wordpress.com/2010/01/image_thumb16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
