<?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; Mobile</title>
	<atom:link href="http://www.weedygarden.net/category/mobile/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>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>
		<item>
		<title>Retina Display and CSS Background Images</title>
		<link>http://www.weedygarden.net/2010/10/13/retina-display-and-css-background-images/</link>
		<comments>http://www.weedygarden.net/2010/10/13/retina-display-and-css-background-images/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 03:16:40 +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>
		<category><![CDATA[agencynd]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=134</guid>
		<description><![CDATA[Anyone who owns an iPhone 4 has experienced the beautiful new Retina Display. Text is amazing, colors are vibrant, but apps and sites that are not updated to handle this display usually look less than stellar. This is because the (&#8230;)<p><a href="http://www.weedygarden.net/2010/10/13/retina-display-and-css-background-images/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<figure><a href="http://m.nd.edu"><img class="alignright" src="/wp-content/wpfiles/mdotnd-ip-small.png" alt="m.nd.edu" /></a></figure>
<p>Anyone who owns an iPhone 4 has experienced the beautiful new <a href="http://www.apple.com/iphone/features/retina-display.html">Retina Display</a>. Text is amazing, colors are vibrant, but apps and sites that are not updated to handle this display usually look less than stellar. This is because the Retina Display, which has a display that is twice the resolution of most devices, scales images up so they appear to be the “correct size”. The solution to this is to target these devices using a <a href="http://www.w3.org/TR/css3-mediaqueries/">media query</a> and replace the graphics with a higher-quality version.</p>
<h2>Use case: m.nd.edu</h2>
<p>My first opportunity to work with and fix this issue was for <a href="http://m.nd.edu">m.nd.edu</a>. The first step may also be the most difficult. Through trial and error I worked with our designer <a href="http://www.humanradiator.com/">Jim Gosz</a> to re-create the entire interface in both standard and double resolution. For this article, I’ll focus on the home-screen icons, displayed here at double the size to accommodate the Retina Display. Below is a screen-shot from the iPhone 4 simulator which shows how the images appear pixelated due to scaling.</p>
<figure><a href="/wp-content/mdotnd-ip4-before.png"><img src="/wp-content/wpfiles/mdotnd-ip4-before-preview.png" alt="iPhone 4 before" /></a><br />
<figcaption>iPhone 4 with scaled-up icons.</figcaption>
</figure>
<h3>Bring in the Big Guns</h3>
<p>The <a href="http://m.nd.edu/webkit/css/images/icon-news.png">original icon</a> size on the home-screen is 57&#215;57 pixels. For the Retina Display, Jim created additional <a href="http://m.nd.edu/webkit/css/images/icon-news@2x.png">icons at 114&#215;114</a>. I chose to follow the naming convention Apple uses in its SDK to target the high-res images by adding the suffix “@2x” to the file-name. So for low-res devices, if the standard icon is &#8220;icon-news.png&#8221;, the RD devices would be &#8220;icon-news@2x.png&#8221;. To get these into the mix, I added a media query into the css file that targets the Retina Display:</p>
<pre>
@media all and (-webkit-min-device-pixel-ratio: 2) {
    #home-news a {background-image:url(images/icon-news@2x.png);}
}
</pre>
<p>However, after refreshing the screen, the images look like this:</p>
<figure><a href="/wp-content/wpfiles/mdotnd-ip4-unscaled.png"><img src="/wp-content/wpfiles/mdotnd-ip4-unscaled-preview.png" alt="iPhone 4 unscaled" /></a><br />
<figcaption>iPhone 4 hi-res un-scaled</figcaption>
</figure>
<p>Obviously not ideal. This is where the <a href="http://www.w3.org/TR/css3-background/#the-background-size">background-size</a> property comes in. By adding
<pre>#homenav li a {background-size:57px 57px;}</pre>
<p> to the Retina Display portion of the style-sheet, the 114px images will display at 57px and thereby make everything appear at the proper scale. The background-size property will also accept “auto” as a value. So I could have used &#8220;background-size:57px auto;&#8221;. With this in place, the icons appear as below:</p>
<figure><a href="/wp-content/mdotnd-ip4-scaled.png"><img src="/wp-content/wpfiles/mdotnd-ip4-scaled-preview.png" alt="iPhone 4 scaled" /></a><br />
<figcaption>iPhone 4 hi-res</figcaption>
</figure>
<p>I think we can all agree that looks much better. Is this something I&#8217;ll use on every site I build? Probably not. Creating multiple versions of each graphic is labor intensive. But for mobile specific sites, it&#8217;s definitely worth it. Especially since we&#8217;ll be seeing more devices arriving soon with similar screens.</p>
<div  class="note">
<p>Further reading:</p>
<ul>
<li><a href="http://www.w3.org/TR/css3-mediaqueries/">W3C Media Queries</a></li>
<li><a href="http://webkit.org/blog/55/high-dpi-web-sites/">High DPI Web Sites</a></li>
<li><a href="http://aralbalkan.com/3331">How to make your web content look stunning on the iPhone 4&#8242;s new Retina display</a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2010/10/13/retina-display-and-css-background-images/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Print Styles to Create a Basic Mobile Experience</title>
		<link>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/</link>
		<comments>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 02:13:29 +0000</pubDate>
		<dc:creator>Erik Runyon</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weedygarden.net/?p=115</guid>
		<description><![CDATA[In the last article, we made our print stylesheet. Now we&#8217;re going to take that stylesheet and turn it into a basic mobile stylesheet. Now when I say basic, I&#8217;m talking VERY basic. This is not what you&#8217;re displaying to (&#8230;)<p><a href="http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="/2010/01/18/print-styles-your-first-step-to-basic-mobile/">In the last article</a>, we made our print stylesheet. Now we&#8217;re going to take that stylesheet and turn it into a basic mobile stylesheet. Now when I say basic, I&#8217;m talking VERY basic. This is not what you&#8217;re displaying to your iPhone and Android users.</p>
<h2>Copy, Paste and Tweak Your Way to Mobile</h2>
<p>First off, create an empty your mobile stylesheet and link it up:</p>
<p>
<pre>&lt;link href=&quot;/css/mobile.css&quot; media=&quot;handheld&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</pre>
</p>
<p><img class="alignright" src="/wp-content/wpfiles/basic-mobile.png" alt="Basic mobile display" /></p>
<p>Grab your print styles and paste them into your mobile stylesheet. You&#8217;ll need to take a few of the items you hid (such as navigation), bring them back and give them some style. As with print, focus on what&#8217;s important to this user experience and hide what&#8217;s not.</p>
<h2>Branding is Still Important</h2>
<p>We&#8217;re going to use the same in-line images we included in our print stylesheet to brand our mobile site. How you have them set up in your print style may be all you need. If not, feel free to use &quot;width&quot; on them to make them fit. I typically recommend against using css to change the height/width of images, but I make an exception in this case.</p>
<h3>Images</h3>
<p>Since most of your content images are going to be wider than the screens of most phones, you should add max-width:100% to images in your content.</p>
<h3>Text</h3>
<p>One of the first things a basic mobile user should see on your page (either immediately preceding or following the header) is skip links. This is a list of anchor tags to key elements on your page. At a minimum, it should include links to navigation and content. As an added bonus, these links are helpful to screen readers as well. Be sure to hide this list in your print and screen stylesheets.</p>
<p>When it comes to body copy on the web, there has been a long-standing serif vs sans-serif debate. As a personal preference, I usually go with sans-serif for screen body copy (serif for titles), and serif for print. If you look at my <a href="/wp-content/themes/weedy-beta/css/print.css">print stylesheet</a>, you&#8217;ll see the following font stack:
<pre>Georgia, Times, &quot;Times New Roman&quot;, serif</pre>
<p> For screen and <a href="/wp-content/themes/weedy-beta/css/mobile.css">basic mobile</a>, I&#8217;m using:
<pre>&quot;Lucida Grande&quot;, Lucida, Helvetica, Arial, sans-serif</pre>
</p>
<h2>And Off We Go</h2>
<p>If recent trends tell us anything, it&#8217;s that an increasing percentage of web users are going to be accessing our sites on small screens. As developers, it&#8217;s our responsibility to to give at least a passing nod to these users and give them a pleasant experience. Offering basic mobile styles is the first step.</p>
<div  class="note">
<p>Two of the easiest way to test your newly crafted mobile view:</p>
<ul>
<li>Opera 10&#8242;s small screen view (View &gt; Small Screen)</li>
<li>Switching your style view if Firefox using the <a href="http://chrispederick.com/work/web-developer/">Web Developer extension</a>. (CSS &gt; Display CSS By Media Type)</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.weedygarden.net/2010/01/24/using-print-styles-to-create-a-basic-mobile-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

