<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ACuriousAnimal</title>
	
	<link>http://acuriousanimal.com/blog</link>
	<description>Born to be curious, born to be animal</description>
	<lastBuildDate>Mon, 06 May 2013 06:19:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ACuriousAnimal" /><feedburner:info uri="acuriousanimal" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The OpenLayers fallen and Leaflet arise… sure???</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/dmBLRHhaOxE/</link>
		<comments>http://acuriousanimal.com/blog/2013/05/05/the-problem-with-openlayers/#comments</comments>
		<pubDate>Sun, 05 May 2013 16:59:57 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[Leaflet]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=801</guid>
		<description><![CDATA[I wrote this post some months ago, before I publish the OpenLayers Cookbook, but I never published it thinking it could start a flame war instead a constructive thread. Today, after a twitter conversation (thanks @Starefossen @brymcbride @erilem @mourner and &#8230; <a href="http://acuriousanimal.com/blog/2013/05/05/the-problem-with-openlayers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<blockquote><p>I wrote this post some months ago, before I publish the OpenLayers Cookbook, but I never published it thinking it could start a flame war instead a constructive thread.</p>
<p>Today, after a twitter conversation (thanks <a href="http://twitter.com/Starefossen" target="_blank">@Starefossen</a> <a href="http://twitter.com/brymcbride" target="_blank">@brymcbride</a> <a href="http://twitter.com/erilem" target="_blank">@erilem</a> <a href="http://twitter.com/mourner" target="_blank">@mourner</a> and <a href="http://twitter.com/LeafletJS" target="_blank">@LeafletJS</a>) I think it is time to publish it.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1381" alt="twitter_leaflet_ol" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/08/twitter_leaflet_ol.png" width="513" height="598" /></p>
</blockquote>
<h2>OpenLayers</h2>
<p>OpenLayers is a great project. I think it is the most complete GIS project for creating web mapping applications. Its completeness makes it also a bit complex, but a complexity that is necessary.</p>
<p>OpenLayers allows to use raster and vector layers. Respect vector layers we can load data from different data sources (files, WFS servers, &#8230;) and with different formats (GML, GeoJSON, KML, &#8230;). OpenLayers allows to render geometries using different technologies (SVG or Canvas) in a way transparent to the user. Its design tries to follow as close as possible the standard concepts of features, geometries, attributes and tries to implement most of them (WMS, WFS, SLD, &#8230;).</p>
<p>In summary, OpenLayers tries to offer all the things a complete GIS project could need. Its desing has made having all this in mind and results in a big and complex architecture but, take into account, which is necessary to give response to all the requirements.</p>
<h2>Leaflet</h2>
<p>On the other hand we found a project like Leaflet, designed from the beginning with a philosophy close to  &#8221;<em>make it without complexity</em>&#8221; or &#8221;<em>offer only that things required to create a simple maps</em>&#8220;.</p>
<p>Leaflet offers raster layers (from a tiled source), vector layers, markers and popups and, every day, a growing set of plugins adding more features to it: read GeoJSON files, clustering strategy, etc.</p>
<p>Leaflet is much more lightweight and, to create a simple map, it is more simple to use.</p>
<h2>The secret behind the fame of Leaflet</h2>
<p>IMO Leaflet has two main aspects that has made it the perfect option to be used in thousands of web pages: its <em>look and feel</em> and its <em>coding style</em>.</p>
<p>The Leaflet L&amp;F is better than OpenLayers: buttons and layer switcher (among others) looks like an actual and fresh project instead like an almost 10 years old project like OpenLayers.</p>
<p>The Leaflet coding style is actual. The use of short namespaces and the chaining functions style (something like jQuery) makes it feel like a modern project and, probably, easier to use than OpenLayers.</p>
<h2>What about Leaflet plugins?</h2>
<p>Many of you can think &#8220;<em>what about the plugins?</em>&#8221; It is known one of the key aspects of Leaflet is the fact it offers a base code on which develop other plugins to make the platform better and greater. Yes, that is nice but is not always true.</p>
<p>For me, the growing set of Leaflet plugins remember the myriad of jQuery plugins. Most of them are great, awesome, but not all of them follow the same rules. Every developer can create plugins without a common design or architecture integration.</p>
<p>For example, the <a href="https://github.com/Leaflet/Leaflet.markercluster" target="_blank">Leaflet.markercluster</a> plugin (from Dave Leaver <a href="https://twitter.com/daveleaver" target="_blank">@daveleaver</a>) is an awesome plugin that allows to make the same as the cluster strategy on OpenLayers, that is, group &#8220;points&#8221; which are too close and can overlap each other.</p>
<blockquote><p>I must to say I start coding the <a href="http://acuriousanimal.com/blog/2012/09/06/animatedcluster-demo-site-updated-to-work-with-openlayers-2-12/" target="_blank">AnimatedCluster strategy</a> for OpenLayers after seen the Dave&#8217;s work, which I consider superior to mine.</p></blockquote>
<p>The Leaflet.markercluster version is based in the concept of markers while the AnimatedCluster follow the more standard concept of <em>feature</em>.</p>
<p>To style markers in the Leaflet.markercluster you need to implement a <code>iconCreateFunction</code> and pass to the constructor which must be responsible to set the CSS style for each marker depending on the number of points it clusters (see the <a href="http://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js" target="_blank"><code>_defaultIconCreateFunction</code></a> as a sample).</p>
<p>In the AnimatedCluster we have all the power of the features, geometries and styles OpenLayers offers us. We can create a vector layer, assign the AnimatedCluster strategy to it with some rules to style and automatically our layer will act as a cluster layer (please read the post <a title="Animated marker cluster strategy for OpenLayers" href="http://acuriousanimal.com/blog/2012/08/19/animated-marker-cluster-strategy-for-openlayers/" target="_blank">Animated marker cluster Strategy for OpenLayers</a> for more detailed explanation).</p>
<p>The fact OpenLayers is designed with many requirements in mind allow to work with a set of well designed pieces, like vector layers, features, geometries, styles, protocols and formats. But in contrast it adds some rigidness to implement new features that must conform the &#8220;global&#8221; rules.</p>
<p>On the other hand, Leafet lacks from a &#8220;global&#8221; design and, because of this, two similar plugins can follow to different implementation without the option of &#8220;reuse concepts&#8221; (think in another plugins that styles markers). But this lack of &#8220;global design&#8221; is what makes Leaflet be more flexible than OpenLayers.</p>
<h2>Conclusions</h2>
<p>IMO, both OpenLayers and Leaflet are great tools for different (but also similar) purposes. I consider Leaflet ideal for web pages with relatively simple maps (to create great visualizations with markers, popups, etc) but for a more GIS oriented solution I have no doubt of using OpenLayers.</p>
<p>Having that in mind it is easy to see there are a bigger number of sites requiring something like Leaflet instead of OpenLayers. The 90% of users requires a &#8220;simple map solution&#8221; instead a GIS solution. Having that in mind it is easy to see we are comparing a &#8220;simple map solution&#8221; with a GIS solution and I ask you: why?</p>
<p>As developer we have the pleasure to have two great tools on our bag. It is our responsibility to use the appropriate one on each situation.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2011/11/14/open-alternaties-to-google-maps/' title='Open alternatives to Google Maps'>Open alternatives to Google Maps</a></li>
<li><a href='http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/' title='AnimatedCluster pan related bug&#8230; fixed !!!'>AnimatedCluster pan related bug&#8230; fixed !!!</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/' title='OpenLayers presentation and OpenLayers Cookbook examples code update'>OpenLayers presentation and OpenLayers Cookbook examples code update</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/09/17/creating-static-maps-in-openlayers-using-phantomjs/' title='Creating static maps in OpenLayers using PhantomJS'>Creating static maps in OpenLayers using PhantomJS</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/dmBLRHhaOxE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/05/05/the-problem-with-openlayers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/05/05/the-problem-with-openlayers/</feedburner:origLink></item>
		<item>
		<title>SimplyWrite, a free web distraction writing tool</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/S0I78i-Mmo8/</link>
		<comments>http://acuriousanimal.com/blog/2013/04/29/simplywrite-a-free-web-distraction-writing-tool/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 19:26:01 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Backbone]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[CodeMirror]]></category>
		<category><![CDATA[grunt]]></category>
		<category><![CDATA[grunt-bbb]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1355</guid>
		<description><![CDATA[I like to write and I like programming so the obvious consequence were to write some tool to write. More or less this is the history of SimplyWrite. SimplyWrite is a free web distraction writing tool that recognizes the lightweight markup language Markdown, an easy-to-read, &#8230; <a href="http://acuriousanimal.com/blog/2013/04/29/simplywrite-a-free-web-distraction-writing-tool/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I like to write and I like programming so the obvious consequence were to write some tool to write. More or less this is the history of <a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a>.</p>
<p><em><strong><a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a> is a free web distraction writing tool that recognizes the lightweight markup language <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>, an easy-to-read, easy-to-write plain format which allow to enrich the text.</strong></em></p>
<p style="text-align: center;"><img class="aligncenter  wp-image-1358" alt="" src="http://acuriousanimal.com/blog/wp-content/uploads/2013/04/simplywrtie2.png" width="640" height="258" /></p>
<h2>Features</h2>
<ul>
<li>Auto show/hide of menus to allow a clean working area.</li>
<li>Show <em>working</em> and <em>total</em> timer. <em>Total timer</em> counts the time since you open <a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a>. <em>Working timer</em> counts the time you have set active the <a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a> page.</li>
<li>Count lines, words and characters.</li>
<li>Export your writes to a new page, ready to be saved.</li>
<li>Allow to configure font family and size.</li>
<li><a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a> stores all your writes on the client side. It makes use of the HTML5 <a href="http://www.html5rocks.com/en/features/storage">local storage</a> feature so no server is required.</li>
</ul>
<blockquote><p>Be careful with this feature. You can lost your data if you manually clean the broswer cached data and also browser cleans the local storage area automatically when the space used grown over some value (like 500mb).</p></blockquote>
<p>The source code of <a href="https://github.com/acanimal/SimplyWrite" target="_blank">SimplyWrite is available at GitHub</a> under MIT license. Feel free to contribute.</p>
<h2>The Design</h2>
<p>I would like to specially mention the fact the <a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a> design was made by my friend <a href="http://guillemsevilla.cat/" target="_blank">Guillem Sevilla</a> (<a href="https://twitter.com/gllmsvll" target="_blank">@gllmsvll</a>) a great minimalism designer !!!</p>
<h2>Technology</h2>
<p><a href="http://acuriousanimal.com/code/SimplyWrite2/" target="_blank">SimplyWrite</a> has been a nice challenge for me. It gives me the opportunity to work with the next tools:</p>
<ul>
<li><span style="line-height: 13px;"><a href="http://gruntjs.com/" target="_blank">grunt</a>, the awesome JavaScript task runner. It allows, among others, to minimize and concatenate files.</span></li>
<li><a href="https://github.com/backbone-boilerplate/grunt-bbb" target="_blank">grunt-bbb</a>, the grunt Backbone Boilerplate Build extension. Simplifies the work with Backbone framework.</li>
<li><a href="http://backbonejs.org/" target="_blank">backbone</a>, a lightweight MVC framework.</li>
<li><a href="https://github.com/tbranyen/backbone.layoutmanager" target="_blank">backbone.layoutmanager</a>, an extension of backbone to improve the work with views.</li>
<li><a href="http://codemirror.net/" target="_blank">CodeMirror</a>, an awesome code editor component for the browser.</li>
<li><a href="http://twitter.github.io/bootstrap/" target="_blank">Bootstrap</a>, a front-end framework used for the UIX.</li>
</ul>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2013/02/25/things-i-learned-creating-a-jquery-plugin-part-ii/' title='Things I learned creating a jQuery Plugin (Part II)'>Things I learned creating a jQuery Plugin (Part II)</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/' title='OpenLayers presentation and OpenLayers Cookbook examples code update'>OpenLayers presentation and OpenLayers Cookbook examples code update</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/08/12/awesome-clustered-markers-in-leaflet/' title='Awesome clustered markers in Leaflet'>Awesome clustered markers in Leaflet</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/07/09/look-mom-no-jquery-getting-all-css-properties-of-a-dom-element-in-pure-javascript/' title='Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript'>Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/S0I78i-Mmo8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/04/29/simplywrite-a-free-web-distraction-writing-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/04/29/simplywrite-a-free-web-distraction-writing-tool/</feedburner:origLink></item>
		<item>
		<title>The Book: GeoServer Beginner’s Guide</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/E1nPiAjN908/</link>
		<comments>http://acuriousanimal.com/blog/2013/04/01/the-book-geoserver-beginners-guide/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 13:25:09 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[GeoServer]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1303</guid>
		<description><![CDATA[GeoServer is one of the most importants open source geospatial servers nowadays. Implemented in Java, based on the powerful GeoTools libraries, GeoServer offers a great degree of interporability publishing data from major spatial data sources using Open Geospatial Consortium (OGC) &#8230; <a href="http://acuriousanimal.com/blog/2013/04/01/the-book-geoserver-beginners-guide/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://geoserver.org/display/GEOS/Welcome" target="_blank">GeoServer</a> is one of the most importants open source geospatial servers nowadays. Implemented in Java, based on the powerful <a href="http://www.geotools.org/" target="_blank">GeoTools</a> libraries, GeoServer offers a great degree of interporability publishing data from major spatial data sources using <em>Open Geospatial Consortium</em> (<a href="http://www.opengeospatial.org/" target="_blank">OGC</a>) standards.</p>
<p>Hopefully, for those who work or start working with GeoServer, recently <a href="http://www.packtpub.com/" target="_blank">Packt Publishing</a> has released a new book titled <a href="http://link.packtpub.com/OanwYr" target="_blank">GeoServer Beginner&#8217;s Guide</a>.</p>
<p><a href="http://link.packtpub.com/OanwYr" target="_blank"><img class="alignright" alt="" src="http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/imagecache/productview_larger/6686OS_cov.jpg" width="175" height="213" /></a></p>
<p>Written by <a href="http://www.linkedin.com/in/stefanoiacovella" target="_blank">Stefano Iacovella</a>, with contributions from <a href="www.linkedin.com/in/brianwyoungblood" target="_blank">Brian Youngblood</a>, the book guide us on the main topics to work with GeoServer, through the next list of chapters:</p>
<p><em>Chapter 1: GIS Fundamentals</em><br />
<em> Chapter 2: Getting Started with GeoServer</em><br />
<em> Chapter 3: Exploring the Administrative Interface</em><br />
<em> Chapter 4: Accessing Layers</em><br />
<em> Chapter 5: Adding Your Data</em><br />
<em> Chapter 6: Styling Your Layers</em><br />
<em> Chapter 7: Creating Simple Maps</em><br />
<em> Chapter 8: Performance and Caching</em><br />
<em> Chapter 9: Automating Tasks: GeoServer REST Interface</em><br />
<em> Chapter 10: Securing GeoServer Before Production</em><br />
<em> Chapter 11: Tuning GeoServer in a Production Environment</em><br />
<em> Chapter 12: Going Further: Getting Help and Troubleshooting</em></p>
<p>Despite of its title, the book is great from newbies to those with intermediate knowledges on GeoServer, and also put some efforts on advance topics, like performance and configuration for production environment chapters.</p>
<p>Personally, I like the way Stefano writes: simply, plain and, most important, making clear complex questions. In addition, the book is plenty of samples and figures which help us to understand better what is talking on.</p>
<p>Conceptually, we can divide the book in three sections: introduction (chapter 1, 2 and 3), basic or common usage (chapters 4, 5, 6 and 7) and advanced topics (chapter 8, 9, 10 and 11).</p>
<p>The book introduces us in the GIS world  (chapter 1) starting with an introduction of many related topics: projections, coordinate systems, modeling information, etc. After this, it shows how to install GeoServer (chapter 2) in two different operating systems: Ubuntu Linux and Windows and finally, passed to show the main aspects of the administrative interface of GeoServer (chapter 3).</p>
<p>From here, the book covers the main aspect on how to access, add and serve data (chapter 4 and 5), how to style to serve them in a better way (chapter 6) and basic samples on how to create maps against GeoServer using Google Maps, OpenLayers and Leaflet libraries.</p>
<p>The third block, concentrates improving the performance of the server using the GeoWebCache system (chapter 8), administer GeoServer via its REST interface (chapter 9), securing its access and administration (chapter 10) and tune it up ready for a production environment (chapter 11).</p>
<p>The book is mainly oriented to WMS but dedicates the chapter 12 to talk specifically on WFS and WCS, also supported by GeoServer.</p>
<p>Without a doubt, GeoServer Beginner&#8217;s Guide is a book must be on your working table.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2011/07/23/generating-map-tiles-without-a-map-server-geotools-the-gis-swissknife/' title='Generating map tiles without a map server. GeoTools the GIS swissknife.'>Generating map tiles without a map server. GeoTools the GIS swissknife.</a></li>
<li><a href='http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/' title='AnimatedCluster pan related bug&#8230; fixed !!!'>AnimatedCluster pan related bug&#8230; fixed !!!</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/' title='OpenLayers presentation and OpenLayers Cookbook examples code update'>OpenLayers presentation and OpenLayers Cookbook examples code update</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/24/projections-projections-projections/' title='Projections, projections, projections'>Projections, projections, projections</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/E1nPiAjN908" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/04/01/the-book-geoserver-beginners-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/04/01/the-book-geoserver-beginners-guide/</feedburner:origLink></item>
		<item>
		<title>Things I learned creating a jQuery Plugin (Part II)</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/KbogQyMnyF0/</link>
		<comments>http://acuriousanimal.com/blog/2013/02/25/things-i-learned-creating-a-jquery-plugin-part-ii/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 21:22:50 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1245</guid>
		<description><![CDATA[This post is the continuation of the series Things I learned creating a jQuery Plugin. In the first part we have seen how the structure of a jQuery plugin must be, the plugin entry point (so called wrapper function) and how &#8230; <a href="http://acuriousanimal.com/blog/2013/02/25/things-i-learned-creating-a-jquery-plugin-part-ii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This post is the continuation of the series <a title="Things I learnt creating a jQuery Plugin (Part I)" href="http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/" target="_blank">Things I learned creating a jQuery Plugin</a>.</p>
<p>In the first part we have seen how the structure of a jQuery plugin must be, the plugin entry point (so called wrapper function) and how we can control the behavior of a method as a getter or setter.</p>
<h2>Define default options</h2>
<p>Your plugin more probably will accept different set of options to allow some configuration. For these reason it is important to define a set of default options which will be applied in cases where no options are specified by the user. Place it within the jQuery wrapper function is a good practice:</p>
<pre class="prettyprint">//
// Default options
//
$.fn[pluginName].defaults = {
    opt_A: ""
};</pre>
<h2>Encapsulate your plugin code</h2>
<p>A good practice is to encapsulate the logic of our plugin within a function, this way our plugin&#8217;s entry point function can easily initialize or call the right method.</p>
<p>For example, in a really simple wrapper function, that simply initializes a plugin&#8217;s instance on each selected element, we could write something like:</p>
<pre class="prettyprint">$.fn[pluginName] = function(options) {
    return this.each(function() {
        new Plugin(this, options);
    });
}</pre>
<h3>The plugin constructor</h3>
<p>The main part of your plugin is the constructor function. Usually this function is responsible to initialize the plugin, store a reference to the selected element or merge the passed options with the default ones:</p>
<pre class="prettyprint">function Plugin(element, options) {
    // Store references to the selected element
    this.el = element;
    this.$el = $(element);

    // Merge passes options with defaults
    this.options = $.extend({}, $.fn[pluginName].defaults, options);

    // ...other code here...

    // Initialize the plugin instance
    this.init();
}</pre>
<h3>Prototype your plugin</h3>
<p>Once the <code>Plugin</code> function is defined we can modify its prototype adding all the desired methods we want for our plugin.</p>
<p>There are a couple of methods are a good practice to implement:</p>
<ul>
<li>A <code>init</code> method, which initializes each plugins instance: creating new DOM elements, registering listeners, etc</li>
<li>A <code>destroy</code> method, responsible to free any resource used by the plugin: extra elements, unregister listeners, etc.</li>
</ul>
<p>Other methods can be created within your plugin&#8217;s prototype but remember the convention: <em>Use method names starting with underscore for those methods we want to be private</em>.</p>
<blockquote><p>If you remember the first part of this series, what really happens is when you call a plugin&#8217;s method, the wrapper function of our plugin checks if the method&#8217;s name starts with underscore and if so then avoids the call.</p></blockquote>
<pre class="prettyprint">//
// Plugin prototype
//
Plugin.prototype = {

    //
    // Initialize the plugin instance
    //
    init: function() {
        ...
    },

    //
    // Free resources
    //
    destroy: function() {
        ...
    },

    //
    // Public method
    //
    publicMethod: function() {
        ...
    },

    //
    // Private method (it starts with an underscore)
    //
    _privateMethod: function() {
        ...
    }

}</pre>
<h3>A note on the <code>destroy</code> method</h3>
<p>As we have commented, the <code>destroy</code> method must free any resource used by the plugin instance, like extra created elements, unregister listeners, etc</p>
<p>If you remember the first article, you will notice that the plugin&#8217;s instance is stored within the selected DOM element where the plugin is applied:</p>
<pre class="prettyprint">$.fn[pluginName] = function(options) {
    var args = arguments;

    if (options === undefined || typeof options === 'object') {
        // Creates a new plugin instance, for each selected element, and
        // stores a reference withint the element's data
        return this.each(function() {
            if (!$.data(this, 'plugin_' + pluginName)) {
                $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
            }
        });
    } 

    ...
};</pre>
<p>That occurs in the line:</p>
<pre class="prettyprint">$.data(this, 'plugin_' + pluginName, new Plugin(this, options));</pre>
<p>So, the last action in your <code>destroy</code> method must be always remove the plugin&#8217;s instance reference from the element&#8217;s data. This can easily done using the reference to the DOM element stored in the plugin instance:</p>
<pre class="prettyprint">//
// Free resources
//
destroy: function() {

    // Remove elements, unregister listerners, etc

    // Remove data
    this.$el.removeData();
}</pre>
<h2>Allow the use of callbacks in our plugin</h2>
<p>It is common jQuery plugins allows to register callback functions to be called when an event or action is generated by the plugins. For example, in the <a href="http://acuriousanimal.com/code/tagger/" target="_blank">tagger</a> plugin the user can be notified when a new tag is added, removed, clicked, etc.</p>
<p>Next lines shows the initialization of the tagger plugin setting the parameter <code>fieldSeparator</code> to a value different from the default options value and registering a callback function for the <code>onTagAdded</code> event:</p>
<pre class="prettyprint">$('#inputID').tagger({
  fieldSeparator: '|'
  onTagsAdded: function(tags) {
    console.log('Added new tag: '+tags+'\n');
  }
});</pre>
<p>To achieve this we need to make to main steps:</p>
<ol>
<li><span style="line-height: 13px;">Define a default and empty callback function in the plugins default options.</span></li>
<li>At some place of our plugin&#8217;s code make a call to the callback function.</li>
</ol>
<p>Continuing with the sample of the <a href="http://acuriousanimal.com/code/tagger/" target="_blank">tagger</a> plugin, its default options looks like:</p>
<pre class="prettyprint">//
// Default options
//
$.fn[pluginName].defaults = {
    fieldSeparator: ",",
    readOnly: false,
    // Callback invoked when user calls the 'tags' method
    onTagsAdded: function() {
    },
    // Callback invoked when user calls the 'remove' method
    onTagsRemoved: function() {
    },
    // Callback invoked when user calls the 'clear' method. 
    // Note: Internally the 'clear' method uses the 'remove'.
    onClear: function() {
    },
    // Callback invoked when the user click a tag label
    onClick: function() {
    }
};</pre>
<p>Later, in the method responsible to add new tags to the tag list, a call is made to the <code>onTagsAdded</code> function:</p>
<pre class="prettyprint">// Adds one or more tags
// ...
//
tags: function(tags) {
      ...    
      // Call the callback
      this.options.onTagsAdded.call(this, tags);
      ...
    }
},</pre>
<blockquote><p>Note how we have forced to set the <code>this</code> object and passed the value of the new added tag to the callback function.</p></blockquote>
<h2>Summary</h2>
<p>Ok, this is the end. A short series of two articles to introduce the main concepts to creating jQuery plugins isn&#8217;t a bad thing when you are looking for help starting with jQuery and custom plugin development.</p>
<p>Let&#8217;s try to summarize the main points we have seen in this couple of posts:</p>
<ul>
<li>Understand the importance of entry point to your plugin. This is handled in a new function on the <code>$.fn</code> object and is responsible to (or can) control: plugin initialization, call to setter or getter methods, simulate private methods, etc.</li>
<li>Encapsulate your plugin&#8217;s functionalities in a prototyped function</li>
<li>Store, if needed, a reference to the DOM element where your plugin is applied to.</li>
<li>Remember to implement a <code>destroy</code> method responsible to free all the resources used by your plugin</li>
<li>Create a default options object that serves as a base to extend it with the options specified by the user</li>
<li>Keep calm and remember try and error is a (necessary) way to learn</li>
</ul>
<h2>References</h2>
<p>The web is plenty of great information:</p>
<p><a href="http://docs.jquery.com/Plugins/Authoring" target="_blank">http://docs.jquery.com/Plugins/Authoring </a></p>
<p><a href="http://www.websanova.com/tutorials/jquery/the-ultimate-guide-to-writing-jquery-plugins" target="_blank">http://www.websanova.com/tutorials/jquery/the-ultimate-guide-to-writing-jquery-plugins</a></p>
<p><a href="http://jqueryboilerplate.com/" target="_blank">http://jqueryboilerplate.com/ </a></p>
<p><a href="https://github.com/zenorocha/jquery-plugin-patterns" target="_blank">https://github.com/zenorocha/jquery-plugin-patterns</a></p>
<p><a href="http://coding.smashingmagazine.com/2011/10/11/essential-jquery-plugin-patterns/" target="_blank">http://coding.smashingmagazine.com/2011/10/11/essential-jquery-plugin-patterns/</a></p>
<p><a href="http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns" target="_blank">http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns</a></p>
<p>&nbsp;<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2011/12/09/filling-flexigrid-with-jsonxml-data/' title='Filling Flexigrid with JSON/XML data'>Filling Flexigrid with JSON/XML data</a></li>
<li><a href='http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/' title='Things I learnt creating a jQuery Plugin (Part I)'>Things I learnt creating a jQuery Plugin (Part I)</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/' title='tagger, a jQuery Plugin to manage tags'>tagger, a jQuery Plugin to manage tags</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/07/09/look-mom-no-jquery-getting-all-css-properties-of-a-dom-element-in-pure-javascript/' title='Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript'>Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/09/26/crop-image-on-the-client-side-with-jcrop-and-html5-canvas-element/' title='Crop image on the client side with JCrop and HTML5 canvas element'>Crop image on the client side with JCrop and HTML5 canvas element</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/KbogQyMnyF0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/02/25/things-i-learned-creating-a-jquery-plugin-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/02/25/things-i-learned-creating-a-jquery-plugin-part-ii/</feedburner:origLink></item>
		<item>
		<title>AnimatedCluster pan related bug… fixed !!!</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/eDLM3iOJDPI/</link>
		<comments>http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 17:59:38 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[AnimatedCluster]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1253</guid>
		<description><![CDATA[If you regularly follow this blog and are web mapping developer that works with OpenLayers, (too much coincidences???) probably you know about the the Animated marker cluster strategy for OpenLayers I created some time ago. Unfortunally, the last version (v0.2) has a ugly bug. &#8230; <a href="http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you regularly follow this blog and are web mapping developer that works with OpenLayers, (too much coincidences???) probably you know about the the <a title="Animated marker cluster strategy for OpenLayers" href="http://acuriousanimal.com/blog/2012/08/19/animated-marker-cluster-strategy-for-openlayers/" target="_blank">Animated marker cluster strategy for OpenLayers</a> I created some time ago.</p>
<p>Unfortunally, the last version (v0.2) has a ugly <a href="https://github.com/acanimal/AnimatedCluster/issues/2" target="_blank">bug</a>. The code works fine when you change the zoom level but clusters are not updated when you pan the map.</p>
<p>I&#8217;m happy to say right now I have uploaded a new version (v0.3) which fixes this bug on my <a href="https://github.com/acanimal/AnimatedCluster" target="_blank">GitHub repository</a>. Basically, now the code controls if the action is a zoom change or a pan movement and updates and animates the clusters accordingly. That is, if you pan the map the clusters on the current level are recomputed.</p>
<p><strong>Take into account this can cause the features where clustered in different clusters</strong>, so you can see how bubbles changes its position and number of features within it.</p>
<p>In addition, the demo page has been updated with the new version. Check it !!!</p>
<p style="text-align: center;"><a href="http://acuriousanimal.com/code/animatedCluster/" target="_blank"><img class="aligncenter size-medium wp-image-806" alt="animatedcluest" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/08/animatedcluest-300x149.png" width="300" height="149" /></a></p>
<blockquote><p>Thanks to all the great people that has sent me their experiences when using the AnimatedCluster !!!</p></blockquote>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/' title='OpenLayers presentation and OpenLayers Cookbook examples code update'>OpenLayers presentation and OpenLayers Cookbook examples code update</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/08/19/animated-marker-cluster-strategy-for-openlayers/' title='Animated marker cluster strategy for OpenLayers'>Animated marker cluster strategy for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/01/23/dojo-openlayers-new-challenges/' title='Dojo + OpenLayers = New Challenges'>Dojo + OpenLayers = New Challenges</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/11/14/open-alternaties-to-google-maps/' title='Open alternatives to Google Maps'>Open alternatives to Google Maps</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/eDLM3iOJDPI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/02/08/animatedcluster-pan-related-bug-fixed/</feedburner:origLink></item>
		<item>
		<title>Things I learnt creating a jQuery Plugin (Part I)</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/HpmYqqIe2TM/</link>
		<comments>http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/#comments</comments>
		<pubDate>Tue, 15 Jan 2013 22:31:48 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1139</guid>
		<description><![CDATA[jQuery is one of the most used JavaScript libraries, if not the most used one, which allows to make great things with the big set of little tools it offers to the web developers: HTML/DOM manipulation, CSS manipulation, HTML event &#8230; <a href="http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://jquery.com/" target="_blank">jQuery</a> is one of the most used JavaScript libraries, if not the most used one, which allows to make great things with the big set of little tools it offers to the web developers: HTML/DOM manipulation, CSS manipulation, HTML event methods, effects and animations, AJAX, utilities, &#8230;</p>
<p>One of the key aspects of jQuery is the possibility to extend it with new functionalities, so called <em>plugins</em>. For those who has a basic knowledge of jQuery and want or need to create a new jQuery plugin this post tries to be a helping summary of good things to take into account.</p>
<h2>Before to start</h2>
<p>Because of the flexibility and powerful of the language, the Perl community is proud of his <em>Tim Today</em> motto,  that is:</p>
<blockquote><p>There&#8217;s more than one way to do it</p></blockquote>
<p>You can consider the same for JavaScript, that&#8217;s true. The fact JavaScript is not an object oriented language but a <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Introduction_to_Object-Oriented_JavaScript#Prototype-based_programming" target="_blank">prototype based language</a> allows to follow the OOP paradigm in many different ways. Looking for a template code to create a jQuery plugin I found tons and not all following the same conventions and ideas.</p>
<p>Here I present a mix of the most accepted templates and its key aspects.</p>
<h2>The code</h2>
<p>Accompanying the article you can find the self documented version of the boilerplate code at my <a href="https://github.com/acanimal/jQuery-Plugin-Boilerplate" target="_blank">GitHub repository</a>.</p>
<h2>Where to start</h2>
<p>If you are planning to create a jQuery plugin, the first places I suggest you to start reading is the <a href="http://docs.jquery.com/Plugins/Authoring" target="_blank">Plugins/Authoring</a> section of the project documentation. It is a great starting resource but in the real live you will find soon you need to know a bit more of that.</p>
<hr />
<h2>Using a jQuery plugin</h2>
<p>Suppose we have a jQuery plugin called <code>beautyLink</code>, that transform a normal link (the <code>&lt;a&gt;</code> element) into a really nice one changing the font family, text and background color. So we need to include it in our page before start using it:</p>
<pre class="prettyprint">&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery-beautylink.js"&gt;&lt;/script&gt;</pre>
<p>The conventional way to create and apply it on an element would be:</p>
<pre class="prettyprint">$('#linkID').beautyLink();</pre>
<p>or, if you want to apply on each link of the current page:</p>
<pre class="prettyprint">$('a').beautyLink();</pre>
<p>Later, to change the text color to red we could invoke a plugin&#8217;s public method like:</p>
<pre class="prettyprint">$('#linkID').beautyLink('color', 'red');</pre>
<p>or to retrieve the current text color:</p>
<pre class="prettyprint">$('#linkID').beautyLink('color');</pre>
<p>that is, the <code>color</code> method can act as a setter or getter depending if we pass a value or not.</p>
<h2>Creating a new plugin</h2>
<p>All right, we know how to use a plugin but we want to create a new one. The first step we need to do is to create a new JavaScript file where to place our code. As a good practice this file must contain a documentation header section with the plugin&#8217;s name, version, author contact information, license, etc</p>
<p>When we include the JavaScript file in a web page we need the code to be auto-executed so the plugin can be registered within the jQuery. To do so all the JavaScript code in the file must be inside the code:</p>
<pre class="prettyprint">(function($, window, document, undefined) {
  // The code here
})(jQuery, window, document);</pre>
<p>This way, the code of our plugin will receive a reference to the jQuery library, the window and the document and, also, an undefined reference on the <code>undefined</code> parameter that we can use to compare undefined values (wow, that was too much undefineds in a sentence).</p>
<h2>The wrapper function</h2>
<p>To create a jQuery plugin we need to register a new function in the <code>jQuery.fn</code> object. This is an array where jQuery stores references to all available or included plugins in the current page. To add a new one simply write something like:</p>
<pre class="prettyprint">jQuery.fn.myPlugin = function(options) {
  // Do your awesome plugin stuff here
};</pre>
<p>or</p>
<pre class="prettyprint">jQuery.fn['myPlugin'] = function(options) {
  // Do your awesome plugin stuff here
};</pre>
<p><strong>The function you define here is the entry point to your plugin. It is a wrapper function that must handle the plugins initialization or invocation to any plugin&#8217;s method.</strong></p>
<h3>How to distinguish the action?</h3>
<p>The question is, how do we implement the plugin&#8217;s wrapper function to distinguish if it must initialize the plugin or call a method? The answer is in the <code>options</code> parameter.</p>
<p>When we instantiate a plugin without passing any argument the <code>options</code> parameter is <code>undefined</code>:</p>
<pre class="prettyprint">$('#linkID').beautyLink();</pre>
<p>If we instantiate passing any argument the <code>options</code> parameter is an <code>Object</code>:</p>
<pre class="prettyprint">$('#linkID').beautyLink({
  someOption: 'a',
  someOther: 123
});</pre>
<p>Finally, if we are calling a plugin&#8217;s method like:</p>
<pre class="prettyprint">$('#linkID').beautyLink('color', 'red');</pre>
<p>then the <code>options</code> parameter is an array with two elements <code>['color', 'red']</code></p>
<h2>The starter code for the wrapper function</h2>
<p>With the above in mind, we can write the base code for the wrapper function:</p>
<pre class="prettyprint">$.fn[pluginName] = function(options) {
    var args = arguments;

    if (options === undefined || typeof options === 'object') {
        // Creates a new plugin instance

    } else if (typeof options === 'string' &amp;&amp; options[0] !== '_' &amp;&amp; options !== 'init') {
        // Call a public pluguin method (not starting with an underscore) and different
        // from the 'init' one

    }
};</pre>
<h2>Chainable or not chainable</h2>
<p>jQuery is famous (and powerful) by its chainable way to work, that is, a call to a method returns a reference to the same element so we can make another call. For example:</p>
<pre class="prettyprint">$('#someID')
  .parents(".pane")
  .animate({ opacity: "hide" }, "slow");</pre>
<p>or applied to our plugin:</p>
<pre class="prettyprint">$('#linkID')
  .beautyLink('color', 'red')
  .beautyLink('backgroundColor', 'black');</pre>
<p>We must think which of our methods must be chainable and which ones not. For example, <strong>the getter methods must break the chainability</strong>. In our case we want a call to:</p>
<pre class="prettyprint">$('#linkID').beautyLink('color');</pre>
<p>returns the <code>red</code> value and not a reference to the element to make another call.</p>
<h3>Implementing chainability</h3>
<p>When the wrapper function <code>$.fn[pluginName]</code> is called the this reference points to:</p>
<ul>
<li>the selected DOM element, like when using:
<pre class="prettyprint">$('#linkID').beautyLink('color', 'red');</pre>
<p>or</li>
<li>a list of selected DOM elements, like when using:
<pre class="prettyprint">$('a').beautyLink('color', 'red');</pre>
</li>
</ul>
<p>Next code shows a very basic wrapper function that initializes a Plugin instance for each selected element. This results in a chainable call that returns a reference to the same element ready to make another chained call:</p>
<pre class="prettyprint">$.fn[pluginName] = function(options) {
    return this.each(function() {
        new Plugin(this, options);
    });
}</pre>
<h3>Avoiding chainability</h3>
<p>The solution to avoid a method were chainable is easy, simply doesn&#8217;t write the <code>this.each()</code> and execute code on the first occurrence, that is, the <code>this[0]</code>.</p>
<blockquote><p>This will be more clear in the final code.</p></blockquote>
<h2>The jQuery.data() function</h2>
<p>We make use of the <code>$.data()</code> function in our code so a short explanation is required.<br />
The <a href="http://api.jquery.com/jQuery.data/" target="_blank"><code>$.data()</code></a> function allows to store arbitrary data on an element (or get is value).</p>
<p>It is important because we store a reference to the Plugin instance on each element it is applied. This allow us to check if an element has already applied a plugin or we need to instantiate it. This will be clarified in the final wrapper function code.</p>
<h2>The backbone wrapper function code</h2>
<p>With all the above in mind, we can write our final plugin&#8217;s wrapper function. To summarize:</p>
<ul>
<li><span style="line-height: 13px;">If plugin is called without arguments, then the plugin is initialized and a reference is stored in the DOM element.</span></li>
<li>If a plugin&#8217;s method is called and it isn&#8217;t a getter method, then the method is called maintaining chainability.</li>
<li>If a plugin&#8217;s method is called and it is a getter method, then we return a value and break the chainability.</li>
</ul>
<pre class="prettyprint">$.fn[pluginName] = function(options) {
    var args = arguments;

    if (options === undefined || typeof options === 'object') {
        // Creates a new plugin instance, for each selected element, and
        // stores a reference withint the element's data
        return this.each(function() {
            if (!$.data(this, 'plugin_' + pluginName)) {
                $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
            }
        });
    } else if (typeof options === 'string' &amp;&amp; options[0] !== '_' &amp;&amp; options !== 'init') {
        // Call a public pluguin method (not starting with an underscore) for each 
        // selected element.
        if (Array.prototype.slice.call(args, 1).length == 0 &amp;&amp; $.inArray(options, $.fn[pluginName].getters) != -1) {
            // If the user does not pass any arguments and the method allows to
            // work as a getter then break the chainability so we can return a value
            // instead the element reference.
            var instance = $.data(this[0], 'plugin_' + pluginName);
            return instance[options].apply(instance, Array.prototype.slice.call(args, 1));
        } else {
            // Invoke the speficied method on each selected element
            return this.each(function() {
                var instance = $.data(this, 'plugin_' + pluginName);
                if (instance instanceof Plugin &amp;&amp; typeof instance[options] === 'function') {
                    instance[options].apply(instance, Array.prototype.slice.call(args, 1));
                }
            });
        }
    }
};</pre>
<p>Take into account, we have also defined an array where to specify which method can act as getters when they are invoked without any argument:</p>
<pre class="prettyprint">$.fn[pluginName].getters = ['someGetterMethod'];</pre>
<h2>To be continue&#8230;</h2>
<p>We have seen the basis on how to create a jQuery plugin and learnt about the importance of the wrapper function, which is the entry point to our plugin.<br />
In the next post I will explain how we can organize our plugin code, the responsible to implement functionality, how to create private and public method, etc.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2011/12/09/filling-flexigrid-with-jsonxml-data/' title='Filling Flexigrid with JSON/XML data'>Filling Flexigrid with JSON/XML data</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/' title='tagger, a jQuery Plugin to manage tags'>tagger, a jQuery Plugin to manage tags</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/07/09/look-mom-no-jquery-getting-all-css-properties-of-a-dom-element-in-pure-javascript/' title='Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript'>Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/09/26/crop-image-on-the-client-side-with-jcrop-and-html5-canvas-element/' title='Crop image on the client side with JCrop and HTML5 canvas element'>Crop image on the client side with JCrop and HTML5 canvas element</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/08/16/customizing-jquery-ui-dialog-hiding-close-button-and-changing-opacity/' title='Customizing jQuery UI Dialog: hiding close button and changing opacity'>Customizing jQuery UI Dialog: hiding close button and changing opacity</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/HpmYqqIe2TM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/</feedburner:origLink></item>
		<item>
		<title>tagger, a jQuery Plugin to manage tags</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/-D5VrZ5cqKY/</link>
		<comments>http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/#comments</comments>
		<pubDate>Wed, 26 Dec 2012 17:51:17 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1117</guid>
		<description><![CDATA[jQuery is widely used in the web world. Since its creation it was quickly adopted by many programmers mainly due its easily of us and extension capabilities. I used jQuery in many projects and for many different things, thanks to &#8230; <a href="http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://jquery.com/" target="_blank">jQuery</a> is widely used in the web world. Since its creation it was quickly adopted by many programmers mainly due its easily of us and extension capabilities.</p>
<p>I used jQuery in many projects and for many different things, thanks to the legion of existing plugins I always found a solution to my issues&#8230; since today.</p>
<p>I was looking for plugins to manage tags. Of course I found many alternatives but no one likes me. Some of them lake from desired methods, others was based on additional libraries (like <a href="http://jqueryui.com/" target="_blank">jQueryUI</a>) where I want a more simple solution, some others was too complex to change its style or, other times, simply I found its code them too much complex for something I consider more simple to do.</p>
<h2>The problem</h2>
<p>I was developing a web site using <a href="http://twitter.github.com/bootstrap" target="_blank">Twitter Bootstrap</a> framework and I needed a jQuery plugin to manage tags. The requirement was the plugin has a look and feel based on the Bootstrap components: labels, icons, buttons, etc</p>
<p>After looking for a couple of days, testing some plugins and looking on its source code I realize neither of them likes me, so I start developing my custom alternative.</p>
<h2>The <em>tagger</em> plugin</h2>
<p>In a boast of originality I called the plugin <em>tagger</em> and it can works in two modes (read or write mode) depending on if you want to simply show some tags or you want to change the tags list adding or removing.</p>
<p>To remove a tag you can simply click the remove icon on each tag and to add new tags you must click the plus sign. This makes a little form opens with an input text element where you can write the desired tags to add to the list.</p>
<p style="text-align: center;"><img class="size-full wp-image-1131  aligncenter" alt="tagger" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/12/tagger.png" width="542" height="162" /></p>
<h2>Documentation</h2>
<p>I have prepared a special web page that acts as <a href="http://acuriousanimal.com/code/tagger" target="_blank">documentation page</a> and shows the plugin in action.</p>
<h2>Source Code</h2>
<p>This weekend project open and free so feel free to contribute with new features and improvements. You can find at my GitHub repository <a href="https://github.com/acanimal/tagger.js" target="_blank">tagger</a>.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2013/01/15/things-i-learned-creating-a-jquery-plugin-part-i/' title='Things I learnt creating a jQuery Plugin (Part I)'>Things I learnt creating a jQuery Plugin (Part I)</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/12/09/filling-flexigrid-with-jsonxml-data/' title='Filling Flexigrid with JSON/XML data'>Filling Flexigrid with JSON/XML data</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/07/09/look-mom-no-jquery-getting-all-css-properties-of-a-dom-element-in-pure-javascript/' title='Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript'>Look mom no jQuery !!! Getting all CSS properties of a DOM element in pure JavaScript</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/09/26/crop-image-on-the-client-side-with-jcrop-and-html5-canvas-element/' title='Crop image on the client side with JCrop and HTML5 canvas element'>Crop image on the client side with JCrop and HTML5 canvas element</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/08/16/customizing-jquery-ui-dialog-hiding-close-button-and-changing-opacity/' title='Customizing jQuery UI Dialog: hiding close button and changing opacity'>Customizing jQuery UI Dialog: hiding close button and changing opacity</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/-D5VrZ5cqKY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2012/12/26/tagger-a-jquery-plugin-to-manage-tags/</feedburner:origLink></item>
		<item>
		<title>OpenLayers presentation and OpenLayers Cookbook examples code update</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/RVde-PxIOEA/</link>
		<comments>http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 20:29:02 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1071</guid>
		<description><![CDATA[A few months after the release of the OpenLayers Cookbook I have been working on a presentation about OpenLayers for @geoinquiets at Barcelona (BCN) that will be celebrated the next December 20th (see the event here) at the offices of Cantera-Tech. &#8230; <a href="http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A few months after the release of the <a href="http://acuriousanimal.com/blog/2012/09/02/openlayers-cookbook-is-out/" target="_blank">OpenLayers Cookbook</a> I have been working on a presentation about OpenLayers for <a href="http://twitter.com/geoinquiets" target="_blank">@geoinquiets</a> at Barcelona (BCN) that will be celebrated the next December 20th (see the event <a href="http://www.eventbrite.es/event/4934313665/eorg?ebtv=C" target="_blank">here</a>) at the offices of <a href="http://www.cantera-tech.com/es/" target="_blank">Cantera-Tech</a>.</p>
<p>Both the presentation and source code examples materials are freely available at my repository on <a href="https://github.com/acanimal" target="_blank">GitHub</a> as open projects and I would like you contribute to:</p>
<ul>
<li><strong>OpenLayers Cookbook Examples</strong>: <a href="https://github.com/acanimal/Openlayers-Cookbook" target="_blank">https://github.com/acanimal/Openlayers-Cookbook</a></li>
<li><strong>OpenLayers Presentation</strong>: <a href="https://github.com/acanimal/OpenLayers-Presentation" target="_blank">https://github.com/acanimal/OpenLayers-Presentation</a>.</li>
</ul>
<p>The presentation is available online at <a href="http://acanimal.github.com/OpenLayers-Presentation">http://acanimal.github.com/OpenLayers-Presentation</a> and the cookbook examples at <a href="http://acanimal.github.com/Openlayers-Cookbook">http://acanimal.github.com/Openlayers-Cookbook</a>.</p>
<blockquote><p>Please take into account some examples do not work because there is no backend PHP server to serve some required content.</p></blockquote>
<h2>About the OpenLayers Cookbook Examples</h2>
<p>The OpenLayers Cookbook was released with a set of samples showing almost all the recipes in the book in action.</p>
<p>I built the samples as a RIA application with a menu bar for each chapter which allows to select te recipe to load and allowing to show the related source of each recipe.</p>
<p><a href="http://acanimal.github.com/Openlayers-Cookbook/"><img class="aligncenter size-full wp-image-1094" title="ol_source_code_examples" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/12/ol_source_code_examples.png" alt="" width="550" height="314" /></a></p>
<p>To create the application I used <a href="http://dojotoolkit.org/" target="_blank">Dojo Toolkit</a> because it is a great JavaScript framework with a nice set of rich and homogeneous widgets.</p>
<p>As any piece of software, the book samples requires some updates from time to time and, because of this I decide to upload the source code to GitHub and update it to the version 1.1.</p>
<p>Next are some of the improvements you will find:</p>
<ul>
<li>Use of <a href="http://dojotoolkit.org/">Dojo Toolkit</a> from Google CDN (<code>&lt;script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"&gt;&lt;/script&gt;</code>)</li>
<li>Updated Dojo version to 1.8</li>
<li>Updated OpenLayers version to 2.12</li>
<li>Source code updated to use Dojo 1.8 syntax (using HTML5 <code>data</code> attribute) instead old one (non standar <code>dojoType</code>).</li>
<li>Source code highlighted via <a href="http://codemirror.net/">CodeMirror</a> project.</li>
<li>Use of relative paths to load data files (attached to the project).</li>
</ul>
<p>To run the samples you need download the code and put within your local web server (take a look to the <a href="https://github.com/acanimal/Openlayers-Cookbook#how-to-run-the-examples-" target="_blank">documentation</a>).</p>
<p>Remember, you are welcome to contribute and create new recipes !!!</p>
<h2>About the OpenLayers Presentation</h2>
<p>As a said at the beginning, I have the opportunity to make a presentation for the <a href="http://twitter.com/geoinquiets" target="_blank">@geoinquiets</a> folks at Barcelona.</p>
<p>But who are the GeoInquiets? Well, we are (I like to include me) a bunch of enthusiast and professionals related with GIS close to Barcelona.</p>
<blockquote><p><strong>Note</strong>: The GeoInquiets initiative has been successfully replicated in other hispanic places like: Madrid, Buenos Aires, Valencia, Tenerife, Galicia, Córdoba, Cantabria, &#8230;</p></blockquote>
<p style="text-align: center;"><a href="http://acanimal.github.com/OpenLayers-Presentation"><img class="aligncenter size-full wp-image-1096" title="ol-presentation" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/12/ol-presentation.png" alt="" width="550" height="347" /></a></p>
<p>The presentation was made using simply HTML technologies to maximize its portability and avoid proprietary formats. Croncretely, I used the next set of tools to generate it::</p>
<ul>
<li><a href="https://github.com/imakewebthings/deck.js">deck.js</a>: A JavaScript library for building modern HTML presentations.</li>
<li><a href="https://github.com/iros/deck.js-codemirror">deck.js-codemirror</a> extension: Allows you to embed codemirror code snippets in your slides</li>
<li>All UML class diagrams have been made with the free and online <a href="http://yuml.me/diagram/scruffy/class/draw">yUML</a> tool.</li>
</ul>
<p>Again, remember it is open sourced so you can contribute and use to make your own presentations.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2012/06/28/openlayers-cookbook/' title='OpenLayers Cookbook'>OpenLayers Cookbook</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/01/23/dojo-openlayers-new-challenges/' title='Dojo + OpenLayers = New Challenges'>Dojo + OpenLayers = New Challenges</a></li>
<li><a href='http://acuriousanimal.com/blog/2011/11/14/open-alternaties-to-google-maps/' title='Open alternatives to Google Maps'>Open alternatives to Google Maps</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/08/19/animated-marker-cluster-strategy-for-openlayers/' title='Animated marker cluster strategy for OpenLayers'>Animated marker cluster strategy for OpenLayers</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/RVde-PxIOEA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/</feedburner:origLink></item>
		<item>
		<title>Projections, projections, projections</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/DvRzC_JxM0w/</link>
		<comments>http://acuriousanimal.com/blog/2012/10/24/projections-projections-projections/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 17:55:13 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[Projections]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=1037</guid>
		<description><![CDATA[Create a map of the earth isn&#8217;t an easy problem. Projections basically tries to solve the problem of how to 3D element on a 2D surface. Tons of papers have been written about this problem but a nice place to start is &#8230; <a href="http://acuriousanimal.com/blog/2012/10/24/projections-projections-projections/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Create a map of the earth isn&#8217;t an easy problem. Projections basically tries to solve the problem of how to 3D element on a 2D surface.</p>
<p>Tons of papers have been written about this problem but a nice place to start is the wikipedia entry about <a href="http://en.wikipedia.org/wiki/Map_projection" target="_blank">Map Projections</a>.</p>
<div class="wp-caption aligncenter" style="width: 405px"><img title="Cylindrical projection" src="http://upload.wikimedia.org/wikipedia/commons/2/22/Usgs_map_miller_cylindrical.PNG" alt="Cylindrical projection" width="395" height="168" /><p class="wp-caption-text">Cylindrical projection</p></div>
<p>Some time ago I seen a awesome video from the project <a href="http://www.win.tue.nl/~vanwijk/myriahedral/" target="_blank">Unfolding the Earth: Myriahedral Projections</a>. On it, the author divides the sphere into a myriahedron (a <a href="http://en.wikipedia.org/wiki/Polyhedron" target="_blank">polyhedron</a> with a very large number of faces) which allows to unfold the sphere in many different map projections.</p>
<p><a href="http://www.youtube.com/watch?v=b1xXTi1nFCo" target="_blank"><img class="aligncenter size-full wp-image-1044" title="Unfolding the Earth - Myriahedral projections" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/10/Unfolding-the-Earth-Myriahedral-projections1.png" alt="" width="642" height="388" /></a></p>
<p>Recently I could seen another nice experiment at the <a href="http://bl.ocks.org/" target="_blank">bl.ocks.org</a> site. The <a href="http://bl.ocks.org/3711652" target="_blank">Projection Transitions</a> is an great map work example implemented with <a href="http://d3js.org/" target="_blank">D3.js</a> library which shows an animated transition of map projections.</p>
<p><a href="http://bl.ocks.org/3711652"><img class="aligncenter size-medium wp-image-1040" title="Projection Transitions" src="http://acuriousanimal.com/blog/wp-content/uploads/2012/10/Projection-Transitions-300x298.png" alt="" width="300" height="298" /></a></p>
<p>Don&#8217;t you think D3 is becoming a great project? I think I need to get some time to spend on it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://acuriousanimal.com/blog/2013/04/01/the-book-geoserver-beginners-guide/' title='The Book: GeoServer Beginner&#8217;s Guide'>The Book: GeoServer Beginner&#8217;s Guide</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/12/04/openlayers-presentation-and-openlayers-cookbook-sample-code-update/' title='OpenLayers presentation and OpenLayers Cookbook examples code update'>OpenLayers presentation and OpenLayers Cookbook examples code update</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/10/09/improved-performance-on-the-animatedcluster-for-openlayers/' title='Improved performance on the AnimatedCluster for OpenLayers'>Improved performance on the AnimatedCluster for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/08/19/animated-marker-cluster-strategy-for-openlayers/' title='Animated marker cluster strategy for OpenLayers'>Animated marker cluster strategy for OpenLayers</a></li>
<li><a href='http://acuriousanimal.com/blog/2012/08/12/awesome-clustered-markers-in-leaflet/' title='Awesome clustered markers in Leaflet'>Awesome clustered markers in Leaflet</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/DvRzC_JxM0w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2012/10/24/projections-projections-projections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2012/10/24/projections-projections-projections/</feedburner:origLink></item>
		<item>
		<title>Things seen last week</title>
		<link>http://feedproxy.google.com/~r/ACuriousAnimal/~3/cLY_S9B1hA8/</link>
		<comments>http://acuriousanimal.com/blog/2012/10/19/things-seen-this-october-2012/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 16:01:16 +0000</pubDate>
		<dc:creator>asantiago</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Things]]></category>

		<guid isPermaLink="false">http://acuriousanimal.com/blog/?p=988</guid>
		<description><![CDATA[Web &#38; Dessign Launcher &#8211; WordPress responsive theme that allows visitors know estimated time remaining in launching your site. Shaken Grid (Lite) &#8211; WordPress gridded theme that uses jQuery Masonry which “arranges elements vertically then horizontally according to a grid.” HTML5PLEASE &#8211; Look &#8230; <a href="http://acuriousanimal.com/blog/2012/10/19/things-seen-this-october-2012/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Web &amp; Dessign</h2>
<p><a href="http://kcy.me/bhqx" target="_blank">Launcher</a> &#8211; WordPress responsive theme that allows visitors know estimated time remaining in launching your site.</p>
<p><a href="http://kcy.me/bhr0" target="_blank">Shaken Grid (Lite)</a> &#8211; WordPress gridded theme that uses <a href="http://masonry.desandro.com/" target="_blank">jQuery Masonry</a> which “arranges elements vertically then horizontally according to a grid.”</p>
<p><a href="http://kcy.me/bhr4" target="_blank">HTML5PLEASE</a> &#8211; Look up HTML5, CSS3, etc features, know if they are ready for use, and if so find out how you should use them – with polyfills, fallbacks or as they are.</p>
<p><a href="http://kcy.me/bhr5" target="_blank">Animated Buttons</a> &#8211; Samples of buttons made with CSS3 Transitions and Animations</p>
<p><a href="http://kcy.me/betj" target="_blank">Pure CSS Under Construction GIF</a> &#8211; The modern icon implementation</p>
<p><a href="http://kcy.me/bgtk" target="_blank">Pictonic Font Icons</a> &#8211; 230 free icons: social, sharing, browsers, operating systems, etc</p>
<p><a href="http://kcy.me/bes3" target="_blank">CSS2LESS</a> &#8211; Translates your CSS files to LESS notation.</p>
<p><a href="http://kcy.me/bhrc" target="_blank">Application Icon Set</a> - The Application Icon Set by Matt Gentile consists of 120 pixel-perfect icons in three different sizes (16px, 32px and 64px) and it comes in three formats (PSD, PNG and CSH). The icons are vector shapes so you can scale them to any size.</p>
<h2>GIS</h2>
<p><a href="http://bl.ocks.org/3711652">Projection Transitions</a> &#8211; 2D animation projections transitions.</p>
<p><a href="http://www.youtube.com/watch?v=b1xXTi1nFCo">Unfolding the Earth &#8211; Myriahedral projections</a> &#8211; Awesome video animation among many map projections.</p>
<p><a href="http://kcy.me/bhr8" target="_blank">GeoJSONLint</a> &#8211; Validate your GeoJSON data files.</p>
<p><a href="http://kcy.me/bfw3" target="_blank">OpenGeo Suite 3.0 Released!</a> &#8211; A new version of this great open source suite.</p>
<h2>Programming</h2>
<p><a href="http://kcy.me/bhm8" target="_blank">Using Java as Native Linux Apps</a> - Java utilities to calling C routines, create daemon processes, packaging, command line interfaces, etc</p>
<p><a href="http://kcy.me/bfwp" target="_blank">Measuring Agile Scrum Development with Velocity</a> &#8211; Short video tutorial that defines Velocity and explains how to measure the capacity of projects in Agile Scrum Development.</p>
<p><a href="http://kcy.me/bfwk" target="_blank">LinkedIn Moved From Rails To Node: 27 Servers Cut And Up To 20x Faster</a> &#8211; Article about how LinkedIn has moved from Rails to Node.js</p>
<h2>Curiosities</h2>
<p><a href="http://kcy.me/bhqb" target="_blank">This Land Is Mine</a> &#8211; Musical cartoon movie about the Israeli/Palestinian conflict.</p>
<p><a href="http://kcy.me/bhq6 " target="_blank">iPod</a> &#8211; A nice create tribute to Steve Jobs</p>
<p><a href="http://kcy.me/bhq0 " target="_blank">DC vs Marvel Infographic</a> &#8211; Compare movies revenues</p>
<p><a href="http://nanoworkout.com/" target="_blank">Nano Workout</a> &#8211; Original site with tons of short exercises for our health.</p>
<p>&nbsp;<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li>No Related Posts</li>
</ul>
<img src="http://feeds.feedburner.com/~r/ACuriousAnimal/~4/cLY_S9B1hA8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://acuriousanimal.com/blog/2012/10/19/things-seen-this-october-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://acuriousanimal.com/blog/2012/10/19/things-seen-this-october-2012/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.440 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-13 23:44:46 -->
