<?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>Kirsten Jahn on Design &#38; Life &#187; javascript</title>
	<atom:link href="http://www.kirstenjahn.com/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kirstenjahn.com/blog</link>
	<description>A design &#38; life blog.</description>
	<lastBuildDate>Wed, 24 Nov 2010 22:00:04 +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>MIX10: Jason Weber&#8217;s High-Performance Best Practices for Web Sites</title>
		<link>http://www.kirstenjahn.com/blog/2010/04/mix10-jason-webers-high-performance-best-practices-for-web-sites/</link>
		<comments>http://www.kirstenjahn.com/blog/2010/04/mix10-jason-webers-high-performance-best-practices-for-web-sites/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:42:31 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Design Talk]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.kirstenjahn.com/blog/?p=244</guid>
		<description><![CDATA[During a long car trip to Buffalo, NY I decided to enrich myself by watching a few videos having to do with the field of web design. Here are my notes on Jason Weber&#8217;s presentation on High-Performance Best Practices for &#8230; <a href="http://www.kirstenjahn.com/blog/2010/04/mix10-jason-webers-high-performance-best-practices-for-web-sites/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-255" title="screen-shot-2010-04-05-at-110524-am" src="http://www.kirstenjahn.com/blog/wp-content/uploads/2010/04/screen-shot-2010-04-05-at-110524-am-300x188.png" alt="screen-shot-2010-04-05-at-110524-am" width="300" height="188" />During a long car trip to Buffalo, NY I decided to enrich myself by watching a few videos having to do with the field of web design. Here are my notes on Jason Weber&#8217;s presentation on High-Performance Best Practices for Web Sites. Below are his &#8220;20&#8243; best practices for performance:</p>
<h3>NETWORKING</h3>
<ol>
<li> Compress files downloads.<br />
Utilize gzip encoding when making http requests and responding to those requests. Don&#8217;t do it on images! They&#8217;re already compressed.</li>
<li> Provide cache-able content.<br />
Set an expiration date on your responses so the server doesn&#8217;t have to pull it down again.</li>
<li> Use conditional requests.<br />
Only pull content if it was last modified since a certain date. Include the modification date in the response.</li>
<li> Minify your Javascript.<br />
Removes extra spaces and returns, replaces variables with single characters, can make your Javascript be 25% of its original size.</li>
<li> Do not scale images.<br />
Requires less CPU time for the browser to display the image. Sending more data than what is needed slows down the download process.</li>
<li> Use image sprites! <img src='http://www.kirstenjahn.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Keeps network requests down.</li>
</ol>
<p><span id="more-244"></span></p>
<h3>HTML</h3>
<ol>
<li> Link Javascript to the bottom of your page.Inline Javascript slows down your page load in older browsers b/c older browsers need to execute that code right away.<br />
Don&#8217;t ever link to a script file in the head of your page. In older browsers they will go ahead and load that Javascript before the page is even done loading. Link your Javascript at the end of the file instead.</li>
<li> Add a defer tag when you must link Javascript at the top of the page.You can also use the defer tag in the script tag if you must put your Javascript in the head part of your page. This defers the loading of the Javascript until the entire HTML page has been rendered (supported since IE4, don&#8217;t know about FF).</li>
</ol>
<h3>CSS</h3>
<ol>
<li> Link the CSS in the head of your file, unlike the Javascript best practice.Don&#8217;t want any &#8220;flashes of unstyled content.&#8221; Avoid embedded styles; can slow down loading of webpages.</li>
<li> Avoid using the @import for CSS files as it slows down the browser.The browser tries to download all of those imported files so it can properly render the cascade and thus takes longer.</li>
</ol>
<h3>COLLECTIONS</h3>
<ol>
<li> He didn&#8217;t really address anything under this topic.</li>
</ol>
<h3>JAVASCRIPT</h3>
<ol>
<li> Minimize symbol resolution (walking up the lookup chain).To resolve a variable value there are 3 places Javascript looks:Local &gt; Intermediate Scopes &gt; GlobalThe higher up it must go to get the value the more performance cost.Objects work in the same way:Instance &gt; Prototype Chain &gt; DOMIf you don&#8217;t declare the variable using var = its scope is global and costs you performance. If you use var = you scope it to be a local variable.
<p>Works the same way with functions too.</li>
<li> Use native methods.To parse JSON you can use the native parse or stringify that&#8217;s native to the browser (possibly only IE8 though&#8230;?).</li>
<li> Remove duplicate script files.</li>
<li> Minimize the amount of Javascript frameworks you use on a page.</li>
</ol>
<h3>MARSHALLING</h3>
<ol>
<li> Minimize the amount of DOM interactions that you make from Javascript.Each time the Javascript engine has to communicate with the DOM it costs you a little bit more.<br />
Cache your DOM lookups in a variable, e.g. var elms = document.body.all;</li>
</ol>
<h3>DOM</h3>
<ol>
<li> Built in methods are always more effecient than trying to roll something yourself.Instead of nodes[i] to iterate through just use the DOM API node.nextSibling; to iterate through that collection; minimizes calls to the DOM.</li>
<li> Use the selectors API for effecient access to collections (IE8+ only).</li>
</ol>
<h3>FORMATTING</h3>
<ol>
<li> Only send the required styles for that page.(Doesn&#8217;t this go against the whole cacheing of your stylesheet as an advantage while surfing through your site?)</li>
<li> When possible, use class or id based selectors over element selectors.Make element selectors as simple as possible and use child or descendent selectors when able.</li>
</ol>
<h3>BLOCK BUILDING, LAYOUT, RENDERING</h3>
<ol>
<li> Batch visual changes.Don&#8217;t allow your user to see every change you make to the page until you&#8217;re done. Put all changes in a variable and then change the page.</li>
</ol>
<p>At the end of Mr. Weber&#8217;s presentation he hit briefly on the new features of IE9. Below are my notes on this topic:</p>
<ul>
<li> Hardware accelerated HTML 5</li>
<li> Compiled Javascript (into native machine code to be executed rather than interpreting non-native machine code)</li>
<li> GPU powered HTML5 graphics</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kirstenjahn.com/blog/2010/04/mix10-jason-webers-high-performance-best-practices-for-web-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Event Apart San Francisco Recap</title>
		<link>http://www.kirstenjahn.com/blog/2010/01/an-event-apart-san-francisco-recap/</link>
		<comments>http://www.kirstenjahn.com/blog/2010/01/an-event-apart-san-francisco-recap/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:11:44 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[Design Talk]]></category>
		<category><![CDATA[an event apart]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[san francisco]]></category>
		<category><![CDATA[seminar]]></category>

		<guid isPermaLink="false">http://www.kirstenjahn.com/blog/?p=195</guid>
		<description><![CDATA[Last month I had the privilege of being able to travel to San Francisco for An Event Apart. Besides the unruly flights (with connections in Atlanta) and the overall dreary weather of San Francisco (thanks rain and sleet!), it was &#8230; <a href="http://www.kirstenjahn.com/blog/2010/01/an-event-apart-san-francisco-recap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin: 5px 15px 5px 0;" title="aea-logo" src="http://www.kirstenjahn.com/blog/wp-content/uploads/2010/01/aea-logo.gif" alt="aea-logo" width="156" height="221" />Last month I had the privilege of being able to travel to San Francisco for <em>An Event Apart</em>. Besides the unruly flights (with connections in Atlanta) and the overall dreary weather of San Francisco (thanks rain and sleet!), it was a fantastic time.</p>
<p>This was my first <em>An Event Apart</em> and I was particularly struck by a few things.</p>
<p>First, mostly all of the seminars offered directly related to my work and career. There was no picking of what classes you wanted to take, but rather, you sat in one room all day and the presenters came to you.</p>
<p>Second, it was a <strong>well planned event</strong>. There were 15 minute breaks between seminars, ample time to hit the restroom or schedule your dentist appointment back home (yep, I did that), and each day was just long enough. Monday&#8217;s classes ran from 9 am to 6:15 pm and Tuesday&#8217;s classes ran from 8:15 am to 5:30 pm (although many would tell you that Tuesday&#8217;s 8:15 am was optional since it was a Microsoft presentation, <img src='http://www.kirstenjahn.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). Lunches were 1.5 hours long and were great opportunities to have a leisurely lunch and get to know other conference attendees.</p>
<p>Thirdly, the <strong>food was fantastic</strong>! Fully catered breakfasts and lunches made me feel important and eliminated the stress of &#8220;Where is my next meal?!&#8221;.</p>
<p>And finally, all of the presenters were just really cool. Most of them walked around the ballroom and hallways during breaks, talking to various attendees, and shaking people&#8217;s hands. They were all really nice people and easily approachable. It was nice to know that I was amongst such down to earth people.</p>
<p>There were quite a few presentations that stuck out in my mind. The following is my attempt to document the knowledge I picked up at this conference.</p>
<p><span id="more-195"></span></p>
<h2>Jeffrey Zeldman&#8217;s <em>A Site Redesign</em></h2>
<p>Once the initial shock of actually seeing Jeffrey Zeldman in front of me wore off I was eventually enthralled by his presentation. Zeldman spoke of two situations in which a site redesign may occur: the client, or, in-house approach and the homegrown when-the-client-is-you approach.</p>
<h3>Client-based Redesign</h3>
<p>A client-based redesign starts with the following question: &#8220;What problem are we trying to solve?&#8221;. At this point Zeldman spoke of how in-house designers are treated in various companies. He stressed that, as a designer, sometimes we are not quite treated as <strong>&#8220;grownups at the table&#8221;</strong> and that all we&#8217;re good for is &#8220;decoration&#8221; and sprinkling on some pixie dust. He emphasized that design is about creating a user experience and that in order to receive some credibility in your company you should become involved in a project as early as possible to understand the business objectives behind it. Research is one way in which you can establish yourself as a <strong>credible partner</strong> within the scope of the project.</p>
<p>One point that Zeldman made that I felt was particularly amusing was when he said that &#8220;designers and their bosses should not be having conversations about fonts, color, or design,&#8221; but rather, they should be &#8220;having conversations about products.&#8221; Why did I find this so amusing? Because I feel that conversing about fonts, color, and design is the bulk of what my conversations are about. Whether its at my full-time job or in my freelance, someone always has to question my color or font choice. It can drive a designer batty, especially when the client (whether in-house or freelance) thinks they know more about font X or color Y than you. But I digress&#8230; Ultimately designers need to be seen as strategic partners and not pigeon-holed as &#8220;the person that makes things pretty.&#8221;</p>
<p><strong>Components of a Site Redesign</strong></p>
<p>Initial components of a site redesign include: no-holds-barred brainstorming, scenarios, wireframing, and content strategy.</p>
<p><strong>Brainstorming</strong> with a client or in-house can help put you in a better position later down the road. It is a proven psychological phenomenon that if you talk to someone about their needs and deliver a product that is perceived as meeting those needs then the client will be more likely to buy in to your work. As the designer, you should be engaging people from the very first meeting so that they perceive you as an ally.</p>
<p><strong>Scenarios</strong> were a concept that up until <em>An Event Apart</em> must have been residing deep in my brain. I had never heard of them before but, once explained, I remember vaguely learning about them in a past life. It goes like this: pick a few types of users that you think will visit your site. Set up a document that outlines the specific goals that each one of these types of users may try to achieve while on your web site. Then, document the process that it would take for them to achieve these goals on your site. These users should be developed into full personas with names and life details.</p>
<p>To do the <strong>right</strong> design, Zeldman emphasized the importance of having a <strong>content strategy</strong>. Apparently this label &#8220;content strategy&#8221; has been a big idea this year but I feel like I&#8217;ve been trying to push it all my life. Basically, everything about a design should be based on the content that is going to be presented. Designers cannot, and should not, have to pull designs out of thin air without having content provided. Period.</p>
<p><strong>Speaking with Clients</strong></p>
<p>Zeldman offered many helpful tips when talking with people about design and your work.</p>
<p>First of all, Zeldman demonstrated his idea of <strong>breadcrumbing a conversation</strong>. When speaking with a client about your work or upcoming plans, be sure to keep repeating where you&#8217;ve been in the conversation. That way you&#8217;ll both be on the same page and will be able to recap what occurred during your conversation when it eventually comes to an end. Oftentimes, visual people think things are blindingly obvious and it is our job to make sure that others see the blindingly obvious.</p>
<p>Secondly, sometimes clients try to get at what they want indirectly. You must learn to <strong>read between the lines</strong> of a conversation and interpret what their actual problem is.</p>
<p>Finally, you as the designer definitely do not want to start any conversations about pixels, fonts, colors, and layout.  If you start to talk about them then the client will want to change them. Instead, try to <strong>gear your conversations towards tactical problem solving measures</strong>. Your job is to sell ideas, not pixels. If a client questions a particular item try to relate it back to the demographic that is actually going to be using the site. Every question posed by the client should be answered with some sort of user-, research-, or problem-centric point.</p>
<h3>Homegrown Redesign</h3>
<p>The first thing to do when starting to work on your own web site is to do a <strong>&#8220;competitive audit,&#8221;</strong> or as we designers like to say, looking for &#8220;inspiration.&#8221; What is going on in the web world today and what are other sites in your field doing?</p>
<p>From this point on Zeldman began to use his own site, <a href="http://www.zeldman.com" target="_blank">zeldman.com</a>, as his example of a homegrown site.</p>
<p>The question you must ask yourself when starting to design is, &#8220;What problem are we trying to solve,&#8221; or, &#8220;What are we trying to achieve with this web site?&#8221;. People have many reasons for starting their own web site: portfolio sites, discussion/blogging sites, etc.</p>
<p>Whatever site you choose to design though, should always invite <strong>reading</strong>. And whenever reading is involved, wide pages are not the way to go.</p>
<p>As with the client-based redesign strategy, <strong>all design should start with the content</strong>. In the case of Zeldman, he did a pure text dump into a .html page and started to immediately style his content; he calls it &#8220;design from the content out.&#8221;</p>
<p>One interesting tidbit I picked up from this presentation was the use of a <strong>grid background gif</strong>. Grid-based design can be made even easier by simply applying a grid background to your entire site. This way you can see exactly where your columns are lining up and won&#8217;t have to rely as much on the accuracy of your math. Zeldman was quick to mention though that you do not need to be a slave to your grid and that introducing a little asymmetric white space never hurt anyone.</p>
<p>Your own site is also a perfect environment for introducing some <strong>progressive enhancement</strong>. Sure, throw all of the CSS3 you can at your site &#8211; just make sure its still functional in those oldy moldy browsers as well. Details may not matter as much to you in all browsers as they would to a client so be adventurous.</p>
<p>And finally, Zeldman pushed the idea that contrary to major belief, <strong>there is no fold</strong>. Studies have shown that most people do scroll on a web site so the concept of putting things above the fold is not nearly as important as it has been in the past. In particular, Zeldman was demonstrating his site&#8217;s large footer that has become particularly popular as of late.</p>
<p><strong>In Conclusion</strong></p>
<p>I found Jeffrey Zeldman to be a dynamic speaker with a great sense of humor. He has wonderful insights into the various problems that all designers face on a daily basis and can offer useful tips on how to handle said problems. I would recommend that anyone go and hear him speak.</p>
<p>I wanted to write more than this but I simply wrote so much about Zeldman and I haven&#8217;t had time to write about the other speakers. Ack! When I have time I will follow this post up with more!</p>
<p><!--</p>
<h2>Ethan Marcotte&#8217;s <i>A Dao of Flexibility</i></h2>
<h2>Dave Shea&#8217;s <i>They’re Letting Designers Code Now?</i></h2>
<h2>Andy Budd&#8217;s <i>Seductive Design</i></h2>
<h2>Sarah B. Nelson&#8217;s <i>10 Secrets from a UX Design Strategist’s Toolbox</i></h2>
<h2>Jared Spool&#8217;s <i>Revealing Design Treasures from The Amazon</i></h2>
<h2>Julie Zhuo&#8217;s <i>Design Lessons From 300 Million</i></h2>
<h2>Pete LePage&#8217;s <i>Using Internet Explorer 8 &amp; Other Tools To Create The Modern Web</i></h2>
<h2>Eric Meyer&#8217;s <i>JavaScript Will Save Us All</i></h2>
<h2>Jonathan Snook&#8217;s <i>Integrating JavaScript Effectively</i></h2>
<h2>Nicole Sullivan&#8217;s <i>Object Oriented CSS</i></h2>
<h2>Luke Wroblewski&#8217;s <i>Web Form Design in Action</i></h2>
<h2>Mike Migurski&#8217;s <i>Mapping A Web Of Data</i></h2>
<h2>Jeff Veen&#8217;s <i>How the Web Works</i></h2>
<p>&#8211;></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirstenjahn.com/blog/2010/01/an-event-apart-san-francisco-recap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Basics</title>
		<link>http://www.kirstenjahn.com/blog/2009/10/the-basics/</link>
		<comments>http://www.kirstenjahn.com/blog/2009/10/the-basics/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:27:45 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://www.kirstenjahn.com/rants/?p=99</guid>
		<description><![CDATA[A large part of this blog is to be a helpful resource for me as a web designer and front-end programmer. How so? Because every time I wrangle an entire day of anguish over a silly coding problem I intend &#8230; <a href="http://www.kirstenjahn.com/blog/2009/10/the-basics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A large part of this blog is to be a helpful resource for me as a web designer and front-end programmer. How so? Because every time I wrangle an entire day of anguish over a silly coding problem I intend to post it here. That way I will have my very own resource to look back at! And maybe, just maybe, along the way, it will be helpful to <strong>you</strong> too!</p>
<p>Let&#8217;s start with the basics in my file here at work:</p>
<p><em>To link to a stylesheet:</em><br />
<code class="html">&lt;link href="PATHTOFILE.css" type="text/css" rel="stylesheet" media="MEDIA" /&gt;</code></p>
<p>&#8220;PATHTOFILE.css&#8221; is obviously the path to your CSS file, whether relative or absolute. &#8220;MEDIA&#8221; is what type of media your stylesheet addresses. Options include &#8220;screen&#8221; for viewing on a normal computer, &#8220;print&#8221; for when a user prints out your web site, and &#8220;handheld&#8221; for viewing on a mobile device.</p>
<p><em>To link to a javascript file:</em><br />
<code class="html">&lt;script src="PATHTOFILE.js" language="javascript" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>&#8220;PATHTOFILE.js&#8221; is the path to your Javascript file, whether relative or absolute.</p>
<p><em>To link to a favicon:</em><br />
<code class="html">&lt;link href="PATHTOFILE.ico" rel="shortcut icon"/&gt;</code></p>
<p>&#8220;PATHTOFILE.ico&#8221; is the path to your favicon file, whether relative or absolute.</p>
<p><em>A JQuery ready command:</em><br />
<code class="js">$(document).ready(function(){<br />
});</code></p>
<p>This is the most basic JQuery command in which you stuff all other JQuery code into. It basically says &#8220;don&#8217;t run any of the code in here until the page is fully loaded, or &#8216;ready&#8217;.&#8221;</p>
<p>We&#8217;ll get more complex later, I <strong>promise</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirstenjahn.com/blog/2009/10/the-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

