<?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>Open eyes Working brain &#187; javascript</title>
	<atom:link href="http://federico.galassi.net/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://federico.galassi.net</link>
	<description>dedicated, in respect and admiration, to the spirit that lives in the computer</description>
	<lastBuildDate>Wed, 25 May 2011 18:08:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Die Semicolon Die!</title>
		<link>http://federico.galassi.net/2011/05/25/die-semicolon-die/</link>
		<comments>http://federico.galassi.net/2011/05/25/die-semicolon-die/#comments</comments>
		<pubDate>Wed, 25 May 2011 17:05:54 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[asi]]></category>
		<category><![CDATA[automatic semicolon insertion]]></category>
		<category><![CDATA[douglas crockford]]></category>
		<category><![CDATA[end of line]]></category>
		<category><![CDATA[jshint]]></category>
		<category><![CDATA[jslint]]></category>
		<category><![CDATA[pitfall]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=362</guid>
		<description><![CDATA[I&#8217;ve always put javascript&#8217;s automatic semicolon insertion (ASI for short) under the bad parts of the language. That is based on Douglas Crockford&#8217;s explanation of how the feature is tricky and easily leads to mistakes, with the canonical example being: // good, returns the object return { ... } // wrong! returns undefined return { [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/12/semicolon2.jpeg"><img class="alignright size-full wp-image-368" style="position: relative; z-index: 99;" title="no_semicolon" src="http://federico.galassi.net/wp-content/uploads/2010/12/semicolon2.jpeg" alt="" width="200" height="167" /></a>I&#8217;ve always put <a href="http://en.wikipedia.org/wiki/JavaScript_syntax#Whitespace_and_semicolons">javascript&#8217;s automatic semicolon insertion</a> (ASI for short) under the bad parts of the language. That is based on <a href="http://googlecode.blogspot.com/2009/03/doug-crockford-javascript-good-parts.html">Douglas Crockford&#8217;s explanation</a> of how the feature is tricky and easily leads to mistakes, with the canonical example being:</p>
<pre class="brush: js">// good, returns the object
return { ... }

// wrong! returns undefined
return
    {
        ...
    }</pre>
<p>Fair enough. Lately i&#8217;ve been doing more and more ruby. Ruby is a language universally praised for its elegant, easy to read syntax. One of the strong points of the syntax is its terseness, that is, you can <a href="http://martinfowler.com/bliki/SyntacticNoise.html">omit a lot of punctuation</a>. Semicolons as well. Wait a moment&#8230;</p>
<pre class="brush: ruby">def test
    return
        {
            ...
        }
end

test # returns nil !!</pre>
<p>Same thing! Having the meaning of a program change due to an end-of-line is not a good thing in ruby as well, but it&#8217;s widely accepted because of the benefits. This must be true for javascript as well, so first point:</p>
<p><strong>&#8220;Removing semicolons and other punctuation clutter is not just a liability. It actually makes your code look better.&#8221;</strong></p>
<p>So both the languages have to decide when a statement implicitly terminates. But is ruby implementation really the same as javascript? It turns out it&#8217;s not, ruby takes a quite safer approach. A statement in ruby is finished on an end-of-line if it&#8217;s syntactically valid by itself, it spans multiple lines if it&#8217;s not:</p>
<pre class="brush: ruby"># this works, the trailing dot means the statement is not finished
object.
    method1.
    method2.
    method3

# syntax error, first line is a valid statement by itself, second line calls method1 on nothing
object
    .method1
    .method2
    .method3</pre>
<p>It&#8217;s safe because how a line is parsed depends on the line itself, not by other lines that could be written &#8220;by others&#8221;. The bad part is how it makes method chaining on multiple lines look ugly. This is why ruby 1.9 introduced the exception &#8220;the statement continues if the first character of next line is a dot&#8221;.</p>
<p>Javascript takes a step further to solve this bad part. A controversial step. A statement is finished on an end-of-line if the first character of the next line cannot be correctly parsed as if it was part of the line. Otherwise, the statement goes on. This removes the clutter and gives nice chaining:</p>
<pre class="brush: js">// just works
object
    .method1()
    .method2()
    .method3()</pre>
<p>Unfortunately, you now have a nasty problem. 2 lines which are supposed to be 2 different statements, but with the first character of the second line being a valid continuation of the first, will be treated as one statement with unpredictable results. This practically happens only when a line starts with either ( [ + - /</p>
<pre class="brush: js">// function call instead of grouping
var a = b + c
(d + e).print()
// is really
var a = b + c(d + e).print()

// array index instead of array literal
var a = ["a", "b", "c"]
[0, 1].forEach( &#8230; )
// is really
var a = ["a", "b", "c"][0, 1].forEach( &#8230; )

// binary math operator instead of unary
var a = b + c
-1 == string.indexOf(query) || die()
// is really
var a = b + c &#8211; 1 == string.indexOf(query) || die()

// division instead of regular expression
var i=0
/[a-z]/g.exec(s)
// is really
var i=0 /[a-z]/g.exec(s)</pre>
<p>Well, this sucks, so what should you do? I could say that i remember being caught by this problem just once in many years of javascript. The return problem or starting a line the nasty way is something <em>extremely rare</em>. But even if you don't want to afford the risk, why avoid ASI without even knowing about it? Without even thinking about a reasonable fix, given the nicer syntax? And this leads me to the second point:</p>
<p><strong>"To write semicolon-free code and avoid getting bitten, you just need to remember 2 rules</strong></p>
<p><strong> 1) Don't put an end-of-line between return, break, continue, throw, postfix ++, postfix -- and their operand<br />
2) Avoid starting a line with ( [ +  - / but if you have to, prepend it with a semicolon"</strong></p>
<pre class="brush: js">// everything's fine
return { ... }
continue label
break label
throw error
counter++
counter--

var a = b + c
;(d + e).print()

var a = ["a", "b", "c"]
;[0, 1].forEach( ... )

var a = b + c
;-1 == string.indexOf(query) || die()

var i=0
;/[a-z]/g.exec(s)</pre>
<p>Is it that taxing to remember? Automatic semicolon insertion is of course controversial, but using it is not a complete failure. It's a matter of taste, a trade-off between cleaner nicer code and some tough albeit avoidable pitfall.</p>
<p>While i'm at it, let's debunk some well known myths that always show up</p>
<ul>
<li><strong>"I could know ASI but others don't and they will mess things out"</strong><br />
Well this may be true. It depends on where you work, the skill of your peers, etc.. To me, a javascript programmer is just supposed to know this stuff as he knows of prototype and first class functions. If they don't, supposing they got the opposable thumbs, as they can be told to put semicolons everywhere, they can be told to remember the above 2 simple rules.</li>
<li><strong>"It's not gonna work the same way on every browser"</strong><br />
It's in the specs since more than a decade. I think browser bugs are a thing of the past and even proponents of this theory look unable to find <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=238945">something newer than 5 years ago</a>, so.</li>
<li><strong>"It breaks the tools. You cannot minify code anymore, etc..."</strong><br />
Let's be clear about this. It's officially part of the language. A tool unable to cope with ASI is a broken tool, period. Anyway, i have never had a problem with <a href="http://code.google.com/closure/compiler/">google closure compiler</a>.<strong> </strong></li>
<li><strong>"Jslint doesn't work with it"</strong><br />
<a href="http://www.jslint.com/">Jslint</a> enforces the vision of Douglas and it's pretty strict about it. This is fair, yet for those having another vision nothing is wrong with using <a href="http://jshint.com/">Jshint</a> which has an option to accept ASI. <strong> </strong></li>
</ul>
<p>Let's close with two very nice articles that explain the details and of course you can always read the ecmascript specs:</p>
<p><a href="http://inimino.org/~inimino/blog/javascript_semicolons">The most well-written comprehensive article</a></p>
<p><a href="http://lucumr.pocoo.org/2011/2/6/automatic-semicolon-insertion/">Very good explanation of the pitfalls</a></p>
<p><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">The plain specs </a></p>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2011/05/25/die-semicolon-die/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Lot of Javascript Love</title>
		<link>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/</link>
		<comments>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 23:22:39 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[event driven]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[new parts]]></category>
		<category><![CDATA[webtechcon]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=344</guid>
		<description><![CDATA[I am back from Webtech Conference Italia 2010. One of the first in Italy featuring a full javascript day with six talks. Not counting javascript related talks in other tracks. It has been exciting to see javascript explained in patterns, historically and computationally analyzed, tuned for faster websites, organized in popular libraries, used to query [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/11/love_bear_small.jpg"><img class="alignright size-full wp-image-346" title="love_bear_small" src="http://federico.galassi.net/wp-content/uploads/2010/11/love_bear_small.jpg" alt="" width="200" height="200" /></a>I am back from <a href="http://webtechcon.it/">Webtech Conference Italia 2010</a>. One of the first in Italy featuring a full <a href="http://webtechcon.it/2010/sessions/?tid=1752">javascript day</a> with six talks. Not counting javascript related talks in other tracks. It has been exciting to see javascript explained in patterns, historically and computationally analyzed, tuned for faster websites, organized in popular libraries, used to query modern databases, to extract data from the web, to mashup those data, to program mobile devices, improved in latest browsers and at last on the server side to build scalable, fast network applications.</p>
<p>We&#8217;re witnessing the exponential rise of a neglected little broken language. A language that obviously started with <a href="http://en.wikipedia.org/wiki/First-class_function">something very right</a> and <a href="http://www.yuiblog.com/blog/2008/08/14/premature-standardization/">grew up even better</a>.</p>
<p>A language that is finally gonna get A LOT of love.</p>
<p>P.S. Here are my talks:</p>
<div id="__ss_5742893" style="width: 425px;"><strong><a title="Event Driven Javascript" href="http://www.slideshare.net/fgalassi/event-driven-javascript">Event Driven Javascript</a></strong><object id="__sse5742893" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=eventdrivenjs-101111092308-phpapp02&amp;stripped_title=event-driven-javascript&amp;userName=fgalassi" /><param name="name" value="__sse5742893" /><param name="allowfullscreen" value="true" /><embed id="__sse5742893" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=eventdrivenjs-101111092308-phpapp02&amp;stripped_title=event-driven-javascript&amp;userName=fgalassi" name="__sse5742893" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
<div id="__ss_5745867" style="width: 425px;"><strong><a title="Javascript the New Parts" href="http://www.slideshare.net/fgalassi/javascript-the-new-parts">Javascript the New Parts</a></strong><object id="__sse5745867" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jsthenewparts-101111152356-phpapp01&amp;stripped_title=javascript-the-new-parts&amp;userName=fgalassi" /><param name="name" value="__sse5745867" /><param name="allowfullscreen" value="true" /><embed id="__sse5745867" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jsthenewparts-101111152356-phpapp01&amp;stripped_title=javascript-the-new-parts&amp;userName=fgalassi" name="__sse5745867" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please Don&#8217;t Touch the Slow Parts</title>
		<link>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/</link>
		<comments>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/#comments</comments>
		<pubDate>Sat, 08 May 2010 09:58:09 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[better software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[faster web]]></category>
		<category><![CDATA[fullo]]></category>
		<category><![CDATA[high performance web sites]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[slow parts]]></category>
		<category><![CDATA[steve souders]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=321</guid>
		<description><![CDATA[I spoke at Better Software 2010, together with Fullo, about speeding up web applications. The talk draws heavily from Steve&#8217;s work, but it&#8217;s a little bit different from current literature because it tries to organize best practices not as flat list but under macro-areas emerged as &#8220;slow parts&#8221;. Also, i concluded with my obsession that [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke at <a href="http://www.bettersoftware.it">Better Software</a> 2010, together with <a href="http://www.ideato.it">Fullo</a>, about speeding up web applications. The talk draws heavily from <a href="http://www.stevesouders.com/">Steve&#8217;s work</a>, but it&#8217;s a little bit different from current literature because it tries to organize best practices not as flat list but under macro-areas emerged as &#8220;slow parts&#8221;. Also, i concluded with <a href="http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/">my obsession</a> that complexity inherently introduced by performance optimizations should not be dealt with by programmers directly, but by means of automation and abstraction.</p>
<p>Here it is.</p>
<p><strong>update</strong>: now i am linking to the extended version which i gave at phpday 2010</p>
<div style="width:425px" id="__ss_4110316"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/fgalassi/please-dont-touch-the-slow-parts-v2" title="Please Don&#39;t Touch the Slow Parts V2">Please Don&#39;t Touch the Slow Parts V2</a></strong><object id="__sse4110316" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pleasedonttouch2-100515130606-phpapp01&#038;stripped_title=please-dont-touch-the-slow-parts-v2" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4110316" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pleasedonttouch2-100515130606-phpapp01&#038;stripped_title=please-dont-touch-the-slow-parts-v2" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Performance: Make the Browser Happy (and You Sad)</title>
		<link>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/</link>
		<comments>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 20:40:11 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[aptimize]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mark]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[twain]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=193</guid>
		<description><![CDATA[The browser is emerging as the best platform for applications, so a large community is growing to address its final weakness: speed. Google, Yahoo and various independent programmers are all pushing a bunch of clever techniques to boost performance and please end users. That&#8217;s nice, yet as Mark Twain once said, half of the results of good [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-203" title="BENDER" src="http://federico.galassi.net/wp-content/uploads/2009/11/BENDER1.jpeg" alt="BENDER" width="232" height="184" />The browser is emerging as the <a href="http://en.wikipedia.org/wiki/HTML5">best platform</a> for applications, so a large community is growing to address its final weakness: speed. <a href="http://code.google.com/speed/">Google</a>, <a href="http://developer.yahoo.com/performance/">Yahoo</a> and <a href="http://javascriptrocks.com/performance/">various independent programmers</a> are all pushing a bunch of clever techniques to boost performance and please end users. That&#8217;s nice, yet as Mark Twain once said, <em>half of the results of good intentions are evil</em> and i see potential danger in many of the suggestions made. Here a representative short list of them:</p>
<ul>
<li>Avoid for-in and forEach in favor of optimized while loops</li>
<li>Before making modifications to a DOM node remove it and then re-insert it</li>
<li>To insert multiple DOM nodes, first insert them into a Document Fragment and then add it to the DOM</li>
<li>Join all scripts into a single file</li>
<li>Load javascript files on demand</li>
</ul>
<p>Let&#8217;s make it clear for once, execution speed is not a human problem, that&#8217;s what computers are for, they execute our commands fast. The human problem is programming speed and writing down clear, readable, maintainable commands aka programs. forEach loops make sense to me, they say &#8220;i want to do something on each item&#8221;, optimized while loops make sense to computers. If i want to add DOM nodes or modify one, i don&#8217;t care of removing it or document fragments, browsers care. To me it&#8217;s just noise. Almost all of the problems addressed by those techniques stem from lack of smartness in the browser, and that&#8217;s where fixes belong to, on the machine side. The fact that there are <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">inept browser makers</a> is no excuse. Fixes still belong to the machine, they&#8217;re repeatable and can be made automatic. We have a long history of programs automatically converting human friendly code to machine friendly code. They&#8217;re called <a href="http://en.wikipedia.org/wiki/Compiler">compilers</a> and the output either machine code or optimized javascript doesn&#8217;t matter.</p>
<p>So, learn about javascript performance since knowledge is always the way, but don&#8217;t turn yourself into a machine, you&#8217;d be an awful one. Use the tools and wait for browsers to catch up.</p>
<ul>
<li><a href="http://www.aptimize.com/">Aptimize</a></li>
<li><a href="http://code.google.com/closure/compiler/">Closure Compiler</a></li>
<li><a href="http://developer.yahoo.com/yui/3/yui/#use">YUI 3 use</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Refactoring to Unobtrusive Javascript</title>
		<link>http://federico.galassi.net/2009/09/28/refactoring-to-unobtrusive-javascript/</link>
		<comments>http://federico.galassi.net/2009/09/28/refactoring-to-unobtrusive-javascript/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 21:49:06 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=159</guid>
		<description><![CDATA[I&#8217;ve been thinking for a while about techniques to enforce maximum separation of concerns in the client-side web technology stack. Even though, total separation of presentation, content and business logic may well be a utopia, the list of refactorings i collected over time are generally good to improve code quality and the whole concept of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking for a while about techniques to enforce maximum <a href="http://en.wikipedia.org/wiki/Separation_of_concerns">separation of concerns</a> in the client-side web technology stack. Even though, total separation of presentation, content and business logic may well be a utopia, the list of refactorings i collected over time are generally good to improve code quality and the whole concept of refactoring unusually applied to javascript is quite interesting per se. Here&#8217;s a talk about it i gave at <a href="http://www.javascriptcamp.com/">Javascript Camp 2009</a>.</p>
<div id="__ss_2081724" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Refactoring to Unobtrusive Javascript" href="http://www.slideshare.net/fgalassi/refactoring-to-unobtrusive-javascript">Refactoring to Unobtrusive Javascript</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=20090925refactoringtounobtrusivejsjscamp-090928090731-phpapp01&amp;stripped_title=refactoring-to-unobtrusive-javascript" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=20090925refactoringtounobtrusivejsjscamp-090928090731-phpapp01&amp;stripped_title=refactoring-to-unobtrusive-javascript" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2009/09/28/refactoring-to-unobtrusive-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript the good parts Talk</title>
		<link>http://federico.galassi.net/2009/05/17/javascript-the-good-parts-talk/</link>
		<comments>http://federico.galassi.net/2009/05/17/javascript-the-good-parts-talk/#comments</comments>
		<pubDate>Sun, 17 May 2009 20:22:41 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[good]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[phpcon]]></category>
		<category><![CDATA[phpday]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=45</guid>
		<description><![CDATA[I&#8217;m just back from phpDay 2009 in Verona, where i gave a revised edition of my &#8220;Javascript the Good Parts&#8221; talk, based on Douglas Crockford&#8216;s great material (first edition being one i gave at PHPCon in march). It&#8217;s been a pleasure to stay there along with nice people such as Gabriele, Fullo and many others. Also I found [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-53" title="js1" src="http://federico.galassi.net/wp-content/uploads/2009/05/js1.gif" alt="js1" width="180" height="236" />I&#8217;m just back from <a href="http://www.phpday.it">phpDay 2009</a> in Verona, where i gave a <a href="http://www.slideshare.net/fgalassi/javascript-the-good-parts-v2-1447479">revised edition</a> of my &#8220;Javascript the Good Parts&#8221; talk, based on <a href="http://www.crockford.com/">Douglas Crockford</a>&#8216;s great material (first edition being one i gave at <a href="http://www.phpcon.it/">PHPCon</a> in march). It&#8217;s been a pleasure to stay there along with nice people such as <a href="http://www.gabrielelana.it">Gabriele</a>, <a href="http://www.fullo.net/">Fullo</a> and many others. Also I found out a growing interest in the javascript language which may end up in some sort of italian javascript focused conference or barcamp. Now that would be nice. If anyone out there would be interested in such event, feel free to <a href="mailto:federico.galassi@gmail.com">e-mail me</a>.</p>
<p>In the mean time, here comes a list of resources for those who want to deepen their knowledge about content of the talk:</p>
<p><strong>Books</strong></p>
<ul>
<li><a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742">Javascript the good parts</a> - Kind of self explaining&#8230;where it all started. It&#8217;s slim yet dense. Some stuff is advanced.</li>
<li><a href="http://www.amazon.com/JavaScript-Definitive-Guide-David-Flanagan/dp/0596101996/">Javascript the definitive guide</a> - Best reference book and more.</li>
<li><a href="http://www.amazon.com/Secrets-JavaScript-Ninja-John-Resig/dp/193398869X">Secrets of the Javascript Ninja</a> &#8211; Upcoming Resig Book. Doomed to be good.</li>
</ul>
<p><strong>People</strong></p>
<ul>
<li><a href="http://www.crockford.com/">Douglas Crockford</a> - Senior <em>JavaScript</em> Architect at Yahoo! and JSON father &#8211; Listen and read EVERYTHING</li>
<li><a href="http://ejohn.org/">John Resig</a> &#8211; JavaScript Evangelist for the Mozilla Corporation and jQuery author &#8211; Listen and read EVERYTHING<a href="http://en.wikipedia.org/wiki/Brendan_Eich"></a></li>
<li><a href="http://en.wikipedia.org/wiki/Brendan_Eich">Brendan Eich</a> &#8211; Mozilla CTO and Javascript Father &#8211; Greatest historical figure<a href="http://www.quirksmode.org/"></a></li>
<li><a href="http://www.quirksmode.org/">Peter-Paul Koch</a> &#8211; quirksmode.com &#8211; King of compatibility matters<a href="http://stevesouders.com/"></a></li>
<li><a href="http://stevesouders.com/">Steve Souders</a> &#8211; Google employee and author of &#8220;High Performance Web Sites&#8221; &#8211; King of performance matters (together with Resig)</li>
</ul>
<p><strong>Videos</strong></p>
<ul>
<li><a href="http://developer.yahoo.com/yui/theater/">YUI Theater</a></li>
<li><a href="http://video.yahoo.com/video/play?vid=111593">YUI Theater - Douglas Crockford &#8211; The JavaScript Programming Language (4 parts)</a></li>
<li><a href="http://video.yahoo.com/video/play?vid=111582">YUI Theater - Douglas Crockford &#8211; An Inconvenient API: The Theory of the DOM (3 parts)</a></li>
<li><a href="http://video.yahoo.com/video/play?vid=111585">YUI Theater &#8211; Douglas Crockford &#8211; Advanced JavaScript (3 parts)</a></li>
<li><a href="http://www.youtube.com/watch?v=hQVTIJBZook">Youtube &#8211; Douglas Crockford &#8211; Javascript The Good Parts</a></li>
<li><a href="http://video.yahoo.com/watch/4403981/11812238">YUI Theater &#8211; John Resig &#8211; The DOM is a Mess</a></li>
<li><a href="http://www.youtube.com/watch?v=0LKDImgRfrg">Youtube &#8211; John Resig &#8211; Best Practices in Javascript Library Design</a></li>
<li><a href="http://www.youtube.com/watch?v=Kq4FpMe6cRs">Youtube &#8211; Google - Changes to JavaScript, Part 1: EcmaScript 5</a></li>
</ul>
<p><strong>Articles</strong></p>
<ul>
<li><a href="http://ejohn.org/blog/javascript-language-abstractions/">John Resig &#8211; Javascript Language Abstractions</a></li>
<li><a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html">Joel Spolsky &#8211; The Law of Leaky Abstractions</a></li>
<li><a href="http://www.codinghorror.com/blog/archives/000857.html">Jeff Atwood &#8211; Javascript the Lingua Franca of the Web</a></li>
<li><a href="http://ejohn.org/blog/ecmascript-5-objects-and-properties/">John Resig &#8211; ECMAScript 5 Objects and Properties</a></li>
<li><a href="http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/">John Resig - ECMAScript 5 Strict Mode, JSON, and More</a></li>
</ul>
<p><strong>Reference</strong></p>
<ul>
<li><a href="https://developer.mozilla.org/En">Mozilla Developer Center</a> - Best reference. Beware, it&#8217;s Firefox-oriented.</li>
<li><a href="http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf">ECMAScript 5th edition</a> &#8211; Standard specs of &#8220;next&#8221; javascript</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2009/05/17/javascript-the-good-parts-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

