<?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>uɐɯɹǝʇǝd ʎpuɐɹ &#187; Development</title>
	<atom:link href="http://randypeterman.com/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://randypeterman.com</link>
	<description>Giving You Permission To Be Awesome</description>
	<lastBuildDate>Thu, 10 May 2012 14:13:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta2-20478</generator>
		<item>
		<title>Principles Inform Practices Which Inform Process</title>
		<link>http://randypeterman.com/development/2011/11/principles-inform-practices-which-inform-process</link>
		<comments>http://randypeterman.com/development/2011/11/principles-inform-practices-which-inform-process#comments</comments>
		<pubDate>Sat, 26 Nov 2011 22:03:26 +0000</pubDate>
		<dc:creator>randy peterman</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://randypeterman.com/?p=3244</guid>
		<description><![CDATA[Continuing in my nerdy output of management concepts** I want to highlight an important idea about management processes. Imagine a carpenter who took the blueprints for a house, read them once and then never checked back to make sure that &#8230; <a href="http://randypeterman.com/development/2011/11/principles-inform-practices-which-inform-process">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Continuing in my nerdy output of management concepts** I want to highlight an important idea about management processes.</p>
<div id="attachment_3245" class="wp-caption alignleft" style="width: 310px"><a href="http://randypeterman.com/wp-content/uploads/2011/11/two_by_fours.jpg"><img class="size-medium wp-image-3245 " title="two_by_fours" src="http://randypeterman.com/wp-content/uploads/2011/11/two_by_fours-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Studs in motion</p></div>
<p>Imagine a carpenter who took the blueprints for a house, read them once and then never checked back to make sure that all the details were right.  That carpenter built the whole house and upon completion the inspector showed up to review the first phase of the work.  The inspector would require that <em>all the drywall</em> would need to be ripped out so that the plumbing and electrical and structural work was done properly.   In fact if the foundation wasn&#8217;t properly inspected they may make you tear the whole house down to the foundation.  The mechanisms in place to make sure that the house can be moved into are strict to make sure that people who move into a house are safe and to confirm that the home will meet the minimum requirements of building code.</p>
<p>Final inspection processes are the worst gating mechanisms as far as efficiency is concerned.  Gating mechanisms are used to control bad output/content/products from hitting the public or releasing into production.  This is part of quality control work, which is important.  However, often decisions are made that trump the processes and I&#8217;d like to address that idea here.</p>
<p>Principles are basic assumptions that lead to actions for the individual.  If a company has hired an employee who has either under-developed, compromised, or incorrect principles then the outcome will be under-developed, compromised or incorrect.  This applies to me as much as anyone else as an employee.  I&#8217;ve had bugs in software because I compromised on my principles for the sake of time or in response to perceived pressure and the outcome was compromised [read: bugs in the code].  Instead I needed to work with the discipline and conviction that were the principles I knew.  This would involve test driven development, careful use of the tools that I had, and doing things the &#8216;right&#8217; way.  Software Craftsmanship principles that lead to a quality outcome over and over.</p>
<p>Principles lead to practices &#8211; they&#8217;re things that I do and tell other people about so that when they&#8217;re doing what they do they might consider changing their practices based on the principles I&#8217;ve informed them of.  Maybe they add test driven development to their repertoire.  Maybe they break changes down into better modules of code so as to make it more  testable.  Maybe they teach me a principle so that I can do a better job because my personal craftsmanship toolbox is added to.  In the end the principles lead to best practices that are applied and expected between myself and the community of developers (or team) that I work with.</p>
<p>Processes &#8211; being required/enforced by an outside party (management, C?O&#8217;s, clients) &#8211; should almost appear as an afterthought.  They should be affirmed, but they should never trigger a gating situation.  Internal processes should exist, but should not come up as tests or mechanisms that lead to surprises.  Instead the value of  the process is to confirm that the right principles and the right practices were in place.  You see if the wrong principles and practices are in place then the technicians employing their trade can either figure out a way to bypass them, or they&#8217;ll slow down the whole race to completion of work because they ignored them and the problems weren&#8217;t discovered until the end.  If processes are finding issues then the principles and practices should be addressed first because they are the location of the problem.  You don&#8217;t need more processes, you need quality in the principles and practices of your team.</p>
<p>I&#8217;m learning this about myself the hard way &#8211; so this isn&#8217;t something that I&#8217;ve known all along, it is what I&#8217;ve seen in myself.  More processes will just slow down the final work of your team as they reach a release.  However, if the team is not responsive to education and learning proper craftsmanship principles and embracing practices of maturing craftsmen (and craftswomen) then they&#8217;re not going to be helped by more processes.  They may be a bad fit for your company or project.</p>
<p>Make sure you know the blue prints.  Make sure you know the best way to do things.  And for heavens sake, don&#8217;t let the inspector find your mistakes and make you do the work again &#8211; do it right the first time.</p>
<p>** ignoring that a majority of my readers are family who could probably care less</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/development/2011/11/principles-inform-practices-which-inform-process/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 8, Internet Explorer 10 and Web Developers</title>
		<link>http://randypeterman.com/opinion/2011/09/windows-8-internet-explorer-10-and-web-developers</link>
		<comments>http://randypeterman.com/opinion/2011/09/windows-8-internet-explorer-10-and-web-developers#comments</comments>
		<pubDate>Wed, 14 Sep 2011 03:16:08 +0000</pubDate>
		<dc:creator>randy peterman</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Product (Re)Views]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://randypeterman.com/?p=3184</guid>
		<description><![CDATA[I just got done reading the specs on Internet Explorer 10&#8242;s tablet &#8216;features&#8217; in Windows 8.  This new set of features is incredible on the surface, but as a developer I&#8217;m flabbergasted that Microsoft has decided to ignore the de &#8230; <a href="http://randypeterman.com/opinion/2011/09/windows-8-internet-explorer-10-and-web-developers">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just got done reading the specs on Internet Explorer 10&#8242;s tablet &#8216;features&#8217; in Windows 8.  This new set of features is incredible on the surface, but as a developer I&#8217;m flabbergasted that Microsoft has <a href="http://msdn.microsoft.com/en-us/ie/hh272903.aspx#_DOMTouch">decided to ignore the de facto standards</a> and now has created yet another touch/tablet interaction model.  I&#8217;m not flabbergasted a company would do that, because Apple did it with the iPhone and iPad to create the de facto standard that RIM (disclosure: I work for a subsidiary of RIM) and others have followed.  What this means for developers who are trying to reach the widest possible audience is that their web applications are going to have to choose between:</p>
<ol>
<li>Lots of branches in their code to handle every possible variation of event detection</li>
<li>Send users away</li>
<li>Attempt to use some open source or home rolled equalization library that tries to mask the differences (this way could lie madness)</li>
<li>Give the users a lesser experience</li>
<li>Create multiple versions of the same thing, each with their own special &#8216;per device&#8217; sauce (this way also lies madness).</li>
</ol>
<p>Maybe there&#8217;s another option, but I just don&#8217;t get why Microsoft has done this to devs.</p>
<p>Today <a href="http://www.bdconf.com/">BDConf</a> wrapped up.  It&#8217;s targeted primarily towards mobile development and I had a chance to go to their first event in Grapevine, TX in March.  One of the things that they talked about was writing for an ever changing web audience that accesses your site/web application through any number of devices.  However, this sort of added complexity from a major player in the OS department means that one of two or three things is going to happen, and one of them isn&#8217;t going to be developer buy in.  I&#8217;m convinced that Microsoft is going to have to either adopt some method for giving developers a smaller amount of effort to reach their audience on a Windows 8 tablet, or they&#8217;re going to really hurt their end user experience.</p>
<p>I want to create interactive, 3D-space enabled applications with rich interactions that happen to live in a browser, but Microsoft is definitely not reaching out to developers to create a &#8220;bold&#8221;* new experience in IE10.  They&#8217;re not making it easy for end users to have a great, familiar experience.  If you&#8217;re switching from an iPad 1 or 2 to a Windows 8 tablet you&#8217;re going to get fed up, and move back to the iPad.  If you were to switch from the iPad to the PlayBook you&#8217;d be comfortable.  Microsoft has created a barrier to entry, and this is not a good move.  They&#8217;re distancing themselves from developers, and they&#8217;re distancing their users from rich content.</p>
<p>(update:) Don&#8217;t misunderstand me to think that all of what they&#8217;ve added to IE10 is a move in the wrong direction, but it&#8217;s just not cool that they added a bunch of new HTML5 standards support, and ripped the mobile/tablet market a new hole to support.</p>
<p>* Microsoft employees used the term &#8220;bold&#8221; numerous times during their announcement presentations today and many people in the media and on twitter noted this.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/opinion/2011/09/windows-8-internet-explorer-10-and-web-developers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash: Not as Evil as Bad Coders</title>
		<link>http://randypeterman.com/general/2010/11/flash-not-as-evil-as-bad-coders</link>
		<comments>http://randypeterman.com/general/2010/11/flash-not-as-evil-as-bad-coders#comments</comments>
		<pubDate>Tue, 09 Nov 2010 15:32:38 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=105</guid>
		<description><![CDATA[I&#8217;m tired of the argument that Flash crashes browsers, consumes CPUs (and thus electricity and your laptop battery), and keeps your fan going.  Guess what?  Bad code outside of flash, and in HTML5, can do the same thing!  Open Google &#8230; <a href="http://randypeterman.com/general/2010/11/flash-not-as-evil-as-bad-coders">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m tired of the argument that Flash crashes browsers, consumes CPUs (and thus electricity and your laptop battery), and keeps your fan going.  Guess what?  Bad code outside of flash, and in HTML5, can do the same thing!  Open Google Chrome and launch Twitter, Facebook, and Google Reader and check your resources.  Is Chrome eating up system resources?  You&#8217;ll probably not be surprised to discover that it is.  Advertisers are using Flash and they&#8217;re using it in intensive ways.  Flash by its nature sits as a plugin for most browsers (Chrome actually being an exception) but those browsers and Flash rely on developers doing certain things.</p>
<p>Worse, in HTML5 web workers you can set up a loop that will take a machine to its knees even if it doesn&#8217;t do anything.  I&#8217;d make a demo page, but someone will undoubtedly use it for evil, so just trust me that a bad coder doing bad things can use non-flash things to take down your computer.  I can do it without HTML5, too.  I can probably write bad code in every programming language and probably take down every machine &#8211; because it&#8217;s bad code.  Don&#8217;t blame the messenger [AKA Flash]!  Blame bad coders and people who are using it irresponsibly.   There are bugs, there have been security problems, but Flash is just as vulnerable as the browsers, and even your word processing software (ahem, Office + Macros).</p>
<p>I should also point out: I don&#8217;t code/program in Flash.  I have nothing to gain from Flash being anywhere (except of course when I play Scrabble on Facebook, which I quite enjoy). I just don&#8217;t like it when people point their fingers at one technology or another like has  happened to Flash pointing to the middle of the problem instead of the root.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/general/2010/11/flash-not-as-evil-as-bad-coders/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTML5 *Is* Ready</title>
		<link>http://randypeterman.com/design/2010/10/html5-is-ready</link>
		<comments>http://randypeterman.com/design/2010/10/html5-is-ready#comments</comments>
		<pubDate>Thu, 07 Oct 2010 18:41:42 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=101</guid>
		<description><![CDATA[In what has to be one of the weirdest declarations of 1990&#8242;s Netscape4 vs. IE4 thinking the W3C&#8217;s Philippe Le Hegaret has suggested that we not deplay HTML5 yet in web projects.  I&#8217;m pretty sure that if we wait until &#8230; <a href="http://randypeterman.com/design/2010/10/html5-is-ready">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In what has to be one of the weirdest declarations of 1990&#8242;s Netscape4 vs. IE4 thinking<a href="http://nexus404.com/Blog/2010/10/07/html5-not-ready-for-general-open-web-deployment-says-w3c-html5-suffering-interoperability-issues-w3c-to-implement-api-changes-as-cross-browser-functionality-still-not-perfected/"> the W3C&#8217;s Philippe Le Hegaret has suggested that we not deplay HTML5 yet in web projects</a>.  I&#8217;m pretty sure that if we wait until all the web browsers are ready for HTML5 we&#8217;ll get the go-ahead in 2036, about the time I&#8217;m ready to retire.  Some poor blokes will still be on IE6 with more malware and viruses than Windows ME can deal with and the W3C will be telling us that we should still step into the HTML5 pool with gingerness.  Forget about HTML5 as a stable standard since we have things like <a href="http://html5boilerplate.com">HTML5Boilerplate</a>, and<a href="http://www.communitymx.com/content/article.cfm?cid=8C170"> JavaScript patches</a> as well as things like<a href="http://www.google.com/chromeframe"> Google Chrome Frame</a>.</p>
<p>The idea is not that we should try to implement every fringe, unverified hack and standard, but we&#8217;ve been working with bleeding edge HTML4.1/ECMAscript and de facto browser standards for over a decade.  If that&#8217;s not clear to the W3C then I&#8217;m pretty sure they&#8217;re not prepared for 2011 when every major browser vendor will announce that they&#8217;re HTML5 ready.  Will there be interoperability issues?  Certainly.  Will there be hacks to get around them?  There already are!</p>
<p>HTML5 is a great concept and I think it will be the de facto standard moving forward from 2011 further.  I&#8217;m going to be updating all of my blogs to use HTML5 as time allows.  HTML5 will save money (working on a blog post for that) for companies that deplay the markup, ISPs who have to have provide bandwidth, and save time for end users who do almost nothing but upgrade their browsers to HTML5 ready versions and get the benefit.</p>
<p>One of the problems that made the HTML4/Netscape 4/IE4 wars so difficult was that bandwidth was scarce and unless AOL shipped yet another CD to your house with IE (5 or 6) on it, upgrading could take so long that your grandma&#8217;s call on the dial-up connection could be blocked.  However, with DSL and various other broadband mechanisms in place on top of auto-updating browsers the cost of the upgrade is minimal at best.  HTML5 is not the future, it&#8217;s the present.  Google pushed Google Wave as HTML5 goodness May 27th 2009 as a presently capable, functional application.  That means that very large corporations reaching millions of users have been using HTML5, even if it required a sub-set of browsers, for a hear and a half.  That means that my iPhone, my BlackBerry, my Droid and an array of other devices running Webkit <em>and</em> my desktop browser are all generally HTML5 capable.</p>
<p>I believe we can use HTML5, even if we don&#8217;t get to use it every single day for every possible feature it could provide if cross-browser perfection were achieved.  It&#8217;s ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/design/2010/10/html5-is-ready/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design &amp; Development Links</title>
		<link>http://randypeterman.com/links/2010/10/design-development-links</link>
		<comments>http://randypeterman.com/links/2010/10/design-development-links#comments</comments>
		<pubDate>Thu, 07 Oct 2010 04:05:29 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Software Craftsmanship]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=97</guid>
		<description><![CDATA[Along the line of software craftsmanship on the web here are some handy sites I&#8217;ve seen recently: JS Patterns JS Patterns is a site dedicated to the design and development patterns that are not only industry standards, but also patterns &#8230; <a href="http://randypeterman.com/links/2010/10/design-development-links">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Along the line of software craftsmanship on the web here are some handy sites I&#8217;ve seen recently:</p>
<dl>
<dt><a href="http://www.jspatterns.com/">JS Patterns</a></dt>
<dd>JS Patterns is a site dedicated to the design and development patterns that are not only industry standards, but also patterns that are native to JavaScript (which C++ or Java cannot do natively).  This is definitely worth adding to your RSS feed reader.</dd>
<dt><a href="http://www.dustindiaz.com/">Dustin Diaz</a></dt>
<dd>Dustin happens to work at Twitter, but his site is loaded with good JavaScript tips.  If you&#8217;re not following his writing I&#8217;d suggest you consider doing so.</dd>
<dt><a href="http://github.com/blackberry/WebWorks">BlackBerry WebWorks</a></dt>
<dd> The WebWorks development/widget framework for BlackBerry devices looks interesting [disclosure: I work for a RIM subsidiary and have nothing to do with this project].  Download the toolkit from github or from RIM&#8217;s site and check it out.  It&#8217;s focused on giving web developers a web-focused interface to develop for the webkit based smartphones. </dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/links/2010/10/design-development-links/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toolkits, Frameworks, and Libraries, Oh My!</title>
		<link>http://randypeterman.com/development/javascript/2010/10/toolkits-frameworks-and-libraries-oh-my</link>
		<comments>http://randypeterman.com/development/javascript/2010/10/toolkits-frameworks-and-libraries-oh-my#comments</comments>
		<pubDate>Wed, 06 Oct 2010 03:41:02 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=91</guid>
		<description><![CDATA[On Monday the 4th of October Chris Coyier of CSS Tricks wrote on Twitter: What they call themselves: jQuery = Library YUI = Library ExtJS = Library MooTools = Framework Prototype = Framework Dojo = Toolkit [cite] I just got &#8230; <a href="http://randypeterman.com/development/javascript/2010/10/toolkits-frameworks-and-libraries-oh-my">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On Monday the 4th of October Chris Coyier of <a href="http://css-tricks.com/"><acronym title="Cascading StyleSheet">CSS</acronym> Tricks</a> wrote on Twitter:</p>
<blockquote><p>What they call themselves: jQuery = Library YUI = Library ExtJS = Library MooTools = Framework Prototype = Framework Dojo = Toolkit [<a href="http://twitter.com/#!/chriscoyier/status/26389339842">cite</a>]</p>
<p>I just got some crap for &#8220;not knowing the difference&#8221; &#8211; which I don&#8217;t. It&#8217;s just semantics (literally) as far as I know. [<a href="http://twitter.com/#!/chriscoyier/status/26389778686">cite</a>]</p></blockquote>
<p>While I think it&#8217;s absolutely bad form for people to attack him on his use of those terms synonymously, it connected two apparently opposite ideas in my mind.  It resonated with some ideas I had about a debate that&#8217;s been going on in the last few months since Rebecca Murphey suggested that jQuery was not up to the task of being used as a framework in a browser based web application [<a href="http://blog.rebeccamurphey.com/on-jquery-large-applications">cite</a>].  Then there&#8217;s the jQuery forum discussion of adding <a href="http://www.javascriptmvc.com">JavaScriptMVC </a>as an enterprise branch of the jQuery project [<a href="https://forum.jquery.com/topic/a-modest-proposal-jquery-enterprise">cite</a>].  But here&#8217;s the big &#8220;revolutionary&#8221; idea: jQuery is just a library.  It is <em>not</em> a framework.  It goes well beyond a simple toolkit, but it is an excellent library.</p>
<p>Now, let&#8217;s get down to brass tacks.  In the first 10 years of web development there was a lack of craftsmanship and instead a lot of do it yourself or self-directed education by the community as we all learned the emerging web technologies.  I learned my first bits of HTML from HTML Goodies.  I then spent time on other sites and read a few JavaScript for Dummies type books when I got started over a decade ago.  Terms like Library, Toolkit and Framework were never discussed.  However, from an academic level these terms imply things about the code&#8217;s purpose and therefore are a critical part of the discussion.</p>
<dl>
<dt>Toolkit</dt>
<dd>A toolkit is a combination of classes or functions that do not define or limit the design of an application.  A toolkit may have a small handful of functions that allow you to do rollover events (see also: Dreamweaver&#8217;s JavaScript tricks).</dd>
<dt>Library</dt>
<dd>A library is a collection of classes or functions designed specifically to interface with one particular complex task.  Examples of a library might be an image manipulation library or a canvas manipulation library.  jQuery is a library because it was fundamentally a DOM manipulation library.</dd>
<dt>Framework</dt>
<dd>A framework is a collection of classes or functions designed to implement a certain pattern for a specific class of software.  A framework is for specific domains or types of applications such as web applications.  JavaScriptMVC is a framework for developing Model-View-Controller based web interfaces.</dd>
</dl>
<p>Did you see what I did there?  I just diffused a bomb.  OK, not really.  Rebecca Murphey&#8217;s direct problem with jQuery (and she has stated this) is not that it is a bad library, it is that<em> it is not a complete framework</em>.  That&#8217;s OK, because John and the rest of the jQuery developers have not been trying to make a framework.  John Resig doesn&#8217;t want an MVC framework as a direct branch of the jQuery library because JavaScriptMVC goes well beyond the purpose of the jQuery library.  However, the work done to build JavaScriptMVC as a framework that uses the jQuery library is really, really cool and powerful.</p>
<p>Across the spread of the web horizon lies the Dojo toolkit, which has expanded beyond just being a toolkit and really has taken on a multi-tiered approach: it has a toolkit presentation due to its name, but it really is a library (for the DOM like jQuery), but it also has a framework for creating MVC styled applications and taking on the details of a larger built application (See the <a href="http://www.skynet.ie/~sos/dojobuilder/main.php">Dojo Builder for Eclipse</a> or the <a href="http://www.sitepen.com/blog/2008/07/08/dojo-toolbox-first-look/">dojo toolbox</a>).  The purpose of the build tools is to allow you to compile the appropriate libraries from within the larger Dojo framework into a final, smaller file (or files) for inclusion in your project.</p>
<p>So fundamentally you need to ask yourself what your project needs: does it need a toolkit?  I would suggest it just might given that there may only be a handful of tasks that you really need to accomplish.  Does it need a library?  If there is very much DOM manipulation you should evaluate the various libraries and confirm that one of them meets your needs (or has the smallest learning curve, or whatever specifications you have) .  Does it need a framework?  Are you making a website or a web application?  If you&#8217;re making a web application you probably need a server side framework such as <a href="http://cakephp.org/">CakePHP</a> or <a href="http://rubyonrails.org/">Ruby on Rails</a>.  You probably want to consider what client side framework you&#8217;ll need.  Having rolled my own I can confidently say that rolling your own won&#8217;t kill you, but you should absolutely consider the frameworks that do exist because it could save you time and be very extensible in the future when your project goes for another iteration that needs more meat.</p>
<p>This hasn&#8217;t been a journey down the yellow brick road to the emerald city, but whether you see lions, toolkits, or bears be aware that the terms do have a technical implication and your use of them may help clear up confusion.  And it could help you in that next interview when the project lead asks you if you prefer to use one religious war starting technology over another more holy religious war starting technology <img src='http://randypeterman.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   I&#8217;m going to stick with using my new favorite library: <a href="http://vaporjs.com/">vapor.js</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/development/javascript/2010/10/toolkits-frameworks-and-libraries-oh-my/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaScript/ECMAScript Closures Up Close and Personal</title>
		<link>http://randypeterman.com/development/2010/07/javascriptecmascript-closures-up-close-and-personal</link>
		<comments>http://randypeterman.com/development/2010/07/javascriptecmascript-closures-up-close-and-personal#comments</comments>
		<pubDate>Mon, 19 Jul 2010 19:03:58 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=71</guid>
		<description><![CDATA[One of the most important tricks an ECMAScript coder can learn is how to properly create &#8216;object&#8217; with prototypes.  A second-place runner up is the use of closures.  Closures come from JavaScript&#8217;s secret roots in Scheme.  They&#8217;re a technique for &#8230; <a href="http://randypeterman.com/development/2010/07/javascriptecmascript-closures-up-close-and-personal">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the most important tricks an ECMAScript coder can learn is how to properly create &#8216;object&#8217; with prototypes.  A second-place runner up is the use of closures.  Closures come from JavaScript&#8217;s secret roots in Scheme.  They&#8217;re a technique for letting scope &#8216;linger&#8217; around for functions that are called within a function.  I looked for tutorials on closures but couldn&#8217;t find any immediately that didn&#8217;t basically alert someone&#8217;s name, which just doesn&#8217;t seem very practical to me.  Alerting your name is the boring cousin of &#8220;Hello, World.&#8221;  So let&#8217;s look at a practical problem with a need for a solution.  Let&#8217;s say that you have a prototypical object that happens to enhance HTML links that the user can interact with. Since you&#8217;re doing progressive enhancements the link will work as expected on browsers that don&#8217;t have JavaScript enabled, but for those spiffy browsers that are progressive (not a political statement), you&#8217;re going to attach an onClick event.  I&#8217;m lazy so the examples below are going to use jQuery event attachment, but longer-form addEventListener, which is wonderful and will make your life more fulfilling.</p>
<p>So when you click on this link you want it to be able to refer to your object so that you can work nicely with other libraries or have multiple instances of the object on the page.  The hacky ways to do this might have included adding attributes to the HTML object, doing some sort of global object lookup, or any number of other things <em>I did</em> when I didn&#8217;t understand closures.  But here&#8217;s what you&#8217;re going to do:<br />
<code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Never Gonna Give You Up, Closures!&lt;/title&gt;<br />
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;<br />
&lt;script&gt;<br />
function MakeItCloserWithClosures()<br />
{<br />
/**<br />
Assigning a variable 'that' to have the value of 'this' creates a reference that maintains scope through closure, so sub-functions/lambdas, can reference that as a variable that is in scope to call functions withint this object<br />
*/<br />
var that = this;<br />
$('.makeMeClosureFriendly').click(function(){that.rickRollTheUser();return false;});<br />
}<br />
MakeItCloserWithClosures.prototype.rickRollTheUser = function(){<br />
document.location.href = 'http://www.youtube.com/watch?v=3HrSN7176XI';<br />
};<br />
/* use jQuery's ready function to initialize the object, which should attach it to the HTML objects. */<br />
$(document).ready(function(){ new MakeItCloserWithClosures(); });<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;a class="makeMeClosureFriendly" href="http://www.digg.com/closures-are-easy"&gt;<br />
Closures are easy!<br />
&lt;/a&gt;<br />
&lt;body&gt;<br />
&lt;html&gt;</code></p>
<p>There are a number of possible issues with the above code as far as scope is concerned: 1) the new object is not assigned to a variable for future reference (which we&#8217;ll pretend is awesome and the best idea ever), and 2) since it isn&#8217;t assigned there&#8217;s no global variable that we could attach to inside of the click event handler (function).  Except that with closures we can use the code&#8217;s reference to &#8216;that&#8217; and it will refer back to the originating object and Rick Roll the user.  Closures are the best for handling references back to an object that needs to touch code, but not be global in scope or concern itself with as much interaction with other libraries.</p>
<p>I like to think of closures as &#8216;scope tunnels&#8217; that can linger on for some time as long as the objects that reference them still exist.  In complex web applications being able to reference back to a parent object can save lines of code, confusion and can help call functions that are aware of other variables, details, and settings that exist within a JavaScript/ECMAScript object.  Fewer lines of code to debug is a big win, and fewer lines of code to maintain is even better.  I hope this helps!</p>
<p>Where will you use closures today?  <a href="http://design.randypeterman.com/closures/">See the demo to get Rick Rolled</a>.  Please leave questions in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/development/2010/07/javascriptecmascript-closures-up-close-and-personal/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Workers: No JQuery</title>
		<link>http://randypeterman.com/development/2010/06/web-workers-no-jquery</link>
		<comments>http://randypeterman.com/development/2010/06/web-workers-no-jquery#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:49:28 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=67</guid>
		<description><![CDATA[At present JQuery, the popular library for web development, is not capable of sitting inside of a Web Worker instance.  It probably isn&#8217;t a huge deal for most folks, but there might be cases where the JQuery syntax or utility &#8230; <a href="http://randypeterman.com/development/2010/06/web-workers-no-jquery">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At present <a href="http://jquery.com">JQuery</a>, the popular library for web development, is not capable of sitting inside of a Web Worker instance.  It probably isn&#8217;t a huge deal for most folks, but there might be cases where the JQuery syntax or utility functions would have been nice.  AJAX can still be handled in the traditional ways (and all browsers supporting Web Workers can use the proper JavaScript object and not the old IE Active-X hack).  And since it&#8217;s basically a background thread you can even use synchronous AJAX <img src='http://randypeterman.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>JQuery may get a new implementation or a sub-library that can handle being in a thread, but for now, don&#8217;t count on it inside web workers.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/development/2010/06/web-workers-no-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Your JavaScript Should be Compressed with the YUI Compressor</title>
		<link>http://randypeterman.com/links/2009/08/why-your-javascript-should-be-compressed-with-the-yui-compressor</link>
		<comments>http://randypeterman.com/links/2009/08/why-your-javascript-should-be-compressed-with-the-yui-compressor#comments</comments>
		<pubDate>Sat, 15 Aug 2009 21:13:16 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=55</guid>
		<description><![CDATA[Yesterday I listened to Scott Hanselman and Jeff Atwood discussing Website Optimization on Hanselminutes and Scott asked Jeff why external JavaScript files should be compressed for speed and performance of web sites and web applications.  One thing that Jeff didn&#8217;t &#8230; <a href="http://randypeterman.com/links/2009/08/why-your-javascript-should-be-compressed-with-the-yui-compressor">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I listened to <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> and <a href="http://www.codinghorror.com/blog/">Jeff Atwood</a> discussing <a href="http://www.hanselminutes.com/default.aspx?showID=193">Website Optimization on Hanselminutes</a> and Scott asked Jeff why external JavaScript files should be compressed for speed and performance of web sites and web applications.  One thing that Jeff didn&#8217;t answer with that I think is worth noting is that <a href="http://developer.yahoo.com/yui/compressor/">the YUI compressor</a> that Jeff uses &#8211; and which I use &#8211; happens to have the Java-based Rhino JavaScript engine in it.  The YUI compressor basically reads in your JavaScript file, parses it with a JavaScript engine and then outputs optimized code that will allow (almost?) all JavaScript engines in different browsers to parse and execute your JavaScript code faster than it would have had you not run the code through the YUI compressor.  Here are a few tidbits explained:</p>
<ul>
<li>The YUI compressor doesn&#8217;t require you to pre-validate your code with tools like <a href="http://www.jslint.com">JSlint</a>, which are nice, but not very friendly for beginner or pressed-for-time developers.  The JSlint site puts it well: JSLint will hurt your feelings.  I can deal with some hurt feelings myself, but managing browser quirks like IE&#8217;s inconsistent handling of &#8216;==&#8217; verses &#8216;===&#8217; means JSLint isn&#8217;t as handy as it could be for large files with lots of comparison operations.  I like well written code.  No.  I love well written code.  Not all code shoppes have time for syntax evaluation &#8211; if it works they&#8217;ll ship it &#8211; and YUI Compressor works great for this situation.  You can use the &#8216;-v&#8217; parameter when executing the compressor at the command prompt to have it output any hints or suggestions for better syntax or potential errors.</li>
<li>The compressor optimizes functions and classes by managing variable instantiation and reducing the number of places in the code where this sort of memory allocation has to happen so that the beginning of the function contains all variable instantiations and your code can then execute without extra overhead for inline instantiations (especially if someone made the bonehead move of instantiating a variable in a loop!).</li>
<li>The compressor creates files that have no comments in them so JavaScript parsers  can parse a file that has been parsed and then output by a parser in <em>parser optimized form</em>.  The output code has a whole lot less fluff and generally looks like what a parser would hope a file would look like.  To make a comparison that would be like me taking my thoughts, putting them into a brain just like yours, having that brain output the words perfectly so that you could read them and understand them without any questions and the fewest number of possible words.  Its a JavaScript communications breakthrough.</li>
<li>The YUI Compressor can also be integrated with a build script so that your build engine (such as Ant or Nant) could automate the creation of the compressed or optimized files.</li>
</ul>
<p>I have personally found the YUI Compressor to be invaluable and it has helped improve the loading time of the web applications that I work on substantially.  Being able to tell users (and the sales channel) that the slower loading web application has been improved to load 27% less data (while adding features) almost two years ago was a major win.  Watching their faces as I demonstrated how much faster the code was was icing on the cake.</p>
<p>Does everyone need to use the YUI compressor for every project?  Maybe not.  But I believe that it is probably the best tool available at this time to help professional web application developers to squeeze out that extra bit of performance without hand-tweaking code that could otherwise be thousands of lines of code to evaluate.  I have more performance optimizations I will find, I&#8217;m sure, but using YUI Compressor is a no-brainer and I hope you&#8217;ll find it gives you peace of mind and mind blowing performance improvements when it comes to file download sizes and speeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/links/2009/08/why-your-javascript-should-be-compressed-with-the-yui-compressor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Few Links Around the Web</title>
		<link>http://randypeterman.com/development/2009/07/a-few-links-around-the-web</link>
		<comments>http://randypeterman.com/development/2009/07/a-few-links-around-the-web#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:07:57 +0000</pubDate>
		<dc:creator>Randy Peterman</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://design.randypeterman.com/?p=50</guid>
		<description><![CDATA[I&#8217;m a huge fan of learning new things (and I like to think that you are, too): My buddy Dave O&#8217;Hara sent me this link: 7 Rules of Unobtusive JavaScript. A good overview of why you should be coding unobtrusively &#8230; <a href="http://randypeterman.com/development/2009/07/a-few-links-around-the-web">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of learning new things (and I like to think that you are, too):</p>
<p>My buddy Dave O&#8217;Hara sent me this link: <a href="http://icant.co.uk/articles/seven-rules-of-unobtrusive-javascript/">7 Rules of Unobtusive JavaScript</a>. A good overview of why you should be coding unobtrusively (which I do in as many cases as possible) and also explains some good things about namespacing and object access.</p>
<p>I&#8217;m trying to learn about TDD and JavaScript which has been a bit harder than I expected: we need more of this in the JavaScript community!  Here&#8217;s a bit over at the Ajaxian on <a href="http://ajaxian.com/archives/tdd-and-javascript-with-jsmock">doing TDD with JsMock</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://randypeterman.com/development/2009/07/a-few-links-around-the-web/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

