<?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>John Polacek</title>
	<atom:link href="http://johnpolacek.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnpolacek.com</link>
	<description>Developer + Designer</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:06:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>A Great Month</title>
		<link>http://johnpolacek.com/2012/01/18/a-great-month/</link>
		<comments>http://johnpolacek.com/2012/01/18/a-great-month/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 16:01:29 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[jquery]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=421</guid>
		<description><![CDATA[Wow, what a great few weeks I&#8217;ve had. Things started off when on New Year&#8217;s Day I posted my Scrollorama plugin to Hacker News and a couple other places. To my great surprise, it shot up to #1 on HN and stayed on the front page for pretty much the whole day. Then it started [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, what a great few weeks I&rsquo;ve had.</p>
<p>Things started off when on New Year&rsquo;s Day I posted my <a href="johnpolacek.github.com/scrollorama">Scrollorama plugin</a> to Hacker News and a couple other places. To my great surprise, it shot up to #1 on HN and stayed on the front page for pretty much the whole day.</p>
<p><img src="http://johnpolacek.com/wp-content/uploads/2012/01/hackernews_top.png" alt="" title="hackernews_top" width="475" height="194" class="alignnone size-full wp-image-426" /></p>
<p>Then it started showing up on Twitter, and got a lot of great compliments from people I really respect. I even got a tweet <a href="https://twitter.com/#!/johnpolacek/status/153638712687869952">favorited by Paul Irish</a>. The fun continued when Scrollorama got featured in <a href="http://dailyjs.com/2012/01/03/jquery-roundup/">dailyjs</a> and <a href="http://www.theverge.com/2012/1/4/2680447/scrollorama-animate-webpage-text-jquery-plugin-john-polacek">The Verge</a> and <a href="http://webscripts.softpedia.com/script/Internet-Browsers-C-C/Navigation/Scrollorama-72325.html">softpedia</a>.</p>
<p>Then, my <a href="johnpolacek.github.com/scrolldeck.js/decks/responsive">&ldquo;What The Heck Is Responsive Web Design?&rdquo; slides</a> got posted to Hacker News, then linked to by a number of people, including Mr. <a href="http://www.abookapart.com/products/html5-for-web-designers">HTML5 For Web Designers</a> Himself, <a href="http://adactio.com/links/">Jeremy Keith</a>.</p>
<p>Finally, to top it all off, my work has been featured across <a href="http://javascriptweekly.com/archive/53.html">JavaScript Weekly</a>, <a href="http://javascriptshow.com/episodes/27">The JavaScript Show</a> and <a href="http://html5weekly.com/archive/21.html">HTML5 Weekly</a>, all in the same week.</p>
<p>Of course, I also have to say that <a href="http://twitpic.com/7ql6vx">Grant</a>, my new baby boy, has been absolutely great. No colic, sleeps and eats well, and is just a pleasant baby. So, professionally and personally, it has been a really great time for me. Thanks everybody!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2012/01/18/a-great-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrollorama</title>
		<link>http://johnpolacek.com/2012/01/01/scrollorama/</link>
		<comments>http://johnpolacek.com/2012/01/01/scrollorama/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 12:55:14 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=384</guid>
		<description><![CDATA[Over my holiday/new-baby-time-off break, I took some time to work on a couple new jQuery plugins that I&#8217;ve been thinking about. I&#8217;m a fan of the various cool scrolly sites out there like this and this. I also dig slideshow presentation plugins like deck.js and reveal.js With that in mind, I&#8217;ve created Scrollorama, the jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Over my holiday/new-baby-time-off break, I took some time to work on a couple new jQuery plugins that I&rsquo;ve been thinking about. I&rsquo;m a fan of the various cool scrolly sites out there like <a href="http://www.nikevision.com/">this</a> and <a href="http://2011.beercamp.com/">this</a>. I also dig slideshow presentation plugins like <a href="http://imakewebthings.github.com/deck.js/">deck.js</a> and <a href="http://lab.hakim.se/reveal-js/#/">reveal.js</a></p>
<p>With that in mind, I&rsquo;ve created <a href="http://johnpolacek.github.com/scrollorama">Scrollorama</a>, the jQuery plugin for doing cool scrolly things. Basically, it lets you animate elements on the page based on the browser window&rsquo;s scroll position. You can see what I mean by checking out the <a href="http://johnpolacek.github.com/scrollorama">project demo page on Github</a>.</p>
<p>The other plugin I made is <a href="http://johnpolacek.github.com/scrolldeck.js">scrolldeck.js</a>, which is for making vertically scrolling slide decks. It uses Scrollorama and keyboard listening to manage the slide transitions. You can see it in action on its demo page, and also in some example scrolldecks I created. <a href="http://johnpolacek.github.com/scrolldeck.js/decks/responsive/">&ldquo;What The Heck Is Responsive Web Design?&rdquo;</a> is a scrolldeck that demonstrates a variety of features, particularly animation builds. <a href="http://johnpolacek.github.com/scrolldeck.js/decks/infographics/">&ldquo;Infographics Are Cool&rdquo;</a> is a demo of how to create a scrolldeck of full screen images. Lastly, I created a <a href="http://johnpolacek.github.com/scrolldeck.js/decks/parallax/">parallax scrolldeck demo</a> of how to use it with the <a href="http://www.ianlunn.co.uk/plugins/jquery-parallax/">Parallax jQuery Plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2012/01/01/scrollorama/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>My 2012 List of Goals</title>
		<link>http://johnpolacek.com/2011/12/31/my-2012-list-of-goals/</link>
		<comments>http://johnpolacek.com/2011/12/31/my-2012-list-of-goals/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 18:57:04 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=405</guid>
		<description><![CDATA[At the start of each year, I usually write out a list of things I plan on trying to accomplish professionally. For the last couple of years, these lists have mostly consisted of technologies and programming languages I wanted to learn. This year is different. I feel like I&#8217;ve got a pretty good grasp of [...]]]></description>
			<content:encoded><![CDATA[<p>At the start of each year, I usually write out a list of things I plan on trying to accomplish professionally. For the last couple of years, these lists have mostly consisted of technologies and programming languages I wanted to learn. This year is different. I feel like I&rsquo;ve got a pretty good grasp of a variety of languages and web development overall. So instead, my list is composed of one item (and it also applies to my personal/family life as well). <b><em>Do Cool Stuff.</em></b></p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/12/31/my-2012-list-of-goals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responsive Thumbnail Gallery</title>
		<link>http://johnpolacek.com/2011/11/17/responsive-thumbnail-gallery/</link>
		<comments>http://johnpolacek.com/2011/11/17/responsive-thumbnail-gallery/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 03:31:02 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=356</guid>
		<description><![CDATA[I&#8217;ve just posted a new project to Github. This was a quick easy one. It&#8217;s a jQuery plugin for making a simple responsive image gallery that scales to fit the size of its container. The project page is at johnpolacek.github.com/ResponsiveThumbnailGallery]]></description>
			<content:encoded><![CDATA[<p>I&rsquo;ve just posted a new project to Github. This was a quick easy one. It&rsquo;s a jQuery plugin for making a simple responsive image gallery that scales to fit the size of its container. The project page is at <a href="http://johnpolacek.github.com/ResponsiveThumbnailGallery/">johnpolacek.github.com/ResponsiveThumbnailGallery</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/11/17/responsive-thumbnail-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I Love About Github</title>
		<link>http://johnpolacek.com/2011/11/15/what-i-love-about-github/</link>
		<comments>http://johnpolacek.com/2011/11/15/what-i-love-about-github/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 19:29:21 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=347</guid>
		<description><![CDATA[I just set up my Github homepage. I&#8217;ve been seeing all these people setting up cool project pages and wanted to get in on it. I&#8217;ve been posting code to Github for quite some time (and Google Code before that). I made the switch to Git from SVN awhile back. For my own personal workflow, [...]]]></description>
			<content:encoded><![CDATA[<p>I just set up <a href="http://johnpolacek.github.com/">my Github homepage</a>. I&rsquo;ve been seeing all these people setting up cool <a href="http://pages.github.com/">project pages</a> and wanted to get in on it.</p>
<p>I&rsquo;ve been posting code to Github for quite some time (and Google Code before that). I made the switch to Git from SVN awhile back. For my own personal workflow, where I mostly code solo, there isn&rsquo;t too much benefit for Git over SVN. However, Git does have one killer feature, and that is Github.</p>
<p>Github is a tremendously useful site. Between that and StackOverflow, it has never been a better time to be a developer. Here are the things I love about Github:</p>
<ul>
<li><strong>The code.</strong> Oh. My. God. Frameworks, utilities, helpful gists, apps, etc. etc. So much goodness on there.</li>
<li><strong>The people.</strong> Who isn&rsquo;t on Github these days. And you can interact with them all. Ask questions, make pull requests, fork their stuff. In my inbox, I have messages from <a href="https://github.com/scottjehl">Scott Jehl</a>, <a href="https://github.com/nathansmith/960-Grid-System">Nathan Smith</a>, <a href="https://github.com/h5bp/mobile-boilerplate">Shi Chuan</a> and <a href="https://github.com/paulirish/html5-boilerplate">Paul Irish</a>. Mother F&rsquo;ing Paul Irish. How cool is that?!</li>
<li><strong>Free Code Storage.</strong> Oh yeah, and you can put all your code up there. (Well at least the public stuff, for private I use <a href="https://bitbucket.org">bitbucket</a>)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/11/15/what-i-love-about-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuff I’m Into Now</title>
		<link>http://johnpolacek.com/2011/10/26/stuff-i%e2%80%99m-into-now/</link>
		<comments>http://johnpolacek.com/2011/10/26/stuff-i%e2%80%99m-into-now/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 13:55:40 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=337</guid>
		<description><![CDATA[Here are a few of the things that I have been into lately: Startup Podcasts. My current favorite, Tech Zing, as well as Mixergy and Startups For the Rest of Us Ted Talks about holy shit stuff going on in energy and medicine Node.js, and the excellent collection of tutorials at nodetuts.com HTML5 WebSockets and [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a few of the things that I have been into lately:</p>
<ul>
<li>Startup Podcasts. My current favorite, <a href="http://techzinglive.com" target="_blank">Tech Zing</a>, as well as Mixergy and <a href="http://www.startupsfortherestofus.com" target="_blank">Startups For the Rest of Us</a>
<li>Ted Talks about holy shit stuff going on in <a href="http://www.ted.com/talks/justin_hall_tipping_freeing_energy_from_the_grid.html" target="_blank">energy</a> and <a href="http://www.ted.com/talks/richard_resnick_welcome_to_the_genomic_revolution.html" target="_blank">medicine</a></li>
<li><a href="http://nodejs.org" target="_blank">Node.js</a>, and the excellent collection of tutorials at <a href="http://nodetuts.com" target="_blank">nodetuts.com</a>
<li><a href="http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/" target="_blank">HTML5 WebSockets</a> and <a href="http://socket.io/" target="_blank">socket.io</a></li>
<li><a href="http://www.amctv.com/shows/breaking-bad" target="_blank">Breaking Bad</a>. Just getting started on the third season. Love this show.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/10/26/stuff-i%e2%80%99m-into-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inspiration</title>
		<link>http://johnpolacek.com/2011/09/30/inspiration/</link>
		<comments>http://johnpolacek.com/2011/09/30/inspiration/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 13:19:18 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=319</guid>
		<description><![CDATA[There are so many great sources of web design and development inspiration out there. Every time I run across one, I add it to my delicious bookmarks. Below are some of my favorites. One Page LoveMy current favorite. A collection of beautifully designed one-page websites. Really enjoy using and building these. Web Typography For The [...]]]></description>
			<content:encoded><![CDATA[<p>There are so many great sources of web design and development inspiration out there. Every time I run across one, I add it to <a href="http://www.delicious.com/johnpolacek/" target="_blank">my delicious bookmarks</a>. Below are some of my favorites.</p>
<p><a href="http://onepagelove.com" target="_blank"><strong>One Page Love</strong></a><br />My current favorite. A collection of beautifully designed one-page websites. Really enjoy using and building these.</p>
<p><a href="http://webtypographyforthelonely.com" target="_blank"><strong>Web Typography For The Lonely</strong></a><br />The best of what&rsquo;s happening in modern web typography.</p>
<p><a href="http://10k.aneventapart.com" target="_blank"><strong>10K Apart &#8211; Responsive Edition</strong></a><br />These entries to the annual 10K Apart competition are not only highly optimized (need to be less than 10K to enter), they all implement responsive web design.</p>
<p><a href="http://sixrevisions.com/design-showcase-inspiration/30-inspiring-about-me-pages/" target="_blank"><strong>30 Inspiring &lsquo;About Me&rsquo; Pages</strong></a><br />Creating an &lsquo;About Me&rsquo; page is a perfect way for someone new to web development to get started.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/09/30/inspiration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Home Office</title>
		<link>http://johnpolacek.com/2011/08/01/the-home-office/</link>
		<comments>http://johnpolacek.com/2011/08/01/the-home-office/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 17:44:05 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=313</guid>
		<description><![CDATA[Finally finished our house renovations a couple weeks ago with a fresh coat of paint on the walls. Here&#8217;s a pic of my new home workspace:]]></description>
			<content:encoded><![CDATA[<p>Finally finished our house renovations a couple weeks ago with a fresh coat of paint on the walls. Here&rsquo;s a pic of my new home workspace:</p>
<p><a href="http://johnpolacek.com/wp-content/uploads/2011/08/homeoffice.jpg" rel="lightbox[313]"><img src="http://johnpolacek.com/wp-content/uploads/2011/08/homeoffice.jpg" alt="" title="homeoffice" width="475" height="356" class="alignnone size-full wp-image-315" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/08/01/the-home-office/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sizeit.js</title>
		<link>http://johnpolacek.com/2011/07/01/sizeit-js/</link>
		<comments>http://johnpolacek.com/2011/07/01/sizeit-js/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 16:35:16 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=298</guid>
		<description><![CDATA[Last week, I posted sizeit.js, a javascript utility for responsive web design, to github. It is a simple script that detects screen width and loads external css. Works kinda like media queries. Why not just use media queries? This article outlines some of the problems with them. The reason I created sizeit was for building [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, I posted <a href="https://github.com/johnpolacek/sizeit.js" target="_blank">sizeit.js</a>, a javascript utility for responsive web design, to github. It is a simple script that detects screen width and loads external css. Works kinda like media queries. Why not just use media queries? <a href="http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/" target="_blank">This article</a> outlines some of the problems with them.</p>
<p>The reason I created sizeit was for building web apps. Many times it is necessary to show different content or functionality in an app based on the user&rsquo;s screen size. At the end of his new book, <a href="http://www.abookapart.com/products/responsive-web-design" target="_blank">Responsive Web Design</a>, Ethan Marcotte suggests using javascript for just this purpose. He uses a simple slideshow as an example, recommending javascript size detection for determining which size images to load or whether to display a static image as alternate content.</p>
<p>If you&rsquo;re building an app that, by its very nature, requires javascript, then why not also use it for size detection, and ditch media queries altogether? I&rsquo;m not the first to use this approach. <a href="https://twitter.com/nathansmith" target="_blank">Nathan Smith</a>, the developer behind <a href="http://960.gs" target="_blank">960 Grid</a> and <a href="http://formalize.me" target="_blank">formalize</a>, created <a href="https://github.com/nathansmith/adapt" target="_blank">adapt.js</a> to do screen width detection and css loading.</p>
<p>One of the sizeit.js features I like is its size setting is available use in other javascript on the page, which is useful in the kinds of apps I work on and in scenarios like Marcotte presented in his book.</p>
<p>Up next, as a byproduct of recent projects, I&rsquo;m creating a single page app sort-of-boilerplate that I&rsquo;ll be posting to github that uses sizeit.js and some other techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/07/01/sizeit-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript to JavaScript</title>
		<link>http://johnpolacek.com/2011/06/17/from-actionscript-to-javascript/</link>
		<comments>http://johnpolacek.com/2011/06/17/from-actionscript-to-javascript/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 12:12:17 +0000</pubDate>
		<dc:creator>johnpolacek</dc:creator>
				<category><![CDATA[apps]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<guid isPermaLink="false">http://johnpolacek.com/?p=255</guid>
		<description><![CDATA[The dominant scripting language of the web is JavaScript. This should not be a controversial statement. Yet, among some Flash Devs, it might be. I still enjoy ActionScript, but getting more into the front end HTML/CSS/JS stack has been a lot of fun. Like other developers diving into JavaScript, my first instinct was to do [...]]]></description>
			<content:encoded><![CDATA[<p>The dominant scripting language of the web is JavaScript. This should not be a controversial statement. Yet, among some Flash Devs, it might be. I still enjoy ActionScript, but getting more into the front end HTML/CSS/JS stack has been a lot of fun.</p>
<p>Like other developers diving into JavaScript, my first instinct was to do things the way I would in the language I know best, in my case AS3. This works for simple stuff, as the two languages are syntactically alike. However, for more complex development, big differences emerge. There&rsquo;s been some smack talk toward the JavaScript language coming from the Flash community, ripping on it for being more like older, primitive versions of ActionScript. I admit that I felt this way at first, but that was before I understood what JS was all about. Ultimately, when compared to AS3, it isn&rsquo;t better or worse, just different.</p>
<p>I don&rsquo;t have a programming background (was an art major), so it took awhile to wrap my head around OOP and the various popular design patterns. Similarly, it took time to appreciate the concepts that are specific to JavaScript. A huge help in this were <a href="http://net.tutsplus.com/tutorials/javascript-ajax/crockford-on-javascript-the-complete-series/" target="_blank">Douglas Crockford’s JavaScript talks</a>. If you want to get into JavaScript, take the time to watch those. Also, I think it almost goes without saying that <a href="http://stackoverflow.com/questions/tagged/javascript" target="_blank">StackOverflow</a> is a tremendous resource for any developer using any programming language, and JS is no exception.</p>
<p><a href="http://net.tutsplus.com/tutorials/javascript-ajax/crockford-on-javascript-the-complete-series/"><img src="http://johnpolacek.com/wp-content/uploads/2011/06/crockford.jpg" alt="" title="crockford" width="475" height="228" class="alignnone size-full wp-image-288" /></a></p>
<p>In ActionScript, you use strictly-typed class structure when building an app. That is not the case with JavaScript. It may be confusing at first when you see JS code that seems to have a class structure, but in reality, there is no class type in JavaScript. It is all about objects and functions. Well, functions are actually objects too, so really, I guess it is all about objects.</p>
<p>The lack of strict typing may seem like a drawback, but it isn&rsquo;t really, if you are doing it right. In Flash, anonymous functions are bad, but in JS they are not just good, they are an essential and powerful feature. One example of this is the module pattern. Understanding this pattern and what it was for, made me <a href="http://stackoverflow.com/questions/2628672/what-should-every-javascript-programmer-know" target="_blank">appreciate JavaScript as a whole</a>.</p>
<p>There are lots of <a href="http://yuiblog.com/blog/2007/06/12/module-pattern/" target="_blank">great explanations of the module pattern</a> out there. Here is an example of what it looks like:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> App <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> privateVar <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;I am a private var.&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> privateMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// do something privately</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> App <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        publicVar <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;I am a public var.&quot;</span><span style="color: #339933;">,</span>
&nbsp;
        init <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
        saySomethingPrivate <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>privateVar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">return</span> App<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>
</p>
<p>If you are primarily a Flasher who has not done much with JS, then that code will probably look all kinds of crazy. Well, that was me a few months ago. Explaining this common, well-understood JS code block and why it is cool to the me from last year would be a difficult task. It was fun figuring it out though.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnpolacek.com/2011/06/17/from-actionscript-to-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

