<?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>Jeffrey Sambells &#187; Non-Mobile</title>
	<atom:link href="http://jeffreysambells.com/category/non-mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffreysambells.com</link>
	<description>Geek out AFK</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:00:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>&#9734; Now and Then &#8212; What&#8217;s On My Desk</title>
		<link>http://jeffreysambells.com/posts/2012/01/09/now-and-then-whats-on-my-desk/</link>
		<comments>http://jeffreysambells.com/posts/2012/01/09/now-and-then-whats-on-my-desk/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 16:46:53 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[Lion]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Non-Mobile]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[history]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=1412</guid>
		<description><![CDATA[I&#8217;ve written about my first computer before a Commodor 64 that my Dad brought home when I was very young. Since then, I&#8217;ve had many others and I thought it would be fun to fill you in on my computing history (in chronological order). Beginner: Commodore 64 Ah the good old Commodore 64 with it&#8217;s [...]<p><a href="http://jeffreysambells.com/posts/2012/01/09/now-and-then-whats-on-my-desk/">&#9734; Permalink</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://jeffreysambells.com/posts/2009/08/05/what-next-bits-and-bytes-of-memories/">written about my first computer before</a> a Commodor 64 that my Dad brought home when I was very young. Since then, I&#8217;ve had many others and I thought it would be fun to fill you in on my computing history (in chronological order).</p>

<h2>Beginner: <a href="http://en.wikipedia.org/wiki/Commodore_64">Commodore 64</a></h2>

<p>Ah the good old Commodore 64 with it&#8217;s dot matrix printer and mega floppy disks. I still remember the keyboard command chants I memorized as a child &#8220;shift-l-shift-o-shift-a-shift-d-space-shift-quote-shift-4-0-shift-4-comma-8-return-shift-l-shift-i-shift-s-shift-t-return or better know as</p>

<pre><code>LOAD "$0",8
LIST
</code></pre>

<p>The Commodore was more an assembly of different boxes that clicked and whirred more than a Kitchenaid mixer. My little fingers had to work extra hard to press the keys on the heaviest keyboard you could imagine.  A big steel case acted as a both a container for the parts and a stand for the TV/monitor. My big heavy steel joystick was well worn from hours of playing <a href="http://en.wikipedia.org/wiki/Jumpman">Jumpman</a> but wold probably still work today if I could find a DE9M to USB adapter (do those actually exist?). The funniest thing is the monitor is still alive, hooked up to a dusty old VCR in the basement of my in-laws along with an original Nintendo!</p>

<h2>Learning: <a href="http://en.wikipedia.org/wiki/Macintosh_LC">Macintosh LC</a></h2>

<p>The LC&#8217;s screen was tiny at 512&#215;384 but I didn&#8217;t care because it was a million times better than the Commodore. The LC gave me my first real experience with graphical computing and desktop publishing. I spent hours learning how to use it, breaking it and fixing it. I remember specifically preparing a repot for school, learning all the ins and outs of Page-Maker and document layout. I did so well that my teacher actually commented on how well done it was but also said that it looked like I had a lot of help (which I hadn&#8217;t)&#8212;a life lesson learned there.</p>

<p>A few years later in high school, I applied for a job in the composing department at the local newspaper. They still relied heavily on X-Acto knives and wax to assemble the 40 page bi-weekly paper but the expertise I built up at home, fiddling and working with the LC, gave me the knowledge to transition the paper to an entirely digital workflow, with a few networked <a href="http://en.wikipedia.org/wiki/Power_Macintosh_7200">Power Macintosh 7200</a>&#8216;s and some new <a href="http://en.wikipedia.org/wiki/IMac_G3">gumdrop iMac G3&#8242;s</a>.</p>

<h2>Creative: <a href="http://en.wikipedia.org/wiki/Power_Macintosh_7500">PowerMac 7500</a></h2>

<p>In the later years of high school my entrepreneurial bug hit and I decided to go into business for myself doing desktop publishing. The LC with the <a href="http://en.wikipedia.org/wiki/StyleWriter">Apple StyleWriter printer</a> wasn&#8217;t cutting it anymore so we acquired the Power Macintosh 7500 along with an <a href="http://en.wikipedia.org/wiki/Apple_AudioVision_14_Display">Apple AudioVision display</a>. This was a big heavy machine relative to the LC but it lasted many years and served it&#8217;s purpose well, earning me enough money to pay for university and continue my desktop publishing career. If you happen to have lived in southern Ontario and read the Nassagaweya News during the late 90&#8242;s it was designed and produced on this machine.</p>

<h3>Misfits</h3>

<p>At this same time, I also had a <a href="http://en.wikipedia.org/wiki/Power_Macintosh_5400#Power_Macintosh_5400">PowerMac 5400CD</a> and a <a href="http://en.wikipedia.org/wiki/Powerbook_140">PowerBook 140</a> that I&#8217;d acquired second hand. Neither were as powerful or as useful as the 7500 but served as a secondary and somewhat portable machines to work the growing pile of peripherals I was acquiring such as scanners, <a href="http://en.wikipedia.org/wiki/SyQuest_EZ_135_Drive">EZ Drives</a>, <a href="http://en.wikipedia.org/wiki/Zip_drive">Zip drives</a> and various printers.</p>

<h2>Student: <a href="http://en.wikipedia.org/wiki/PowerBook_2400">PowerBook 2400c</a></h2>

<p>I went to Ryerson University in Toronto, about an hour commute there and back everyday on the train. I didn&#8217;t want to waste the time staring out the window so I invested in the PowerBook 2400. This machine came without a CD drive which made it relatively small and was easy to carry in my bag. The unfortunate thing was that the battery malfunctioned after only a year and a half but I was unable to get it fixed because the model was only distributed in the US and I was in Canada. It worked well plugged in but lost the usefulness of a portable computer. It also lacked an ethernet port so when the internet was starting to become popular it eventually became a paperweight. I still have it and switch it on every once in awhile to remember the good old days of System 7.5.</p>

<h2>Entreprenure: <a href="http://en.wikipedia.org/wiki/Powermac_G4">PowerMac G4</a></h2>

<p>Near the end of university I started to get more serious about desktop publishing as a career and picked up a new G4 and a nice Lacie monitor. I had this great machine for several years, tinkering with upgrades and learning a lot about how computers work in general. Though it wasn&#8217;t really &#8220;portable&#8221; the case design with the handles allowed me to lug it back an forth to work every day (to the office of a web design company I started). Today, it still runs but is mainly used by my in-laws to sync their iPods with their music.</p>

<h2>Deskjob: <a href="http://en.wikipedia.org/wiki/Powermac_G5">PowerMac G5</a></h2>

<p>This wasn&#8217;t really &#8220;my&#8221; computer but was the one we acquired at work so that I could stop lugging my G4 back and forth. I lovingly nicknamed it the &#8220;wind tunnel&#8221; for the roaring sound it would make when all the fans kicked in. It didn&#8217;t happen often but when it did you could hear it four or five offices away from mine. It was a nice fast machine but I don&#8217;t think I ever really took advantage of the quad processors.</p>

<h2>Writer: <a href="http://en.wikipedia.org/wiki/MacBook_Pro">17&#8243; MacBook Pro (discrete)</a></h2>

<p>Along with the entrepreneurial bug, I also began writing so I needed something portable. The MacBook was great and had a beautiful monitor however, over time, I found it too large and bulky. Carrying around a 17&#8243; MacBook isn&#8217;t comfortable long term and I never found the 17&#8243; necessary when I was away from my desk. A smaller screen and bigger external monitor is a much better solution.</p>

<h2>Family: <a href="http://en.wikipedia.org/wiki/IMac">27&#8243; iMac (Late 2011)</a></h2>

<p>With kids and a wife also wanting a decent computer at home, I&#8217;m now using a new 27&#8243; iMac. I really like the Machine, the monitor is wonderful but I&#8217;m kicking myself for not getting the SSD option. At the time I&#8217;d had never used SSD and didn&#8217;t understand the performance increase it provides. If your considering an upgrade definitely, without thought, choose the SSD option. It will make a world of difference.</p>

<h2>Professional: <a href="http://en.wikipedia.org/wiki/MacBook_air">13&#8243; MacBook Air (Late 2011)</a></h2>

<p>This is my current Mac and probably the best Mac I&#8217;ve ever had. The size makes it extremely portable and light but still useful perfectly useful on the go in PhotoShop or XCode. With the SSD drive it feels much faster than my iMac for daily tasks. The only time is feels slower is when I&#8217;m doing a processor intensive task such as encoding a movie. If you&#8217;re looking for a new Mac I&#8217;d highly recommend trying and Air.</p>

<p>Mixed in with the above were several other machines that belonged to either my parents, sister or in-laws which included 4 different gumdrop iMacs,  a Clamshell iBook, a SuperMac clone and some <a href="http://en.wikipedia.org/wiki/Macintosh_SE">Macintosh SE</a>&#8216;s and several <a href="http://en.wikipedia.org/wiki/Macintosh_IIcx">IIcx</a>&#8216;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2012/01/09/now-and-then-whats-on-my-desk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#9734; Exporting Mail.app XML Feeds to Google Reader</title>
		<link>http://jeffreysambells.com/posts/2010/06/23/exporting-mail-app-xml-feeds-to-google-reader/</link>
		<comments>http://jeffreysambells.com/posts/2010/06/23/exporting-mail-app-xml-feeds-to-google-reader/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 02:27:55 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Non-Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=683</guid>
		<description><![CDATA[RSS feeds are awesome for keeping up-to-date on the latest news and posts from your favourite sites. Up until now I&#8217;ve been using Mail.app as my primary RSS reader&#8212;and I really like it&#8212;but with an iPad and an iPhone always nearby, I&#8217;ve been meaning to set up Reeder instead. Reeder uses Google Reader as a [...]]]></description>
			<content:encoded><![CDATA[<p>RSS feeds are awesome for keeping up-to-date on the latest news and posts from your favourite sites. Up until now I&#8217;ve been using Mail.app as my primary RSS reader&#8212;and I really like it&#8212;but with an <a href="http://apple.com/ipad">iPad</a> and an <a href="http://apple.com/iphone">iPhone</a> always nearby, I&#8217;ve been meaning to set up <a href="http://reederapp.com/">Reeder</a> instead.</p>

<p>Reeder uses <a href="http://www.google.com/reader">Google Reader</a> as a backend but there wasn&#8217;t an easy way to export my Mail.app RSS feeds into Google Reader&#8212;until I wrote the little script below to do it for me.</p>

<p>This PHP script reads the Mail.app settings and generates a <code>MailAppToGoogleReader.opml</code> file suitable for importing directly into Google Reader&#8217;s settings pane. All you have to do is copy the script to a file such as <code>MailToGoogleReader.php</code> and run the Terminal command:</p>

<pre><code>$ php -e MailToGoogleReader.php
</code></pre>

<p>Now I can sit back and relax with Reeder on the iPad.</p>

<pre><code>&lt;?php

$opml = '&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;opml version="1.0"&gt;
&lt;head&gt;
&lt;dateCreated&gt;'.date('d-M-Y').'&lt;/dateCreated&gt;
&lt;/head&gt;
&lt;body&gt;
';

foreach (glob("/Users/jsambells/Library/Mail/RSS/*/Info.plist") as $plist) {
    $xml = new SimpleXmlElement(file_get_contents($plist));
    $results = $xml-&gt;xpath('//plist/dict[1]/key[.="RSSFeedURLString"]/following-sibling::*[1]/text()');
    $url = (string)$results[0][0];

    $opml .= '&lt;outline type="rss" xmlUrl="' . $url . '"/&gt;' . "\n";
}

$opml .= '
&lt;/body&gt;
&lt;/head&gt;
';

file_put_contents( "MailAppToGoogleReader.opml", $opml );

echo "done!";
`open .`;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2010/06/23/exporting-mail-app-xml-feeds-to-google-reader/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#9734; Rapid Web Development with the prototype library</title>
		<link>http://jeffreysambells.com/posts/2006/03/13/rapid-web-development-with-the-prototype-library/</link>
		<comments>http://jeffreysambells.com/posts/2006/03/13/rapid-web-development-with-the-prototype-library/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 18:12:50 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Non-Mobile]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/posts/2006/03/13/rapid-web-development-with-the-prototype-library/</guid>
		<description><![CDATA[While I work on tweaking the design of the site, I though I&#8217;d just write a quick opinion piece. Iâ€˜ve been experimenting with a variety of libraries lately to see whatâ€™s out there on the web. One bit of internet goodness Iâ€™ve been using a lot is Prototype, the JavaScript library made popular by Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>While I work on tweaking the design of the site, I though I&#8217;d just write a quick opinion piece. Iâ€˜ve been experimenting with a variety of libraries lately to see whatâ€™s out there on the web. One bit of internet goodness Iâ€™ve been using a lot is <a href="http://prototype.conio.net/">Prototype</a>, the JavaScript library made popular by <a href="http://www.rubyonrails.org">Ruby on Rails</a> and the <a href="http://en.wikipedia.org/wiki/AJAX">AJAX</a> boom several months ago. Prototype touts itself as:</p>

<blockquote>a JavaScript framework that aims to ease development of dynamic web applications. Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere</blockquote>

<p>But AJAX is far from the only thing that Prototype has going for it. It also provides a list of useful functions, the simplest (and my favorite) being the $() function to replace the document.getEementById() function &#8211; my keyboard is much happier! The downside is in the documentation. The doumentation is <b>very</b> lacking, almost non-existant, which is very annoying, but there are sites such as <a href="http://script.aculo.us">script.aculo.us</a> that are picking up the slack and providing some informed documentation. A quick google search will also reveal a lot of working examples you can learn from as well.</p>

<p>Aside from what it has to offer, I was impressed by it&#8217;s ease of use and simplicity while working on a recent idea. At work, we were starting to use paper and pens to track the time we were spending on each project. As a growing company, we need to know this information so that we can better adjust our quotes and estimates, but the time spent writing and tracking the information became tedious after only one week. thinking about it on my commute home from work one day I had a better idea. Enter Prototype and a JavaScript app.</p>

<p>Starting from a quick sketch, I was able to create a working app using an XHTML/Prototype user interface and PHP server side base, in less than an hour. It relied on 100% AJAX communication but it was for my personal use anyways so it didn&#8217;t matter. Quick, fast, simple, clean code and anything else I could ask for. Now tracking time is as simple as typing in a task and hitting go. No more fumbling with paper and pens.</p>

<div style="text-align:center"><img src="/img/posts/timetracker.gif" alt="Time Tracker"/></div>

<p>If you haven&#8217;t tried prototype yet I highly suggest you do. You&#8217;ll be up and running in minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2006/03/13/rapid-web-development-with-the-prototype-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#9734; A Theme in the Making</title>
		<link>http://jeffreysambells.com/posts/2006/03/10/a-theme-in-the-making/</link>
		<comments>http://jeffreysambells.com/posts/2006/03/10/a-theme-in-the-making/#comments</comments>
		<pubDate>Fri, 10 Mar 2006 13:00:35 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Non-Mobile]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/posts/2006/03/07/a-theme-in-the-making/</guid>
		<description><![CDATA[I&#8217;m playing with the theme to see how the wordpress stuff works. I tried to install it under another location but unless I install two databases as well, I can&#8217;t seem to mess with it because the stylesheets are referenced by full URL (strange). I&#8217;ll just play here and you&#8217;ll have to watch it change [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:center"><img src="/img/screen.jpg" alt="New WordPress Theme"/></div>

<p>I&#8217;m playing with the theme to see how the wordpress stuff works. I tried to install it under another location but unless I install two databases as well, I can&#8217;t seem to mess with it because the stylesheets are referenced by full URL (strange). I&#8217;ll just play here and you&#8217;ll have to watch it change over time.</p>

<p>It&#8217;s far from done right now so plesae bear with me as I learn. I won&#8217;t be breaking any links so bookmark as necessary, but the design still has a long way to go so please be kind.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2006/03/10/a-theme-in-the-making/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>&#9734; The key to centralized AJAX services</title>
		<link>http://jeffreysambells.com/posts/2006/03/06/centralized_ajax_services/</link>
		<comments>http://jeffreysambells.com/posts/2006/03/06/centralized_ajax_services/#comments</comments>
		<pubDate>Mon, 06 Mar 2006 17:00:01 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Non-Mobile]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/posts/2006/03/06/centralized_ajax_services/</guid>
		<description><![CDATA[The Problem: Same Origin While working on a top secret project at We-Create, I was faced with a road block regularily encountered by many web developers: the &#8216;Same Origin&#8216; security policy. Simply put, it&#8217;s the security restrictions in the web browser that confines actions to the same domain where the page is located. For example, [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem: Same Origin</h2>

<p>While working on a <em>top secret</em>  project at We-Create, I was faced with a road block regularily encountered by many web developers: the &#8216;<a href="http://www.mozilla.org/projects/security/components/same-origin.html">Same Origin</a>&#8216; security policy. Simply put, it&#8217;s the security restrictions in the web browser that confines actions to the same domain where the page is located.  For example, in accordance with the policy, JavaScript running on this page in Jeffreysambells.com should only communicate with JeffreySambells.com and be denied access to any other domains. Usually this isn&#8217;t a problem as the policy doesn&#8217;t apply to loading non dynamic objects such as images from other domains, and most AJAX requests will be between the browser and JeffreySambells.com. As well, to protect against <a href="http://httpd.apache.org/info/css-security/">Cross Site Scripting</a> (XSS), it makes sense to disallow seemingly random requests to other domains. The problem arises in places such as my <em>top secret</em> project where I require a centralized data service on one domain which communicated via AJAX with pages viewed on other domains. With the &#8216;Same Origin&#8217; security policy this isn&#8217;t possible using any traditional AJAX methods! But it is possible with a little JavaScript trickery.
<span id="more-4"></span>
The most common AJAX methods use the XmlHttpRequest object or the Microsoft equivalent ActiveX object to make requests. If you try to pass in a full URL to another domain, both will error, denying access to your request. Similarly, some people have been crafty and attempted to use an embedded &lt;iframe&gt; window to retrieve their data from another server. This can be somewhat successful as you can load an external domain using the iframe and pass in any GET parameters you like, but you can only <strong>submit</strong> data this way, <strong>not retrieve it</strong>.</p>

<h2>The Solution: XssHttpRequest</h2>

<p>To overcome the Same Origin policy, I had to revert back to an &#8216;old-school&#8217; way of doing AJAX and create an XssHttpRequest JavaScript object that dynamically inserts &lt;script&gt; tags to load external JavaScript. This works because the script tag&#8217;s src attribute isn&#8217;t bound by the Same Origin policy. We&#8217;ve all used it to load javascript from thrid party sources such as the Google Maps API and similarily that&#8217;s what we&#8217;re doing, only dynamically.</p>

<h3>Advantages of using XssHttpRequest</h3>

<ul>
    <li>Allows Cross Domain AJAX</li>
    <li>Compatible with most popular browsers</li>
    <li>Implemented object can use similar methods to standard AJAX objects</li>
</ul>

<h3>Disadvantages of using XssHttpRequest</h3>

<ul>
    <li>You need to control the response end or create a server side tunnel using cURL or WGet</li>
    <li>Can only load valid JavaScript</li>
    <li>You can only request using GET, not POST</li>
</ul>

<p><a class="getSource" href="/code/XssHttpRequest/XssHttpRequest.js">Get the XssHttpRequest source now</a></p>

<p>To overcome the disadvantages listed above, the XssHttpRequest object sends a variable name with it&#8217;s request. The responding script then only needs to return a JavaScript source file that defines the supplied variable. The flow is illustrated in the following diagram:
<img alt="XssHttpRequest Flow Diagram" src="/code/XssHttpRequest/XssHttpRequestDiagram.jpg" /></p>

<h2>A Working Example</h2>

<p>To see it work for yourself, I&#8217;ve setup a simple test script here on JeffreySambells.com. The following PHP script is hosted here at <a href="http://jeffreysambells.com/code/XssHttpRequest/response.php?XssHttpRequestVar=XssHttpRequest1Loaded">http://JeffreySambells.com/code/XssHttpRequest/response.php</a>:</p>

<pre>&lt;?
$script = &lt;&lt;&lt;JAVASCRIPT
    alert('Hello World from {$_SERVER['SERVER_NAME']}');
JAVASCRIPT;
echo 'var '.$_GET['XssHttpRequestVar'].' = "'.addslashes($script).'" ;';
?&gt;</pre>

<p>Download the <a href="/code/XssHttpRequest/XssHttpRequest.js">source for the XssHttpRequest object</a> and use it the same way you would the XmlHttpRequest object:</p>

<pre>&lt;script type="text/javascript"&gt;

//include source for XssHttpRequest from link above

function doRequest() {
    request = new XssHttpRequest();
    request.open("GET", "http://jeffreysambells.com/code/XssHttpRequest/response.php", true);
    request.onreadystatechange=function() {
        if(request.readyState==4) {
            alert('Completed request: ' + request.responseText);
            eval(request.responseText); //execute the javascript.
        }
    }
    request.send(null);
}

window.onload=doRequest;

&lt;/script&gt;
</pre>

<p>Now, when the page loads you should see a JavaScript alert of the responseText and a second alert that says &#8216;Hello World from JeffreySambells.com&#8217;. In the above example I&#8217;ve eval()&#8217;d the responseText to do this, but you could easily return and XML file and then parse the XML as nesessary! Just remember that the respons needs to be valid JavaScript, but the JavaScript can define whatever you want.</p>

<p>The example illustrated here is simple but it proves data from JeffreySambells.info was loaded into your web page. Loading data from another domain is the key to a centralized AJAX service so start building your centralized services now! Feel free to use and modify the XssHttpRequest object to suit your needs, I only ask that you let me know of any improvments so that I may improve the script here and let me know if you use it in a project so I can link back to your project as an example.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2006/03/06/centralized_ajax_services/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>&#9734; This site has no navigation</title>
		<link>http://jeffreysambells.com/posts/2006/02/28/this-site-has-no-navigation/</link>
		<comments>http://jeffreysambells.com/posts/2006/02/28/this-site-has-no-navigation/#comments</comments>
		<pubDate>Tue, 28 Feb 2006 14:00:54 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Non-Mobile]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/posts/2006/02/27/this-site-has-no-navigation/</guid>
		<description><![CDATA[Today I decided to work on a design for this site. I&#8217;ve always disliked designing for myself. None of the work I do for myself ever seems to meet the high expectations I want to achieve for my own personal self expression. After abandoning several attempts, I poked through the WordPress theme repository and fingered [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to work on a design for this site. I&#8217;ve always disliked designing for myself. None of the work I do for myself ever seems to meet the high expectations I want to achieve for my own personal self expression. After abandoning several attempts, I poked through the WordPress theme repository and fingered through my worn copy of &#8216;the Zen of CSS Design&#8217; to try and absorb a bit of visual inspiration. With renewed motivation, I popped open an empty PhotoShop document and went to work, only to end in yet another unsatisfying attempt. Frustrated, I took a step back and stared at the mess of designs in front of me. Suddenly I realized where I was going wrong. <strong>It&#8217;s all in the navigation!</strong>
<span id="more-7"></span>
I&#8217;ve worked for several years on corporate intranet and web sites. Most of them, if not all, focused on the navigation as the central element of the design. In fact, every design started with the navigation bar and the design expanded out from there. It may have been the presentation of tree flow diagram prior to the design, or that I was also closely linked to the code development of the site, but &#8216;navigation first&#8217; seems to be the way most of my designs worked. I admit, this approach is not the perfect way to design, but it works for sites that have large, complicated, and multi-layered navigation. When information is buried deep in a site, you need to focus on getting the users there quick, so navigation needs to be a big focal point.</p>

<p>The realization I had with the design for this site was that I <em>don&#8217;t</em> want to focus on the navigation at all, I want to focus on the <em>content</em>. Specifically, I want to focus the audience to the article that was most recently posted (Maybe even the one you&#8217;re reading now). Sure all the posts will be linked so you can still easily find them by searching or browsing the categories, but the one you probably came to read will be the one at the top of the home page so you&#8217;re not going to use a navigation bar to get there! There&#8217;s no real need for me to highlight how to get to my past archives. I&#8217;ll link to them somewhere so you could find them, but if you came to see something I wrote a while back, you either know what it&#8217;s about and where to find it, or you came here via hyperlink from a search engine or another site. Whichever way you got here, you&#8217;re probably going to find what your looking for without a heavy navigation bar.</p>

<p>As of now, the site still has one of the great WordPress themes (<a href="http://themes.wordpress.net/?view_type=slideshow&amp;item_type=latest&amp;page_number=3&amp;count_per_page=12">KISS</a> I believe) but soon I&#8217;ll be re-doing the design yet again, only this time I&#8217;ll focus on highlighting the content rather than navigation so check back soon for JeffreySambells.com v1. Maybe this attempt will be successful!</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2006/02/28/this-site-has-no-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#9734; GEvent order of events</title>
		<link>http://jeffreysambells.com/posts/2006/02/24/gevent-order-of-events/</link>
		<comments>http://jeffreysambells.com/posts/2006/02/24/gevent-order-of-events/#comments</comments>
		<pubDate>Sat, 25 Feb 2006 00:47:51 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Non-Mobile]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/posts/2006/02/24/gevent-order-of-events/</guid>
		<description><![CDATA[One of the nice features of the Google Map&#8217;s API is that you can add your own event listeners to do things when certain events are triggered on the map. It&#8217;s quite easy to do using either the GEvent.addListener() or the GEvent.bind() methods, but tying to guess the exact order the events will trigger is [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice features of the Google Map&#8217;s API is that you can add your own event listeners to do things when certain events are triggered on the map. It&#8217;s quite easy to do using either the <a target="_blank" title="GEvent.addListener()" href="http://www.google.com/apis/maps/documentation/#GEvent_code_">GEvent.addListener()</a> or the <a target="_blank" title="GEvent.bind()" href="http://www.google.com/apis/maps/documentation/#GEvent_code_">GEvent.bind()</a> methods, but tying to guess the exact order the events will trigger is a whole different story.</p>

<p>I was recently working on a project that required the map to fetch points within the viewport after it had been moved or dragged. This is easy enough to do by adding a listener for the <em>moveEnd</em> event and using the  GXmlHttp object to query the server, but things didn&#8217;t go so smoothly once I started zooming the map in and out. When zooming out, the points that cam back were only within the original window at the previous zoom, not the new zoom. I tracked the problem down to the fact that the map triggers the <em>moveEnd</em> event <strong>prior</strong> to triggering the <em>zoom</em> event so my map was fetching point before the zoom!</p>

<p>I started to wonder just what the order of events where so I whipped up <a title="Google maps event listener order" href="/code/Google_Maps_event_listener_order">this little map</a> to capture the order. Basically it&#8217;s just has an event listener for each possible event so just click, move and zoom to see what happens. It can be very enlightening to see just what events are triggered at which times. (Just for fun I&#8217;ve also included some of the undocumented events)</p>

<p><a title="Google maps event listener order" href="/code/Google_Maps_event_listener_order">Check out the map</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2006/02/24/gevent-order-of-events/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

