<?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>weedygarden.net &#187; Web Development</title>
	<atom:link href="http://www.weedygarden.net/category/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weedygarden.net</link>
	<description>The random ramblings of a web developer.</description>
	<lastBuildDate>Sun, 05 Feb 2012 16:54:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Emergency Notifications: Getting the word out at Notre Dame</title>
		<link>http://www.weedygarden.net/2011/12/29/emergency-notifications-getting-the-word-out-at-notre-dame/</link>
		<comments>http://www.weedygarden.net/2011/12/29/emergency-notifications-getting-the-word-out-at-notre-dame/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 18:33:15 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[AgencyND]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Notre Dame]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=207</guid>
		<description><![CDATA[Back in November, Chas Grundy wrote about our emergency procedure for ND.edu. When we implemented this feature for ND.edu, we based the functionality on a single-source file. This gave the ability to update the message on both ND.edu and emergency.nd.edu (&#8230;)<p><a href="http://www.weedygarden.net/2011/12/29/emergency-notifications-getting-the-word-out-at-notre-dame/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Back in November, <a href="http://twitter.com/chasgrundy">Chas Grundy</a> <a href="http://grundyhome.com/2010/11/18/emergencies-and-web-design/">wrote about our emergency procedure for ND.edu</a>. When we implemented this feature for ND.edu, we based the functionality on a single-source file. This gave the ability to update the message on both ND.edu and <a href="http://emergency.nd.edu">emergency.nd.edu</a> quickly and easily. The added bonus to this approach is that we could then use that same file to build a script that could be used on any Notre Dame site to display the emergency message. But I&#8217;m getting ahead of myself.</p>
<h2>The results</h2>
<h3>nd.edu</h3>
<p>As part of the ND.edu redesign, we created two different designs for the emergency bar. The first is the standard &#8220;notification&#8221; that we want people to notice, but not convey a feeling of true emergency. This corresponds to the &#8220;Level One: Local and Internal&#8221; from <a href="http://grundyhome.com/blog/archives/2010/11/18/emergencies-and-web-design/">Chas&#8217; article</a>.</p>
<p><img title="ND.edu in Notification mode" src="/wp-content/wpfiles/notice-nd.jpg" alt="ND.edu in Notification mode" /></p>
<p>When we really want to grab the audiences&#8217; attention, we do two things. First, we increase the height of the emergency bar and change the color to red. Second, the feature story is replaced by the emergency notification. This is &#8220;Level Two: Local but Critical&#8221;.</p>
<p><img title="ND.edu in Emergency mode" src="/wp-content/wpfiles/alert-nd.jpg" alt="ND.edu in Emergency mode" /></p>
<h3>m.nd.edu</h3>
<p>Our mobile site monitors the same file, and in case of emergency the &#8220;Emergency&#8221; icon is tagged with a notification symbol. Viewing the section then displays the current message. Simple, but effective. We saw visits to this section jump exponentially during our snow closing back in February 2011.</p>
<p><img class="noborder" title="Side-by-side display of the m.nd.edu homescreen notification icon and the notification message in the Emergency section." src="/wp-content/wpfiles/notice-mobile-combo.jpg" alt="m.nd.edu emergency active" /></p>
<h3>Emergency Script</h3>
<p>To further get the message out, we put together a javascript snippet that can exist on any university site. Each page load checks a central script, and in the case of an emergency, adds a bar to the top of the site and displays the emergency title along with a link to <a href="http://emergency.nd.edu">emergency.nd.edu</a>. Below is an example of the Notre Dame News site in both previously mentioned states.</p>
<p>Level One:</p>
<p><img title="newsinfo.nd.edu in Notification mode" src="/wp-content/wpfiles/notice-newsinfo.jpg" alt="newsinfo.nd.edu in Notification mode" /></p>
<p>Level Two:</p>
<p><img title="newsinfo.nd.edu in Emergency mode" src="/wp-content/wpfiles/alert-newsinfo.jpg" alt="newsinfo.nd.edu in Emergency mode" /></p>
<h2>The Payoff</h2>
<p>The huge advantage to this approach is that we can display emergency information on dozens (soon to be hundreds) of Notre Dame sites by changing a single file. The script to display the message is available to all Notre Dame developers to include in their sites, and is a simple cut-and-paste install.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2011/12/29/emergency-notifications-getting-the-word-out-at-notre-dame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HighEdWeb 2011 Slides and Notes</title>
		<link>http://www.weedygarden.net/2011/11/01/highedweb-2011-slides-and-notes/</link>
		<comments>http://www.weedygarden.net/2011/11/01/highedweb-2011-slides-and-notes/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 01:22:22 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=202</guid>
		<description><![CDATA[Last week I attended HighEdWeb which took place in Austin, TX. This was my first trip to this conference, and perhaps feeling a little over-ambitious, I co-presented a talk with programmer extraordinaire Jeremy Friesen titled &#8220;Feeding the Beast&#8221;, which was (&#8230;)<p><a href="http://www.weedygarden.net/2011/11/01/highedweb-2011-slides-and-notes/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Last week I attended <a href="http://2011.highedweb.org/">HighEdWeb</a> which took place in Austin, TX. This was my first trip to this conference, and perhaps feeling a little over-ambitious, I co-presented a talk with programmer extraordinaire <a href="http://twitter.com/jeremyfriesen">Jeremy Friesen</a> titled &#8220;Feeding the Beast&#8221;, which was about encouraging API use around <a href="http://nd.edu">Notre Dame</a>. I also took part in the poster presentation portion of the conference and presented on how we (Marketing and Communications) use a base theme to build all our sites which gives us a jump-start on accessibility and mobile on each design.</p>
<p>The code for Jeremy&#8217;s and my talk and the visuals for my poster presentation <a href="http://bit.ly/hew2011">are up on my GitHub account</a> Also included are Jeremy&#8217;s and my notes for the talks we attended. Slides for the <a href="http://bit.ly/rNP7gG">API presentation are on Speaker Deck</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2011/11/01/highedweb-2011-slides-and-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessibility Basics: Access Keys</title>
		<link>http://www.weedygarden.net/2011/09/30/accessibility-basics-access-keys/</link>
		<comments>http://www.weedygarden.net/2011/09/30/accessibility-basics-access-keys/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 23:55:13 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=197</guid>
		<description><![CDATA[As developers, there&#8217;s a number of things we should be sure to include into each site we build to help with accessibility. One of the most basic of these is access keys. Access Keys Access keys are a very simple (&#8230;)<p><a href="http://www.weedygarden.net/2011/09/30/accessibility-basics-access-keys/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>As developers, there&#8217;s a number of things we should be sure to include into each site we build to help with accessibility. One of the most basic of these is access keys.</p>
<h2>Access Keys</h2>
<p>Access keys are a very simple accessibility tool to implement. By doing so, it allows users to navigate to specified sections of your site via keyboard shortcuts (alt + key on Windows, or control + key on Macintosh, although some browsers use <a href="http://www.direct.gov.uk/en/Hl1/Help/DG_020463">other modifiers</a>). So for instance, to add an access key to your header, to allow users to get back to your homepage, you would use the following:</p>
<pre><code>&lt;h1&gt;&lt;a href="/" accesskey="1"&gt;Title of My Site&lt;/h1&gt;</code></pre>
<p><code> </code></p>
<p>This would allow a user to hit &#8220;control + 1&#8243; (or &#8220;alt + 1&#8243;) on any page of your site to get back to the homepage.</p>
<p>Now one of the difficulties with access keys is letting your users know they exist. One option is to add a title attribute alongside each accesskey, which could tip-off users when they mouse over the element for future reference, like so:</p>
<pre><code>&lt;h1&gt;&lt;a href="/" accesskey="1" title="Homepage shortcut key = 1"&gt;Title of My Site&lt;/h1&gt;</code></pre>
<p><code> </code></p>
<p>There are other ways to advertise access keys which I won&#8217;t get into here (see the <a href="http://en.wikipedia.org/wiki/Access_key">Wikipedia entry</a> for suggestions).</p>
<p>So which keys should you use you ask? That&#8217;s a great question. There&#8217;s nothing in the HTML spec indicating which keys/values should be used, but there are sets that have become widely adopted around the web. According to the UK Government accessibility guidelines, you should use the following:</p>
<table>
<caption><abbr>UK</abbr> Government Shortcuts</caption>
<tbody>
<tr>
<th>Access key</th>
<th>Target</th>
</tr>
<tr>
<td>S</td>
<td>Skip navigation</td>
</tr>
<tr>
<td>1</td>
<td>Home page</td>
</tr>
<tr>
<td>2</td>
<td>What’s new</td>
</tr>
<tr>
<td>3</td>
<td>Site map</td>
</tr>
<tr>
<td>4</td>
<td>Search</td>
</tr>
<tr>
<td>5</td>
<td><abbr>FAQ</abbr>s</td>
</tr>
<tr>
<td>6</td>
<td>Help</td>
</tr>
<tr>
<td>7</td>
<td>Complaints procedure</td>
</tr>
<tr>
<td>8</td>
<td>Terms and conditions</td>
</tr>
<tr>
<td>9</td>
<td>Feedback form</td>
</tr>
<tr>
<td>0</td>
<td>Access key details</td>
</tr>
</tbody>
</table>
<p>I&#8217;m ok with this list, although I think it&#8217;s missing important access keys, as well as including others that I haven&#8217;t needed in, well, ever. I typically try to include access keys to the homepage (&#8220;1&#8243;), content (I use &#8220;c&#8221;), navigation (&#8220;s&#8221;) and search (&#8220;4&#8243;).</p>
<div class="note">
<h4>Resources</h4>
<ul>
<li><a href="http://clagnut.com/blog/193/">Clagnut &#8211; Accesskey standards</a></li>
<li><a href="http://en.wikipedia.org/wiki/Access_key">Wikipedia &#8211; Access Keys</a></li>
<li><a href="http://www.direct.gov.uk/en/Hl1/Help/DG_020463">Directgov &#8211; Access key scheme</a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2011/09/30/accessibility-basics-access-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Educating Our Clients About Responsive Web Design</title>
		<link>http://www.weedygarden.net/2011/08/26/educating-our-clients-about-responsive-web-design/</link>
		<comments>http://www.weedygarden.net/2011/08/26/educating-our-clients-about-responsive-web-design/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 01:52:00 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Notre Dame]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=190</guid>
		<description><![CDATA[A couple days ago in a post-meeting chat I mentioned to my Project Manager Extraordinaire @GtownNick, that I&#8217;d like to extend our development time on custom sites by a couple of hours so we could spend a little more time (&#8230;)<p><a href="http://www.weedygarden.net/2011/08/26/educating-our-clients-about-responsive-web-design/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>A couple days ago in a post-meeting chat I mentioned to my Project Manager Extraordinaire <a href="http://twitter.com/GtownNick">@GtownNick</a>, that I&#8217;d like to extend our development time on custom sites by a couple of hours so we could spend a little more time to focus on responsive web design with each build. He responded that just the other day one of our clients was concerned because they resized the browser window on a recent project and elements of the design started to move around on the page. They stated that they would prefer to see a horizontal scroll-bar, rather than have the approved design change with the width of the window. I was confused by this this statement. Why would they not want the site to respond to different size screens?</p>
<p>After some thought I realized that their concerns and subsequent statement was entirely our fault.</p>
<p>Our development process and mobile strategy in the past consisted of three things:</p>
<ol>
<li>A primary design built on the 960 grid, which is client approved</li>
<li>A &#8220;webkit&#8221; stylesheet for iOS, Android and friends that completely replaced the default style</li>
<li>A &#8220;handheld&#8221; stylesheet for less capable devices</li>
</ol>
<p>The result was a site that looked exactly like the Photoshop mockup, a second design the client might see if they visit on their iPhone or Android device, and a third that the client would probably never see. The &#8220;mobile&#8221; styles were pretty much drop-in since we follow a standard mark-up style on all of our sites, so it had little to no impact on the project timeline. However, with our recent adoption of RWD, I&#8217;ve found it&#8217;s helpful to have a little more time allotted to make sure the design responds well to different screens, and to be able to test on a variety of devices.</p>
<p>The problem is centered around the fact we really only explained our mobile approach to clients if they happened to ask about mobile. It&#8217;s just one of the things we included by default because it&#8217;s the &#8220;right thing to do&#8221;. But now that our approach is going to be a lot more visible, it&#8217;s time we have the conversation with each client BEFORE we enter the design stage. It&#8217;s on us to explain how designs will change and re-flow based on the window width. With a little education about the recent advances in web development, our clients will understand the benefits of this new approach affords their users. Our clients already accept that the final site will not look exactly the same in every browser when compared to the mockup. We already explain that older IE browsers won&#8217;t get rounded corners, drop shadows and some gradients.</p>
<p>Remember, we&#8217;re the ones that are reading the development blogs, trying all the new tricks and for the most part agree that RWD (when done right) is the future of web development. Our clients will most likely never read <a href="http://www.alistapart.com/">A List Apart</a>. It&#8217;s up to us to be the educators and professionals we are, do what&#8217;s best for our clients, and help them to understand why we&#8217;re doing what we&#8217;re doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2011/08/26/educating-our-clients-about-responsive-web-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Consuming Remote XML as JSONP</title>
		<link>http://www.weedygarden.net/2011/01/11/consuming-remote-xml-as-jsonp/</link>
		<comments>http://www.weedygarden.net/2011/01/11/consuming-remote-xml-as-jsonp/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 14:52:23 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[AgencyND]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=163</guid>
		<description><![CDATA[It&#8217;s All About Sharing Content One of the basic tenets behind the internet is sharing data. Initially, that was primarily done with HTML. But with the rise of web applications, sometimes plain HTML just won&#8217;t do. That&#8217;s where API&#8217;s and (&#8230;)<p><a href="http://www.weedygarden.net/2011/01/11/consuming-remote-xml-as-jsonp/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<h2>It&#8217;s All About Sharing Content</h2>
<p>One of the basic tenets behind the internet is sharing data. Initially, that was primarily done with HTML. But with the rise of web applications, sometimes plain HTML just won&#8217;t do. That&#8217;s where API&#8217;s and feeds come in. An application <a href="http://en.wikipedia.org/wiki/Api">with a proper API</a> allows other applications to query it for content and get that content back in a variety of formats, be it XML, JSON, or HTML. <a href="http://en.wikipedia.org/wiki/News_feed">Feeds</a> on the other hand are a one-way distribution of data, usually in XML format.</p>
<h2>The Problem</h2>
<p>Notre Dame&#8217;s mobile site (<a href="http://m.nd.edu">m.nd.edu</a>) is built solely on remote data. Every module draws from an external feed of either XML or javascript or in the case of the Map module, an API. This isn&#8217;t a problem since m.nd.edu is built in PHP, which has a well-established ability to fetch remote data and manipulate it. I&#8217;m in the process of converting the m.nd.edu application into a native iPhone app using <a href="http://phonegap.com">PhoneGap</a>. However, PhoneGap-based applications cannot contain PHP code. As a result I&#8217;m converting each of those modules to javascript and HTML. Unfortunately, javascript suffers from one very big drawback when it comes to consuming data… it&#8217;s only allowed to access files that exist on the domain running the script. The only exception to this is <a href="http://en.wikipedia.org/wiki/Json#JSONP">JSONP</a>.</p>
<h2>The Solution</h2>
<p>The majority of the external feeds utilized by m.nd.edu are XML/RSS, so this presents a problem when the app needs JSONP. The easiest solution is to make use of a proxy script which creates JSONP from a XML feed. Here&#8217;s the rough-draft:</p>
<pre><code class="php"> &lt;?php header('content-type: application/json; charset=utf-8'); if( strlen($_GET["feed"]) &gt;= 13 ) { $xml = file_get_contents(urldecode($_GET["feed"])); if($xml) { $data = @simplexml_load_string($xml, "SimpleXMLElement", LIBXML_NOCDATA); $json = json_encode($data); echo isset($_GET["callback"]) ? "{$_GET[’callback’]}($json)" : $json; } } ?&gt; </code></pre>
<p>So what we have here is fairly basic. First off, the script is set to respond with the content type of &#8220;application/json&#8221;. PHP gets the XML from the remote source, then converts it to a SimpleXML object. This object can then be converted to JSON using the <a href="http://php.net/manual/en/function.json-encode.php">json_encode() function</a> which has been available since PHP 5.2.1. The script outputs plain JSON. If a callback function is specified, it will wrap the output in the callback. I wouldn&#8217;t recommend using this as-is in production as it&#8217;s lacking some error-checking, but it&#8217;s enough to get started. At this point, you can use it with jQuery like so:</p>
<pre><code class="javascript"> $.getJSON("http://yoursite.com/xml2json.php?callback=?", {feed:"http://agency.nd.edu/agencynd-team.xml"}, function(data) { // process data here } }); </code></pre>
<p>So there you have it. We can now consume remote XML data using javascript. If anyone more familiar with PhoneGap knows of an easier/better way of dealing with this kind of a problem, please share.</p>
<h3>Update 2012-02-04</h3>
<p>Ben Alman (<a href="http://twitter.com/cowboy">@cowboy</a>) has released an open-source solution:</p>
<ul>
<li><a href="http://benalman.com/projects/php-simple-proxy/">Project page for Simple PHP Proxy</a></li>
<li><a href="https://github.com/cowboy/php-simple-proxy">Github repo for Simple PHP Proxy</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2011/01/11/consuming-remote-xml-as-jsonp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

