<?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/"
	>

<channel>
	<title>dev.enekoalonso.com &#187; closure</title>
	<atom:link href="http://dev.enekoalonso.com/tag/closure/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.enekoalonso.com</link>
	<description>having fun with code</description>
	<lastBuildDate>Wed, 12 Oct 2011 21:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Performance matters</title>
		<link>http://dev.enekoalonso.com/2010/05/16/performance-matters/</link>
		<comments>http://dev.enekoalonso.com/2010/05/16/performance-matters/#comments</comments>
		<pubDate>Sun, 16 May 2010 18:36:24 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[checking]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[parameter]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=543</guid>
		<description><![CDATA[I just read this on an email from a Google&#8217;s Closure developer: Adding runtime checks for invalid usage is something we have policy against. It adds to the code size as well as to the runtime cost. I totally agree. Developers should be responsible for their usage of APIs or third party libraries, while these [...]]]></description>
			<content:encoded><![CDATA[<p>I just read this on an email <a href="http://groups.google.com/group/closure-library-discuss/msg/15fae0a2aee76721">from a Google&#8217;s Closure developer</a>:</p>
<blockquote><p>Adding runtime checks for invalid usage is something we have policy against. It adds to the code size as well as to the runtime cost.</p></blockquote>
<p>I totally agree. Developers should be responsible for their usage of APIs or third party libraries, while these should focus on working as efficient as possible given the correct parameters. Being Javascript a non-strongly-typed language, checking the parameters passed to every function are right at runtime would be a huge overkill.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>March 15, 2010 -- <a href="http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/" title="More updates to Mooml coming soon">More updates to Mooml coming soon</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/" title="Dojo y yo">Dojo y yo</a> (0)</li><li>May 6, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/" title="Tech talks at LEVEL Studios">Tech talks at LEVEL Studios</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/things-to-do/" title="Things to do">Things to do</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/05/16/performance-matters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tech talks at LEVEL Studios</title>
		<link>http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/</link>
		<comments>http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/#comments</comments>
		<pubDate>Thu, 06 May 2010 15:51:16 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[level]]></category>
		<category><![CDATA[qunit]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[studios]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[websocket]]></category>
		<category><![CDATA[websockets]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=527</guid>
		<description><![CDATA[Today we have a Tech Meeting at LEVEL Studios and I&#8217;ll be doing a quick demo of some tools we have been using in our current project, to help during our development: Using Closure Compiler to detect Javascript syntax errors and remove warnings. Using QUnit to test a REST api The power of WebSockets and [...]]]></description>
			<content:encoded><![CDATA[<p>Today we have a Tech Meeting at <a href="http://level-studios.com/">LEVEL Studios</a> and I&#8217;ll be doing a quick demo of some tools we have been using in our current project, to help during our development:</p>
<ul>
<li>Using <a href="http://code.google.com/closure/compiler/">Closure Compiler</a> to detect Javascript syntax errors and remove warnings.</li>
<li>Using <a href="http://docs.jquery.com/QUnit">QUnit</a> to test a REST api</li>
<li>The power of <a href="http://en.wikipedia.org/wiki/Web_Sockets">WebSockets</a> and how the way browsers and servers interact with each other will change in the future.</li>
</ul>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 22, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/22/more-websockets-now-with-python/" title="More WebSockets, now with Python!">More WebSockets, now with Python!</a> (9)</li><li>March 15, 2010 -- <a href="http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/" title="More updates to Mooml coming soon">More updates to Mooml coming soon</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/things-to-do/" title="Things to do">Things to do</a> (0)</li><li>March 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/03/14/staying-busy/" title="Staying busy">Staying busy</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More updates to Mooml coming soon</title>
		<link>http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/</link>
		<comments>http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 04:56:35 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[eval]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mooml]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[slow]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[templating]]></category>
		<category><![CDATA[with]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=499</guid>
		<description><![CDATA[I&#8217;ve been very busy lately, both with spaniards.es and at work. Too much stuff to do. Nevertheless, I&#8217;ve been working lately on a version of Mooml that does not rely on with/eval. The problem of using eval (which has bad reputation but is used every time we parse JSON -unless you use this- or load [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been very busy lately, both with <a href="http://www.spaniards.es">spaniards.es</a> and at work. Too much stuff to do. Nevertheless, I&#8217;ve been working lately on a version of Mooml that does not rely on with/eval. The problem of using eval (which has bad reputation but is used every time we <a href="http://github.com/mootools/mootools-core/blob/master/Source/Utilities/JSON.js">parse JSON</a> -unless you use <a href="http://code.google.com/p/json-sans-eval/">this</a>- or load Javascript via AJAX) in Mooml is that it references external variables, something that is not suported by javascript compilers like Google Closure.</p>
<p>So, I got it working, using RegEx, but seems like it is way slower than eval. I have to do some performance testing and do some research to see if there is any way I can improve the performance. Hope to have version 1.1 ready soon.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>April 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/04/28/mooml-1-2-3-bye-bye-with/" title="Mooml 1.2.3 &#8211; Bye, bye, with()">Mooml 1.2.3 &#8211; Bye, bye, with()</a> (3)</li><li>March 24, 2010 -- <a href="http://dev.enekoalonso.com/2010/03/24/mooml-1-1-no-more-eval-say-hi-to-mooml-template-and-mooml-templates/" title="Mooml 1.1 &#8211; No more eval(), say Hi to Mooml.Template and Mooml.Templates">Mooml 1.1 &#8211; No more eval(), say Hi to Mooml.Template and Mooml.Templates</a> (0)</li><li>February 19, 2010 -- <a href="http://dev.enekoalonso.com/2010/02/19/having-fun-with-mooml-and-twitter/" title="Having fun with Mooml &#038; Twitter">Having fun with Mooml &#038; Twitter</a> (0)</li><li>May 16, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/16/performance-matters/" title="Performance matters">Performance matters</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dojo y yo</title>
		<link>http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/</link>
		<comments>http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:48:02 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[dependency]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[goog]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[require]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=423</guid>
		<description><![CDATA[Back in November 2008 I had a chance to work with Dojo on a project for Cisco WebEx. I didn&#8217;t like it at all. I was used to the simplicity of jQuery and Mootools and I couldn&#8217;t understand how Dojo had been designed so complicated. Well, one year later I just realized that it is [...]]]></description>
			<content:encoded><![CDATA[<p>Back in November 2008 I had a chance to work with <a href="http://dojotoolkit.org/">Dojo</a> on a project for <a href="http://www.webex.com/iphone/">Cisco WebEx</a>. I didn&#8217;t like it at all. I was used to the simplicity of jQuery and Mootools and I couldn&#8217;t understand how Dojo had been designed so complicated. Well, one year later I just realized that it is not that Dojo was that complicated. It is that I wasn&#8217;t ready for it. Now it is time to give it another chance.</p>
<h3>Some cool stuff about Dojo</h3>
<p>Reading Dojo&#8217;s documentation I have finally understood something that I was wondering how it works. It&#8217;s nothing really complicated, but it&#8217;s actually very cool: <a href="http://api.dojotoolkit.org/jsdoc/HEAD/dojo.require">dojo.require</a></p>
<p>Javascript requests to the server are asynchronous (not sure if synchronous request can be done). So we depend on callback functions to continue the flow of your program. That means that when we put <code lang="javascript">dojo.require('somefancyjs');</code> on a line, the execution does not stop and it continues to the next line of code while the browser downloads that file from the server in the background.</p>
<p>Looks like Dojo puts those requests on some kind of array, array that is checked when you use <code>dojo.addOnLoad()</code> which does not execute your callback function until all elements of the array have been downloaded. That is very cool because that means you can do as many dojo.require&#8217;s as you need. The down side is that you need to put your code inside a callback function, which is not very bad when working with objects.</p>
<p>Next, I have to find out how goog.require works ;)</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 16, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/16/performance-matters/" title="Performance matters">Performance matters</a> (2)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/things-to-do/" title="Things to do">Things to do</a> (0)</li><li>May 6, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/" title="Tech talks at LEVEL Studios">Tech talks at LEVEL Studios</a> (0)</li><li>March 15, 2010 -- <a href="http://dev.enekoalonso.com/2010/03/15/more-updates-to-mooml-coming-soon/" title="More updates to Mooml coming soon">More updates to Mooml coming soon</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Things to do</title>
		<link>http://dev.enekoalonso.com/2010/01/28/things-to-do/</link>
		<comments>http://dev.enekoalonso.com/2010/01/28/things-to-do/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 04:15:44 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=418</guid>
		<description><![CDATA[To do list: Try Appcelerator (downloaded.. don&#8217;t like it very much, have to spend more time with it) Install iPhone SDK 3.2 (downloading installing&#8230;) Study LinkedIn API Study Twitter API Take a look at YQL Play with Google Closure JS library Play with Dojo JS library That&#8217;s it for now. Let&#8217;s see if I can [...]]]></description>
			<content:encoded><![CDATA[<p>To do list:</p>
<ul>
<li><del datetime="2010-01-31T00:52:29+00:00">Try <a href="http://www.appcelerator.com/">Appcelerator</a></del> (downloaded.. don&#8217;t like it very much, have to spend more time with it)</li>
<li><del datetime="2010-01-31T01:29:38+00:00">Install <a href="http://developer.apple.com/iphone">iPhone SDK 3.2</a> (<del datetime="2010-01-31T00:52:29+00:00">downloading</del> installing&#8230;)</del></li>
<li>Study <a href="http://developer.linkedin.com/community/apis">LinkedIn API</a></li>
<li>Study <a href="http://apiwiki.twitter.com/">Twitter API</a></li>
<li>Take a look at <a href="http://developer.yahoo.com/yql/">YQL</a></li>
<li>Play with <a href="http://code.google.com/closure/library">Google Closure</a> JS library</li>
<li>Play with <a href="http://dojotoolkit.org/">Dojo</a> JS library</li>
</ul>
<p>That&#8217;s it for now. Let&#8217;s see if I can find time to do all those.</p>
<h4>Updated</h4>
<p><a href="http://dev.enekoalonso.com/wp-content/uploads/2010/01/Screen-shot-2010-01-30-at-5.37.52-PM.png"><img src="http://dev.enekoalonso.com/wp-content/uploads/2010/01/Screen-shot-2010-01-30-at-5.37.52-PM-396x300.png" alt="" title="XCode with SDK 3.2 for iPad" width="396" height="300" class="aligncenter size-medium wp-image-439" /></a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 6, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/" title="Tech talks at LEVEL Studios">Tech talks at LEVEL Studios</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/" title="Dojo y yo">Dojo y yo</a> (0)</li><li>June 30, 2009 -- <a href="http://dev.enekoalonso.com/2009/06/30/iphone-3-0-geolocation-with-javascript/" title="iPhone 3.0 geolocation with Javascript">iPhone 3.0 geolocation with Javascript</a> (1)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/01/28/things-to-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

