<?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>FerretArmy: A Web Developer&#039;s Paradise &#187; WebDev</title>
	<atom:link href="http://www.ferretarmy.com/category/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ferretarmy.com</link>
	<description>Pushing the Web Forward, Since 2007</description>
	<lastBuildDate>Wed, 18 Jan 2012 15:58:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jQuery Templating with .tmpl</title>
		<link>http://www.ferretarmy.com/2011/06/01/jquery-templating-with-tmpl/</link>
		<comments>http://www.ferretarmy.com/2011/06/01/jquery-templating-with-tmpl/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 00:27:23 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=544</guid>
		<description><![CDATA[A quick overview of the jQuery templating API.]]></description>
			<content:encoded><![CDATA[<p>Templating of web controls is a valuable technique that allows for code reuse. For example, if you have a repeated list of items with common attributes that need to be displayed on a web page, templating is a great solution. Templating can often be accomplished on the server side through controls such as ASP.NET repeaters. However, with the web of today, asynchronous programming is where it&#8217;s at. With AJAX data calls, you often get JSON objects back that must be turned into HTML and displayed on a web page.</p>
<p>There are a few ways of doing so &#8211; you could have an asynchronous call return an HTML fragment, for instance (done that). You could also embed placeholders in hidden HTML fragments on a page, and use a combination of jQuery&#8217;s clone/replace/append methods to push object data into them (done that too). However, there&#8217;s an even better technique available now, as a first-class citizen in the jQuery library &#8211; the <a href="http://api.jquery.com/jquery.tmpl/">.tmpl templating API</a>.</p>
<p>jQuery templating is a feature that&#8217;s currently in beta (though it is distributed with jQuery as of version 1.4.3), and is based upon an <a href="https://github.com/jquery/jquery-tmpl">existing templating plugin</a>. I&#8217;ve had the pleasure of using the jQuery templating API for a bit of time now, and I admit that it is by far the easiest, most robust templating solution I&#8217;ve found. There are template controls for repeaters (<a href="http://api.jquery.com/template-tag-each">{{each}}</a>), conditional statements (<a href="http://api.jquery.com/template-tag-if/">{{if}}</a> and <a href="http://api.jquery.com/template-tag-else">{{else}}</a>), templated HTML fragments (<a href="http://api.jquery.com/template-tag-html">{{html}}</a>), and wrapping (<a href="http://api.jquery.com/template-tag-wrap">{{wrap}}</a>). That&#8217;s a lot of functionality out of the box!</p>
<p>By far my favorite part of html templating, however, is the &lt;script type=&#8217;text/x-jquery-tmpl&#8217;&gt;&lt;/script&gt; tagging that you can wrap around your template fragments. One thing I&#8217;ve disliked with templating is that you have to embed potentially malformed HTML into your page &#8211; for instance, you might end up having to template id attributes. Malformed html is not the worst thing in the world, especially in hidden fields, but it certainly doesn&#8217;t help with search engine rankings and such. Having a way of clearly saying &#8220;I&#8217;m a template fragment&#8221; is a great thing, both for search engines and general maintainability.</p>
<p>If you haven&#8217;t gotten a chance to take a look at jQuery templating, now is certainly a great time to do so. It comes for free with jQuery, and it&#8217;s a fast, easy, and robust solution for templating needs.</p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 116px; width: 1px; height: 1px; overflow: hidden;"><code>text/x-jquery-tmpl</code></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2011/06/01/jquery-templating-with-tmpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musings on SPDY Protocol</title>
		<link>http://www.ferretarmy.com/2009/11/23/musings-on-spdy-protocol/</link>
		<comments>http://www.ferretarmy.com/2009/11/23/musings-on-spdy-protocol/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 01:03:14 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[spdy]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=481</guid>
		<description><![CDATA[So, yet another week, and another fairly large announcement from Google. They&#8217;ve been coming pretty fast and furious lately &#8211; the open-sourcing of both Closure and Chrome OS are two fairly recent developments. However, the one this post will focus on is the announcement that Google is working on a new application-level protocol, dubbed SPDY. [...]]]></description>
			<content:encoded><![CDATA[<p>So, yet another week, and another fairly large announcement from Google. They&#8217;ve been coming pretty fast and furious lately &#8211; the open-sourcing of both Closure and Chrome OS are two fairly recent developments. However, the one this post will focus on is the announcement that Google is working on a new application-level protocol, dubbed <a href="http://dev.chromium.org/spdy/spdy-whitepaper">SPDY</a>.</p>
<p>SPDY (pronounced &#8216;speedy&#8217;) is designed as an adjunct to the <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">http protocol</a>, which has been around for nearly twenty years now. SPDY was designed to run atop of tcp/ip, which is the place in the networking stack that the browser talks to the web server. Hence, to be able to utilize SPDY, both the browser and the web server need to understand the protocol. However, the router need not change at all, which will greatly aid in implementation, if it&#8217;s standardized as a protocol.</p>
<p>So what are the features of the SPDY protocol? First, it&#8217;s faster than standard HTTP through a number of mechanisms. By default, it gzips it&#8217;s headers (and all content), making the packets more lightweight. It only needs one channel for data transfer (it multiplexes requests through the channel, which functions as a stream), so there&#8217;s a tremendous amount of connection overhead reduction versus standard-fare HTTP. The connection is designed to remain open as long as the client wants, which means that new content can be pushed from the server to the client. Packet prioritization is built into the protocol as well.</p>
<p>The nicest part of SPDY, in my opinion, is that it requires the use of SSL by default. This means that every packet sent over the wire is encrypted. Deep packet injection and packet sniffing are realities in the world, so a switch to secure communication is long overdue.</p>
<p>The roadmap for SPDY seems pretty straightforward. It&#8217;s not finished yet, but being an open source effort, a standard could be developed in a few years. Browsers and web servers can build in protocol support as the standard is still being developed. Browsers and can try to handshake in SPDY with a web server, then default back to HTTP if necessary. There aren&#8217;t many competing protocols out there, especially ones that don&#8217;t require any router firmware updates (which would take a decade to roll out, at least). Even if the web doesn&#8217;t decide to run on SPDY, the only reason for that would be someone came up with an even better idea in the meantime. A new protocol is definitely in store for the future of the web.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/11/23/musings-on-spdy-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Closure</title>
		<link>http://www.ferretarmy.com/2009/11/09/google-closure/</link>
		<comments>http://www.ferretarmy.com/2009/11/09/google-closure/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 00:23:47 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Closure]]></category>
		<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=477</guid>
		<description><![CDATA[Google just open sourced Closure, their robust JavaScript library. Closure is used in a variety of Google products, notably GMail and Google Docs. I had a chance to play with it for a few minutes, and I&#8217;m posting my first impressions. Google Closure is a fairly complete JavaScript framework. In that sense, it duplicates a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://code.google.com/closure/"><img class="alignnone size-full wp-image-478" title="Google Closure" src="http://www.ferretarmy.com/wp-content/uploads/2009/11/closureLogo.png" alt="Google Closure" width="128" height="128" /></a></p>
<p>Google just open sourced <a href="http://code.google.com/closure/">Closure</a>, their robust JavaScript library. Closure is used in a variety of Google products, notably <a href="http://mail.google.com">GMail</a> and <a href="http://docs.google.com">Google Docs</a>. I had a chance to play with it for a few minutes, and I&#8217;m posting my first impressions.</p>
<p>Google Closure is a fairly complete JavaScript framework. In that sense, it duplicates a lot of the functionality of existing JavaScript libraries, such as <a href="http://jquery.com/">jQuery</a> and <a href="http://developer.yahoo.com/yui/">YUI</a>. It contains behaviors, AJAX, event handling, selectors, UI components, and more. The syntax is fairly straightforward, but it&#8217;s not the same as other libraries, so there&#8217;s a learning curve in getting acquainted with it.</p>
<p>Closure has excellent dependency management through a robust loading mechanism. Basically, if you don&#8217;t reference a certain piece of the library, rest assured that it&#8217;s not going to load (and slow down your page as a result). In addition, it comes with the <a href="http://code.google.com/closure/compiler/docs/gettingstarted_ui.html">Closure Compiler</a>, which will walk your JavaScript, determine what libraries you need, then aggregate and compress all the required files. Being able to deploy one file instead of many is a great way of speeding up your site.</p>
<p>One thing that irks me is that there only way to get Closure is through Subversion access to the trunk. If Google wants Closure to be adopted widely, they&#8217;re going to need to start offering discrete, packaged versions of it. Many developers (and novices) will be put off by the current distribution method otherwise.</p>
<p>The <a href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html">API</a> is well documented, and has links to the actual code for each method (something that I&#8217;ve not really seen before in API documentation). The API itself is very robust, with a ton of methods and accessors on each object. I&#8217;m not sure I&#8217;m a big fan of the way things are laid out in the API, but I don&#8217;t have enough experience with it to say anything definitively here.</p>
<p>One doesn&#8217;t have to stretch the imagination to believe that Closure has amazing potential. This is, after all, what <a href="http://mail.google.com">GMail</a> is built from. I&#8217;m excited that it&#8217;s been open-sourced and I can&#8217;t wait to use it a bit more. Google has given a grand gift to the developer community with this release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/11/09/google-closure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Domain AJAX with CSSHttpRequest</title>
		<link>http://www.ferretarmy.com/2009/10/14/cross-domain-ajax-with-csshttprequest/</link>
		<comments>http://www.ferretarmy.com/2009/10/14/cross-domain-ajax-with-csshttprequest/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:51:26 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[CSSHttpRequest]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=465</guid>
		<description><![CDATA[Normally, AJAX is limited to retrieving data on the same domain that served the page. This is a limitation of the XMLHttpRequest, done mostly for security purposes. There are several ways to get around this limitation, of course, using a variety of methods and techniques. This is one of the stranger that I&#8217;ve come across [...]]]></description>
			<content:encoded><![CDATA[<p>Normally, AJAX is limited to retrieving data on the same domain that served the page. This is a limitation of the XMLHttpRequest, done mostly for <a href="http://en.wikipedia.org/wiki/Same_origin_policy">security purposes</a>. There are several ways to get around this limitation, of course, using a variety of methods and techniques. This is one of the stranger that I&#8217;ve come across &#8211; <a href="http://nb.io/hacks/csshttprequest">CSSHttpRequest</a>.</p>
<p>Essentially, this small JavaScript library exploits the fact that CSS stylesheets are not subject to the same domain policy, which enables cross-domain POST requests for .css files. This allows you to pull CSS rules from remote domains &#8211; rules that contain name-value pairs embedded in valid CSS styles. The particular technique used is to return name-value pairs in background url fields for fake style rules, as such:</p>
<pre>#c0 { background: url(data:,Hello%20World!); }</pre>
<p>The client-side applies these style rules when they return from the remote domain, then JavaScript is used to read the property values and turn them into essentially JSON data ready for client consumption.</p>
<p>Of course, there&#8217;s a reason that the same origin policy is enforced. Normally, resources on the same domain are considered trusted, while external resources are not. With a library like this, essentially, if you&#8217;re vulnerable to JavaScript injection, there&#8217;s not much you can do to keep someone from embedding CSSHttpRequest on your page then using it to pull content from a remote domain. Nasty trick, but it&#8217;s totally possible and even trivial to some extent.</p>
<p>There are certainly legitimate reasons to need cross-domain AJAX. However, I wouldn&#8217;t think to use such a technique on a public site &#8211; it has the feel of a hack since (AJAX isn&#8217;t supposed to cross domains, after all), and the potential erosion of public trust is not worth the benefits. As an exercise of an interesting technique, it&#8217;s very cool, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/10/14/cross-domain-ajax-with-csshttprequest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery UI Image Carousel</title>
		<link>http://www.ferretarmy.com/2009/09/29/jquery-ui-image-carousel/</link>
		<comments>http://www.ferretarmy.com/2009/09/29/jquery-ui-image-carousel/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 16:43:03 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=458</guid>
		<description><![CDATA[I&#8217;ve just released my latest plugin, the jQuery UI Image Carousel! The plugin is a standard-fare image carousel, and it&#8217;s also fully compatible with jQuery UI. It&#8217;s got a few options that make it fairly versatile &#8211; from a minimal look all the way to a collapsible version with a custom header. The JavaScript itself [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.ferretarmy.com/files/jQuery/ImageCarousel/ImageCarousel.html"><img class="size-full wp-image-459 aligncenter" title="jQuery UI Image Carousel" src="http://www.ferretarmy.com/wp-content/uploads/2009/09/carouselPic.jpg" alt="jQuery UI Image Carousel" width="211" height="125" /></a></p>
<p>I&#8217;ve just released my latest plugin, the <a href="http://www.ferretarmy.com/files/jQuery/ImageCarousel/ImageCarousel.html">jQuery UI Image Carousel</a>! The plugin is a standard-fare image carousel, and it&#8217;s also fully compatible with <a href="http://jqueryui.com/">jQuery UI</a>. It&#8217;s got a few options that make it fairly versatile &#8211; from a minimal look all the way to a collapsible version with a custom header.</p>
<p>The JavaScript itself wasn&#8217;t that daunting &#8211; version 1.0 clocks in at around 180 lines. Most of it is presentation management as well &#8211; making sure that the correct jQuery UI classes are applied to the markup, and so forth. In total, it was a bit of a longer exercise &#8211; there was a lot of work to insure compatibility with older versions of IE, for instance. I hope you enjoy, and if you use it, please take a sec to leave a comment with your page URL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/09/29/jquery-ui-image-carousel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling Button Clicks The Better Way</title>
		<link>http://www.ferretarmy.com/2009/09/18/disabling-button-clicks-the-better-way/</link>
		<comments>http://www.ferretarmy.com/2009/09/18/disabling-button-clicks-the-better-way/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 17:57:35 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=449</guid>
		<description><![CDATA[Most of the time when you want to cancel an action on a web page, such as a button click, you&#8217;d return false in the client-side button event handler, as such: &#60;a href="blah..." onclick="return DoAction();"&#62;Link&#60;/a&#62; ... function DoAction() { /*Do Something */ return false; }; However, there&#8217;s a better way, using the event.preventDefault() method. I [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time when you want to cancel an action on a web page, such as a button click, you&#8217;d return false in the client-side button event handler, as such:</p>
<p><code>&lt;a href="blah..." onclick="return DoAction();"&gt;Link&lt;/a&gt;</code></p>
<p><code>...</code></p>
<p><code>function DoAction() { /*Do Something */ return false; };</code></p>
<p>However, there&#8217;s a better way, using the <a href="https://developer.mozilla.org/en/DOM/event.preventDefault">event.preventDefault()</a> method. I had the need to use this recently, when I was fixing a trivial issue with the <a href="http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/">Filament Group jQuery UI buttons</a> &#8211; my &#8216;a href&#8217; styled buttons were still clickable when they were disabled. An easy solution to this problem is to capture the click and prevent the default action. I hooked this action to all disabled buttons, as such.</p>
<p><code>$(".ui-state-disabled").click(function(event) { event.preventDefault(); });</code></p>
<p>This code isn&#8217;t that robust &#8211; if you were to add or remove the ui-state-disabled class after page load (which I didn&#8217;t have to), you&#8217;d want to make sure to handle it appropriately. Either way, preventDefault() is definitely an elegant solution to disabling a click action.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/09/18/disabling-button-clicks-the-better-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Image Overlay 1.2</title>
		<link>http://www.ferretarmy.com/2009/09/09/jquery-image-overlay-1-2/</link>
		<comments>http://www.ferretarmy.com/2009/09/09/jquery-image-overlay-1-2/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 04:51:07 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Image Overlay]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=447</guid>
		<description><![CDATA[I&#8217;ve updated my image overlay plugin yet again, to version 1.2. Again, it was a fairly minor enhancement &#8211; I added the ability to turn off the animation via an option. The translucent image overlay effect is popping up all over the web nowadays, and I want to make sure that my plugin implementation offers [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my image overlay plugin yet again, to <a href="http://www.ferretarmy.com/files/jQuery/ImageOverlay/ImageOverlay.html">version 1.2</a>. Again, it was a fairly minor enhancement &#8211; I added the ability to turn off the animation via an option. The translucent image overlay effect is popping up all over the web nowadays, and I want to make sure that my plugin implementation offers as much as any other technique to achieve the overlay effect.</p>
<p>In other development, I&#8217;ve been trying to learn how to implement iPhone style gesture controls via JavaScript. I&#8217;ve been seriously spinning my wheels on this &#8211; my demo is turning out to be a dud, of sorts. It&#8217;s frustrating (especially the testing, which I can only do on my iPhone currently), but hopefully it comes together sooner or later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/09/09/jquery-image-overlay-1-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Image Overlay Plugin 1.1</title>
		<link>http://www.ferretarmy.com/2009/08/21/jquery-image-overlay-plugin-1-1/</link>
		<comments>http://www.ferretarmy.com/2009/08/21/jquery-image-overlay-plugin-1-1/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:12:35 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[Image Overlay]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=442</guid>
		<description><![CDATA[A quick note &#8211; I&#8217;ve updated my jQuery Image Overlay Plugin to version 1.1. This version adds support for pinning the overlay so it is always viewable (not just when you mouse over the image). There were no other changes, so you should be able to upgrade without worry.]]></description>
			<content:encoded><![CDATA[<p>A quick note &#8211; I&#8217;ve updated my <a href="http://www.ferretarmy.com/files/jQuery/ImageOverlay/ImageOverlay.html">jQuery Image Overlay Plugin</a> to version 1.1. This version adds support for pinning the overlay so it is always viewable (not just when you mouse over the image). There were no other changes, so you should be able to upgrade without worry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/08/21/jquery-image-overlay-plugin-1-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Determining Geolocation on the Web</title>
		<link>http://www.ferretarmy.com/2009/08/05/determining-geolocation/</link>
		<comments>http://www.ferretarmy.com/2009/08/05/determining-geolocation/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 18:49:18 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=433</guid>
		<description><![CDATA[Here&#8217;s a GeoLocator example I put together that showcases two popular GeoLocation techniques &#8211; IP lookup and using the GeoLocation API &#8211; in order to both demonstrate the techniques as well as to show the issues with each. In HTML, there are a few ways of determining the location of a user. Traditionally, this has [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.ferretarmy.com/files/geolocation/geolocator.html"><img class="size-full wp-image-434 aligncenter" title="Geolocator Tool" src="http://www.ferretarmy.com/wp-content/uploads/2009/08/geolocator.jpg" alt="Geolocator Tool" width="425" height="102" /></a></p>
<p>Here&#8217;s a <a href="http://www.ferretarmy.com/files/geolocation/geolocator.html">GeoLocator example</a> I put together that showcases two popular GeoLocation techniques &#8211; IP lookup and using the GeoLocation API &#8211; in order to both demonstrate the techniques as well as to show the issues with each.</p>
<p>In HTML, there are a few ways of determining the location of a user. Traditionally, this has always been accomplished by IP lookup &#8211; a lookup is performed with your IP against a database of known IP locations. This technique leaves a lot to be desired, but it&#8217;s been all that&#8217;s been available for a very long time.</p>
<p>In HTML5, however, there&#8217;s a new <a href="http://dev.w3.org/geo/api/spec-source.html">Geolocation API</a>. The gist of this feature is that instead of relying on IP address lookup, the browser will instead interrogate the device for this information. This allows devices that have native geolocation hardware (GPS receivers and Wifi antennas, for example) to be able to pass their known location to the browser. Many web-enabled devices of today already provide support for this feature, including the iPhone, the Palm Pre, Android phones, and some netbooks.</p>
<p>The problem with all these methods, however, is that none of them just work on all devices. IP lookup works best in the workplace, but it doesn&#8217;t work as well for home users and doesn&#8217;t work at all for mobile users, as it pretty much requires a stationary device (amongst other things). The Geolocation API is not supported in all browsers yet (with the major notable holdout being all versions of Internet Explorer), and it tends not to work well on devices that don&#8217;t have built-in GPS capabilities (which the bulk of desktop and laptop devices still aren&#8217;t equipped with).</p>
<p>Worse yet, when location is returned via any technique, it is often inaccurate. In my case, IP lookup and Geolocation lookup provide locations that are over 10 miles away from each other! That&#8217;s not a discrepancy that can be resolved in many cases.</p>
<p>In the longer term, the Geolocation API is almost certainly the way to go. When it is fully supported, it is the most accurate method available. Today, though, the landscape is still fractured and implementing accurate geolocation is not trivial on the web.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/08/05/determining-geolocation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Theme, Digging Into WordPress</title>
		<link>http://www.ferretarmy.com/2009/07/28/new-theme-digging-into-wordpress/</link>
		<comments>http://www.ferretarmy.com/2009/07/28/new-theme-digging-into-wordpress/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 23:44:34 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[webkit]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css animation]]></category>
		<category><![CDATA[rgba]]></category>

		<guid isPermaLink="false">http://www.ferretarmy.com/?p=430</guid>
		<description><![CDATA[I just recently changed to a new theme for my site. Since then, I&#8217;ve been doing my first real digging into the internals of how theming works and how to talk to the back end of WordPress. It&#8217;s been a suprisingly pleasant venture &#8211; all your content is easily accessible and the interface is clean. [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently changed to a <a href="http://www.dailyblogtips.com/studiopress-wordpress-theme-released/">new theme</a> for my site. Since then, I&#8217;ve been doing my first real digging into the internals of how theming works and how to talk to the back end of WordPress. It&#8217;s been a suprisingly pleasant venture &#8211; all your content is easily accessible and the interface is clean. I&#8217;m just starting to learn PHP (from a .NET background), and it&#8217;s been nice to find that I can hack around and usually get the code right on the first or second try.</p>
<p>I&#8217;ve also been making some progressive enhancements to the site at the same time. If you came in via a webkit-based browser, you&#8217;ll hopefully notice the webkit-only light blue gradient behind post titles, as opposed to a solid color. I also animated the RSS button in the upper right hand corner to grow 10% larger on hover. These are examples of ways to embrace progressive flourishes on your site without breaking the experience for anyone. Next up, I&#8217;m going to incorporate rgba into the footer somehow. Hope you enjoy the new layout!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ferretarmy.com/2009/07/28/new-theme-digging-into-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

