<?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>Karl Stanton</title>
	<atom:link href="http://karlstanton.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://karlstanton.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 09 Mar 2010 14:24:18 +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>Chelsea &#8211; NYC</title>
		<link>http://karlstanton.com/2010/03/chelsea-nyc/</link>
		<comments>http://karlstanton.com/2010/03/chelsea-nyc/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 14:24:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/03/chelsea-nyc/</guid>
		<description><![CDATA[


Chelsea, originally uploaded by Lynt.


Looking up at Chelsea, back in January, 2010.
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4405746518/" title="photo sharing"><img src="http://farm5.static.flickr.com/4026/4405746518_1f1da08f9c.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4405746518/">Chelsea</a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
Looking up at Chelsea, back in January, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/03/chelsea-nyc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plow</title>
		<link>http://karlstanton.com/2010/02/plow/</link>
		<comments>http://karlstanton.com/2010/02/plow/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 00:20:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/02/plow/</guid>
		<description><![CDATA[


, originally uploaded by Lynt.


The snow plow tries to keep the streets clean&#8230; its work was cut out!
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4376444001/" title="photo sharing"><img src="http://farm3.static.flickr.com/2733/4376444001_7f32d00991.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4376444001/"></a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
The snow plow tries to keep the streets clean&#8230; its work was cut out!</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/02/plow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Williamsburg Bridge</title>
		<link>http://karlstanton.com/2010/02/williamsburg-bridge/</link>
		<comments>http://karlstanton.com/2010/02/williamsburg-bridge/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:11:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/02/williamsburg-bridge/</guid>
		<description><![CDATA[


, originally uploaded by Lynt.


Out in the snow storm of last week&#8230; I love the way the light is warped thanks to the snow on my lens.
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4353886353/" title="photo sharing"><img src="http://farm5.static.flickr.com/4006/4353886353_efe1107395.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4353886353/"></a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
Out in the snow storm of last week&#8230; I love the way the light is warped thanks to the snow on my lens.</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/02/williamsburg-bridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fuzzy</title>
		<link>http://karlstanton.com/2010/02/fuzzy/</link>
		<comments>http://karlstanton.com/2010/02/fuzzy/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 04:11:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/02/fuzzy/</guid>
		<description><![CDATA[


, originally uploaded by Lynt.


We took a walk through the winter haze&#8230; my lens caught some flurries.
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4347343469/" title="photo sharing"><img src="http://farm3.static.flickr.com/2772/4347343469_93e20a2f48.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4347343469/"></a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
We took a walk through the winter haze&#8230; my lens caught some flurries.</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/02/fuzzy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dusk</title>
		<link>http://karlstanton.com/2010/02/dusk/</link>
		<comments>http://karlstanton.com/2010/02/dusk/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 04:23:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/02/dusk/</guid>
		<description><![CDATA[


Dusk, originally uploaded by Lynt.


Sunset in Tokyo
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4328759261/" title="photo sharing"><img src="http://farm5.static.flickr.com/4018/4328759261_0fd9739187.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4328759261/">Dusk</a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
Sunset in Tokyo</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/02/dusk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dawn</title>
		<link>http://karlstanton.com/2010/02/dawn/</link>
		<comments>http://karlstanton.com/2010/02/dawn/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 04:23:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/02/dawn/</guid>
		<description><![CDATA[


Dawn, originally uploaded by Lynt.


Sunrise in Tokyo
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/lynt/4328753177/" title="photo sharing"><img src="http://farm5.static.flickr.com/4050/4328753177_2f3dc81078.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4328753177/">Dawn</a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span>
</div>
<p>
Sunrise in Tokyo</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/02/dawn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s been a while (again).</title>
		<link>http://karlstanton.com/2010/01/its-been-a-while/</link>
		<comments>http://karlstanton.com/2010/01/its-been-a-while/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 04:26:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blabber]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2010/01/its-been-a-while/</guid>
		<description><![CDATA[
, originally uploaded by Lynt.
I figure I might as well make use of the Wordpress x Flickr capabilities and start blogging my adventures once again.
I&#8217;ve been busy.
I&#8217;ve also been in Japan&#8230; hopefully I can revive this blog over the coming weeks&#8230;
]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;"><a title="photo sharing" href="http://www.flickr.com/photos/lynt/4252049471/"><img style="border: solid 2px #000000;" src="http://farm5.static.flickr.com/4032/4252049471_ebdd28c7a8.jpg" alt="" /></a></p>
<p><span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/lynt/4252049471/"></a>, originally uploaded by <a href="http://www.flickr.com/people/lynt/">Lynt</a>.</span></div>
<p>I figure I might as well make use of the Wordpress x Flickr capabilities and start blogging my adventures once again.</p>
<p>I&#8217;ve been busy.</p>
<p>I&#8217;ve also been in Japan&#8230; hopefully I can revive this blog over the coming weeks&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2010/01/its-been-a-while/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorry, it&#8217;s been a while&#8230;</title>
		<link>http://karlstanton.com/2009/10/sorry-its-been-a-while/</link>
		<comments>http://karlstanton.com/2009/10/sorry-its-been-a-while/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 18:14:44 +0000</pubDate>
		<dc:creator>karl</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Archipelago]]></category>
		<category><![CDATA[Stockholm]]></category>
		<category><![CDATA[Sweden]]></category>

		<guid isPermaLink="false">http://karlstanton.com/?p=404</guid>
		<description><![CDATA[
Sorry it&#8217;s been so long. I&#8217;ve been busy, stressed, and more stressed. My company took us out to the Stockholm Archipelago last week, it was breath taking.
More news in the next few days&#8230;  
]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://farm3.static.flickr.com/2647/4014102513_2d3472d514_b.jpg" title="Archipelago" class="aligncenter" width="660" /></p>
<p>Sorry it&#8217;s been so long. I&#8217;ve been busy, stressed, and more stressed. My company took us out to the Stockholm Archipelago last week, it was breath taking.</p>
<p>More news in the next few days&#8230; <img src='http://karlstanton.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2009/10/sorry-its-been-a-while/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom AJAX Wrapper for jQuery</title>
		<link>http://karlstanton.com/2009/10/custom-ajax-wrapper-for-jquery/</link>
		<comments>http://karlstanton.com/2009/10/custom-ajax-wrapper-for-jquery/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 18:13:14 +0000</pubDate>
		<dc:creator>karl</dc:creator>
				<category><![CDATA[Geekisms]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://karlstanton.com/?p=393</guid>
		<description><![CDATA[I write a lot of my Javascript with the help of jQuery, and one of it&#8217;s finest features is it&#8217;s extensibility and powerful internal functions. For larger sites, especially portals, AJAX can become messy if it&#8217;s not controlled, and when things get out of hand, it&#8217;s often hard to trawl through your scripts to make [...]]]></description>
			<content:encoded><![CDATA[<p>I write a lot of my Javascript with the help of jQuery, and one of it&#8217;s finest features is it&#8217;s extensibility and powerful internal functions. For larger sites, especially portals, AJAX can become messy if it&#8217;s not controlled, and when things get out of hand, it&#8217;s often hard to trawl through your scripts to make changes.</p>
<p>That&#8217;s one of the reasons why I wrote (and use almost daily) my custom AJAX wrapper for jQuery.</p>
<p><strong>The idea.</strong><br />
Centralize one $.ajax() method, and have methods external to jQuery control the data and callback methods before firing.</p>
<p>This allows for a global wrapper on all before and callback methods in case you need to do things like: show loading animations, run site statistics, setup error handling, etc.</p>
<p><strong>The code.</strong><br />
I like to use namespaces in my projects, so I will be giving you a basic outline of a namespace setup, and then how an external function can interact with the global AJAX method. </p>
<p>I will base the example loosely on a CRUD schema.</p>
<pre class="js">
// Create our namespace
var Website = {};

/**
 * Outline our webservices
 * @param {String} action - AJAX action to perform
 * @param {Object} payload - Javascript object containing AJAX method properties
 */
Website.Webservice = function (action, payload) {

    switch (action){

    case 'create':
        payload.type = 'POST';
        payload.url = '/ajax/create_data.php';
        break;

    case 'read':
        payload.type = 'GET';
        payload.url = '/ajax/get_data.php';
        break;

    case 'update':
        payload.type = 'POST';
        payload.url = '/ajax/update_data.php';
        break;

    case 'delete':
        payload.type = 'POST';
        payload.url = '/ajax/delete_data.php';
        break;
    }

    // Call the global AJAX method
    Website.AJAX(payload);

}

/**
 * Fires off the AJAX object with user defined payload information.
 * @param {Object} payload	- AJAX data options to bind to the jQuery object
 */
Website.WebService.AJAX = function (payload) {

    // If dataType wasn't specified in the payload, default to 'html'
    var dataType = (payload.dataType !== undefined) ? payload.dataType : 'html';

    // jQuery AJAX object
    $.ajax({

        // Normal properties
        type: payload.type,
        url: payload.url,
        data: payload.data,
        dataType: dataType,

        // Global beforeSend wrapper with user defined function
        beforeSend: function () {

            // Do global here
            if (typeof payload.beforeSend === 'function'){
                payload.beforeSend();
            }

        },

        // Global success wrapper with user defined function
        success: function (data) {

            // Do global here
            if (typeof payload.success === 'function') {
                payload.success(data);
            }

        }
    });

};
</pre>
<p>Now that I have set up our basic framework, I can fire off any AJAX request with minimal code, and abstract any intense data mining functions and other methods from our AJAX process. This allows for clean and controllable code.</p>
<pre class="js">
/**
 * Some function or event that fires off AJAX
 * @param {Object} data - Javascript object containing user data
 */
var updateUserData = function (data) {

    // Create the AJAX property object
    var bundle = {

        data: {
            'user_id': data.user_id,
            'user_email': data.user_email,
            'user_firstname': data.user_firstname,
            'user_lastname': data.user_lastname
        },

        beforeSend: showSpinningLoader,

        // Success callback function
        success: onRefreshSuccess

    };

    // Fire the bundle off
    Website.WebService('update', bundle);

};
</pre>
<p>And there you have it. Simple and easy to use. Now you can trigger AJAX from anywhere in your application with all processes centralized.</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2009/10/custom-ajax-wrapper-for-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My hood</title>
		<link>http://karlstanton.com/2009/09/my-hood/</link>
		<comments>http://karlstanton.com/2009/09/my-hood/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:57:26 +0000</pubDate>
		<dc:creator>karl</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Stockholm]]></category>
		<category><![CDATA[Sunset]]></category>
		<category><![CDATA[Sweden]]></category>

		<guid isPermaLink="false">http://karlstanton.com/2009/09/my-hood/</guid>
		<description><![CDATA[
Looking lovely in the Swedish sunset.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/lynt/3923451787/"><img alt="" src="http://farm3.static.flickr.com/2662/3923451787_0dd9c1f0ce.jpg" title="St:Eriksplan" class="aligncenter" width="500" height="333" /></a></p>
<p>Looking lovely in the Swedish sunset.</p>
]]></content:encoded>
			<wfw:commentRss>http://karlstanton.com/2009/09/my-hood/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
