<?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>GC &#187; Uncategorized</title>
	<atom:link href="http://gavincoop.co.uk/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://gavincoop.co.uk</link>
	<description>Seeing how long he can blog for without getting bored...</description>
	<lastBuildDate>Tue, 04 May 2010 14:24:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Debugging JavaScript on the iPhone</title>
		<link>http://gavincoop.co.uk/2010/05/04/debugging-javascript-on-the-iphone/</link>
		<comments>http://gavincoop.co.uk/2010/05/04/debugging-javascript-on-the-iphone/#comments</comments>
		<pubDate>Tue, 04 May 2010 14:24:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://gavincoop.co.uk/?p=114</guid>
		<description><![CDATA[Quick tip, if your trying to debug your web app on the iPhone simulator or a device you can switch on the Debug console by going into Settings &#62; Safari &#62; Developer. It&#8217;s all explained in the Safari Web Content Guide written by the nice people at Apple.
]]></description>
			<content:encoded><![CDATA[<p>Quick tip, if your trying to debug your web app on the iPhone simulator or a device you can switch on the Debug console by going into Settings &gt; Safari &gt; Developer. It&#8217;s all explained in the <a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html#//apple_ref/doc/uid/TP40006515-SW1">Safari Web Content Guide</a> written by the nice people at Apple.</p>
]]></content:encoded>
			<wfw:commentRss>http://gavincoop.co.uk/2010/05/04/debugging-javascript-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Singleton Pattern</title>
		<link>http://gavincoop.co.uk/2010/04/23/javascript-singleton-pattern/</link>
		<comments>http://gavincoop.co.uk/2010/04/23/javascript-singleton-pattern/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 08:48:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gavincoop.co.uk/?p=111</guid>
		<description><![CDATA[It may have taken 15/20 minutes of Google&#8217;ing to find an actual Singleton Pattern replicated in JavaScript, but it was worth it. Anyway I thought I would share. Thanks to this post for giving me what I wanted! Most of the answers Google turfed up for me didn&#8217;t return a persistent object, which is required [...]]]></description>
			<content:encoded><![CDATA[<p>It may have taken 15/20 minutes of Google&#8217;ing to find an actual <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton Pattern</a> replicated in JavaScript, but it was worth it. Anyway I thought I would share. Thanks to <a href="http://stackoverflow.com/questions/1479319/simplest-cleanest-way-to-implement-singleton-in-javascript">this post</a> for giving me what I wanted! Most of the answers Google turfed up for me didn&#8217;t return a persistent object, which is required by the Singleton Pattern. You can learn more about patterns in JavaScript with <a href="http://www.amazon.com/gp/product/159059908X/ref=cm_li_v_cd_d?tag=linkedin-20">Pro JavaScript Design Patterns</a>, although be warned it&#8217;s a very fast paced book and expects you to have a very good aptitude for learning. I have had to re-read some of the pages more than three times to understand precisely what&#8217;s going on, there is no doubt that the author is an exceptional JavaScript developer, but he explains things so quickly it&#8217;s almost like he presume you should know it already.</p>
<p>The Singleton Pattern</p>
<pre>var Application = window.Application || {}; // Creates a <a href="http://snook.ca/archives/javascript/javascript_name/">namespace</a> called Application.

Application.Config = function () {
    var instance = (function () {
        var privateVar;

        function privateMethod() {
            return 'privateMethod';
        }

        return { // Public interface.
            publicMethod: function () {
                return privateMethod();
            }
        }
    })();

    Application.Config = function() {
        return instance;
    }

    return Application.Config();
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://gavincoop.co.uk/2010/04/23/javascript-singleton-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
