<?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>Island Smooth</title>
	<atom:link href="http://www.islandsmooth.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.islandsmooth.com</link>
	<description>Web design and development by James Drummond</description>
	<lastBuildDate>Tue, 09 Aug 2011 19:14:12 +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>Dynamically create a table from a template with javascript and underscore.js</title>
		<link>http://www.islandsmooth.com/2011/08/create-a-dynamic-table-from-a-template-with-javascript-and-underscore-js/</link>
		<comments>http://www.islandsmooth.com/2011/08/create-a-dynamic-table-from-a-template-with-javascript-and-underscore-js/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 18:39:16 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[underscore.js]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=577</guid>
		<description><![CDATA[Use client side templating with underscore.js to dynamically create your HTML.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2011%2F08%2Fcreate-a-dynamic-table-from-a-template-with-javascript-and-underscore-js%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2011%2F08%2Fcreate-a-dynamic-table-from-a-template-with-javascript-and-underscore-js%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The chances are that if you&#8217;ve been working with javascript, jquery and AJAX for any time then you&#8217;ve inserted snippets or blobs of html into the DOM using something along the lines of:</p>
<pre class="brush: jscript;">
var data = [...]; // Some array

var html = &quot;&lt;table id='dataTable'&gt;&quot;;
html += &quot;&lt;tr&gt;&lt;th&gt;First Name&lt;/th&gt;&lt;th&gt;Last name&lt;/th&gt;&lt;/tr&gt;&quot;;

for (var i = 0; i &lt; data.length; i++){
    html += &quot;&lt;tr&gt;&lt;td&gt;&quot; + data.firstname + &quot;&lt;/td&gt;&lt;td&gt;&quot;
          + data.lastname + &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
}

html += &quot;&lt;/table&gt;&quot;;

$('#myDiv').html(html);
</pre>
<p>And for small snippets of HTML why not?</p>
<p>The trouble starts when you start inserting larger chunks of html, maybe even the whole page if this one of the increasingly popular Single Page Applications (SPA &#8211; an interactive web application with no page reloads). Long strings of html will become very messy very quickly as well as being very difficult to maintain and debug.</p>
<p>Also, you may be inserting HTML which has been generated server side. This solution will help to decouple your client from the server. Get the data via JSON or whatever and then the <em>client</em> deals with the presentation. (You may even want to take this a step further and implement an MVC solution such as <a href="http://documentcloud.github.com/backbone/">backbone.js</a> but that&#8217;s a tutorial for another day!)</p>
<p>The solution of course is to use a template &#8211; some HTML which can be dynamically updated. The realisation of how useful and necessary this is for client side development has spawned a few new templating solutions: mustache.js, IcanHaz.js as well as the new jQuery templates plugin (jquery-tmpl).</p>
<p>I had a simple task: I wanted to dynamically fill a table as in the example above. I looked at a few of the solutions &#8211; in particular the jQuery templates plugin which I found to be easy to use for a basic template but which became increasingly complex with having to compile nested templates, etc. The best solution, I found, was using the templating features of underscore.js which is an <em>extremely</em> useful library. The main feature of the underscore templating solution is that you can create straight HTML (which could be from a separate file, etc.) and then simply insert your dynamic data using native javascript. It&#8217;s pretty much the equivalent of inserting data into HTML using PHP tags.</p>
<p>Here&#8217;s how to do it:</p>
<p>First lets have some data. An array of customers for example:</p>
<pre class="brush: jscript;">
var customerList = [
        {
            'firstname': 'Rio',
            'lastname' : 'Ferdinand',
            'email' : 'rio@gmail.com'
        },
        {
            'firstname': 'Paul',
            'lastname' : 'Scholes',
            'email' : 'paul@hotmail.com'
        },
        {
            'firstname': 'Ryan',
            'lastname' : 'Giggs',
            'email' : 'ryan@hotmail.com'
        }
    ]
</pre>
<p>Next our template. All you need is a container for the HTML. I&#8217;m using a script container but you can use anything &#8211; a div with display:none; or whatever. The container must have an identifier.</p>
<pre class="brush: jscript;">
&lt;script id=&quot;customerTemplate&quot; type=&quot;text/html&quot;&gt;

        &lt;table&gt;
            &lt;tr&gt;
                  &lt;th&gt;First name&lt;/th&gt;
                  &lt;th&gt;Last name&lt;/th&gt;
                  &lt;th&gt;Email&lt;/th&gt;
            &lt;/tr&gt;
            &lt;% for(var i = 0; i &lt; customerList.length; i++){ %&gt;
            &lt;% var customer = customerList[i]; %&gt;
            &lt;tr&gt;
                 &lt;td&gt;&lt;%= customer.firstname %&gt;&lt;/td&gt;
                 &lt;td&gt;&lt;%= customer.lastname %&gt;&lt;/td&gt;
                 &lt;td&gt;&lt;%= customer.email %&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;% } %&gt;
        &lt;/table&gt;

    &lt;/script&gt;
</pre>
<p>So how cool is that? It&#8217;s just straight HTML with dynamic data inserted via native javascript. The only thing you need to do is to use the &lt; % &#8230; %&gt; tags to delimit your javascript and that&#8217;s it &#8211; no messy {{if}} tags, nested templates or anything like that. Just put in whatever javascript you need!</p>
<p><strong>N.B.</strong> To print a value out, note the use of the &lt; %= (with equals sign) as opposed to just &lt;% for the other tags.</p>
<p>Ok it&#8217;s all very easy but we&#8217;re not done yet. Now we&#8217;re going to use underscore.js (if you haven&#8217;t explored <a href="http://documentcloud.github.com/underscore/">underscore.js</a> then I highly recommend that you do. It is an improbably useful library)</p>
<p>There are two steps: first we&#8217;ll create a template object from the template using underscore. This object can then be used with our data to output our final HTML.</p>
<pre class="brush: jscript;">
// Use underscore to convert the template to a 'template' object
var customerTemplate = _.template($('#customerTemplate').text());

// Use the template object to output our html
// Note that the customerList name equates to the customerList
// array that is used in the template.
var html = customerTemplate({'customerList' : customerList});
$(&quot;#someDiv&quot;).html(html);
</pre>
<p>That&#8217;s it! Note you&#8217;ll need to include the underscore library!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2011/08/create-a-dynamic-table-from-a-template-with-javascript-and-underscore-js/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dynamic cafeteria news and slideshow display for a corporation</title>
		<link>http://www.islandsmooth.com/2011/02/dynamic-cafeteria-news-and-slideshow-display-for-a-corporation/</link>
		<comments>http://www.islandsmooth.com/2011/02/dynamic-cafeteria-news-and-slideshow-display-for-a-corporation/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 02:58:32 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Recent Projects]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[large screen]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=558</guid>
		<description><![CDATA[A project to create a display for company cafeterias showing TV and multi-media slideshows via large screens. Also incorporated the means for company managers to create the displays.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2011%2F02%2Fdynamic-cafeteria-news-and-slideshow-display-for-a-corporation%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2011%2F02%2Fdynamic-cafeteria-news-and-slideshow-display-for-a-corporation%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft size-full wp-image-559" style="padding: 0px 10px 10px 0px;" title="mt" src="http://www.islandsmooth.com/wp-content/uploads/2011/02/mt.png" alt="" width="270" height="153" /></p>
<p>My client was a corporation (Mettler Toledo Inc.) out of the States. They required a web based display that would be shown on large (60&#8243;) displays in the company cafeterias. The purpose was to show general company notices and TV shows to people as they were eating. But also the display was to show slideshows from company managers for training, sales or informational purposes.</p>
<p>There were two sides to the application:</p>
<ol>
<li>A secure interface through which company managers can create multi-media slideshows.</li>
<li>The display itself: a web based interface able to display TV, news tickers and company slideshows dynamically. As this would be on permanent display, it was essential that no human interaction was needed and that all aspects of the display could be managed from an administrative interface.</li>
</ol>
<p><a href="http://www.islandsmooth.com/projects/mt/index.php/cafe/show"><img class="alignleft size-full wp-image-216" title="livedemo" src="http://www.islandsmooth.com/wp-content/uploads/2010/02/livedemo.png" alt="" width="128" height="57" /></a></p>
<h3>Features</h3>
<ul>
<li>Create slideshows with text (via WYSIWYG interface), pictures or video. Video can be external, via embedded code or added to a media library on the server itself.</li>
<li>Slide animation: slide in /out, fading with easing effects via jQuery UI.</li>
<li>Stand-alone display. There is never any need to interact with the display. The display is managed completely via an administrative interface.</li>
<li>Dynamic TV display: plays a range of channels via the Justin.tv API.</li>
</ul>
<h3>Technical</h3>
<ul>
<li>Built using javascript, JQuery, AJAX and PHP / MySQL</li>
<li>Built using an MVC framework: codeigniter</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2011/02/dynamic-cafeteria-news-and-slideshow-display-for-a-corporation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send and receive objects using JSON, AJAX, jquery and PHP</title>
		<link>http://www.islandsmooth.com/2010/04/send-and-receive-json-data-using-ajax-jquery-and-php/</link>
		<comments>http://www.islandsmooth.com/2010/04/send-and-receive-json-data-using-ajax-jquery-and-php/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 23:04:29 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=225</guid>
		<description><![CDATA[A quick tutorial on sending and receiving objects in JSON format using jQuery and the ajax function.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F04%2Fsend-and-receive-json-data-using-ajax-jquery-and-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F04%2Fsend-and-receive-json-data-using-ajax-jquery-and-php%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I was working on a client-side project that sent a parameter to the server via AJAX and received some data back. If you just want a string returned from the server then this is nothing new and easily done with jquery and AJAX (I think there are resouces on the web. I&#8217;ll write another tutorial soon.)</p>
<p>But what if you need more than a string to be returned from the server? What if the information you receive back from the server requires an object or you&#8217;d like to receive more than one parameter?</p>
<p>jQuery and JSON make this very easy.</p>
<p>First the jQuery. I&#8217;m going to use the &#8216;ajax&#8217; function as you can incorporate a &#8216;beforeSend&#8217; parameter. This tells your client to expect a JSON response and is necessary to prevent problems with some clients. In theory there&#8217;s no reason why you couldn&#8217;t use the simpler &#8216;get&#8217; / &#8216;post&#8217; or &#8216;getJSON&#8217; functions but clients can be very finicky with this type of response and I&#8217;ve encountered bugs with getJSON in IE (suprise) that were <em>very</em> difficult to debug and were solved with the code below.</p>
<p>For this example I&#8217;m going to send a URL to the server and get back some information about that URL. I want two pieces of information back from the server: a boolean true / false and a string with more information regarding this result.</p>
<p>Let&#8217;s send a name / value pair to send to the server. You can create a JSON object or just use:</p>
<pre class="brush: jscript;">

var postData =&quot;domain=techcrunch.com&quot;;
</pre>
<p>So I&#8217;m sending a request to the server with name &#8216;domain&#8217; and value &#8216;techcrunch.com&#8217; (best I could think of on short notice).</p>
<p>Here is the jQuery to do this:</p>
<pre class="brush: jscript;">

var postData =&quot;domain=techcrunch.com&quot;;

 $.ajax({
    type: &quot;POST&quot;,
    dataType: &quot;json&quot;,
    data: postData,
    beforeSend: function(x) {
        if(x &amp;&amp; x.overrideMimeType) {
            x.overrideMimeType(&quot;application/json;charset=UTF-8&quot;);
        }
    },
    url: 'testURL.php',
    success: function(data) {
        // 'data' is a JSON object which we can access directly.
        // Evaluate the data.success member and do something appropriate...
        if (data.success == true){
            $('#section1').html(data.message);
        }
        else{
            $('#section2').html(data.message);
        }
    }
});
</pre>
<p>Obviously we&#8217;re sending a POST request to &#8216;testURL.php&#8217;. Note the datatype and beforesend parameters. The &#8216;beforesend&#8217; function, as mentioned before, is to deal with quirks on some clients. The interesting thing is the &#8216;data&#8217; object that is returned from the server with two members: success (boolean) and message (string). You can access them directly using data.success and data.message. This is a simple example but you can of course receive just about anything in your JSON object: arrays, strings, booleans; even other objects. [edit: PHP's json_encode() does *not* work well with nested associative arrays. I've found you pretty much have to write your own JSON encoder / decoder for complex arrays].</p>
<p>Ok so this gets sent off to the server where we receive the &#8216;domain&#8217; as a POST argument. We do our processing and want to send back the result (which needs to be in JSON format). Luckily PHP has a function which makes it very easy to do this: json_encode . Couldn&#8217;t be easier: set up an associative array and then call json_encode on it:</p>
<pre class="brush: php;">

// Here's the argument from the client.
$domain = $_POST['domain'];

// Do lots of devilishly clever analysis and processing here...
$success = processDomain($domain);

if ($success == true){

	// Set up associative array
	$data = array('success'=&gt; true,'message'=&gt;'Success message: hooray!');

	// JSON encode and send back to the server
	echo json_encode($data);
}
else{
	// Set up associative array
	$data = array('success'=&gt; false,'message'=&gt;'Failure message: boo!');

	// JSON encode and send back to the server
	echo json_encode($data);
}
</pre>
<p>That&#8217;s it! Easy! Be aware that the formatting of JSON objects can be very strict regarding single / double quotes, etc. You can read more here: <a href="http://www.json.org/">json.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2010/04/send-and-receive-json-data-using-ajax-jquery-and-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The iPad is genius</title>
		<link>http://www.islandsmooth.com/2010/02/the-ipad-is-genius/</link>
		<comments>http://www.islandsmooth.com/2010/02/the-ipad-is-genius/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 20:36:56 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Comment]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=156</guid>
		<description><![CDATA[Why the iPad will fundamentally change the way we interact with technology and the web.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F02%2Fthe-ipad-is-genius%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F02%2Fthe-ipad-is-genius%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<h3><img class="alignleft size-full wp-image-538" title="ipad" src="http://www.islandsmooth.com/wp-content/uploads/2011/02/ipad.jpg" alt="" width="125" height="176" style='margin-right:10px;'/>Are you excited about the iPad?</h3>
<p>If not, you&#8217;ll tell me that it has no camera / USB port / GPS, etc. That it&#8217;s just a big (and not very good) iPhone.</p>
<p>How about I tell you that the iPad is a step on the way to fundamentally changing the way we interact with the web, the world and technology? How about I tell you that this is the biggest step forward in user interaction since the introduction of the mouse?</p>
<p>How about I describe the iPad not in terms of its parts but what it is: a netbook, slate, multimedia player, gameboy, iPhone and Wii combined &#8211; a device that will influence and fundamentally change the way we interact with technology; that will make clicking on a mouse and typing on a keyboard seem as old fashioned as a telex machine?</p>
<p>Sounds a bit more interesting, hey?</p>
<p>Let&#8217;s look at the state of the web and computing. There&#8217;s lots going on, to be sure. There&#8217;s cloud computing, Google wave (or Buzz now I guess), HTML 5, RIA, Android, Silverlight, etc., etc. As a developer it&#8217;s pretty much impossible to keep up with everything that&#8217;s going on. Billions of dollars of innovation and (wo)man hours are piled into the web with fantastic new technologies coming along seemingly every week.</p>
<p>But one thing that hasn&#8217;t changed since the invention of the mouse and Windows (not by accident by Apple back in 1984) is the way we interact with computers and, by extension, the web. Think about it! 1984! We are still using the exact same tools to interact with a computer as we did 26 years ago!</p>
<p>There are a few examples that I&#8217;d like to share to show you my thinking:</p>
<p>One is not particularly new: it&#8217;s the iPhone. Hand it to the drunkest, most ham-fisted, technophobic oil-rig worker you can find and they&#8217;ll figure it out very quickly. Not only that, but the chances they&#8217;ll <em>enjoy</em> figuring it out because it&#8217;s easy, quick and fun. You can shake the iPhone, swipe your fingers across the screen, squeeze them together, move them apart and the iPhone does things!</p>
<p>And Apple&#8217;s innovation in the way of doing things is not restricted to the iPhone. Pick up an iMac. See how nice it is to swipe and squeeze things with the mousepad?</p>
<p>Ok so let&#8217;s see how these kinds of interactions might work with the iPad itself:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="295" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Sq1Z_xsA2EM&amp;hl=en_GB&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="295" src="http://www.youtube.com/v/Sq1Z_xsA2EM&amp;hl=en_GB&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I&#8217;m not even really a gamer but did you see the way he was controlling the game with the iPad? Tilting it, swiping it, intuitively touching buttons as soon as they come up? Are you not getting excited about this??</p>
<h3>The iPad and the (future) web</h3>
<p>Ok. One final thing. So the iPad is great and you can bet your life that by Christmas your life will not be worth living unless you&#8217;ve got large amounts of money to give the kids to spend at the iPad app store which, by then, will have <em>millions</em> of apps to download. But will it change the way that we interact with the web? (Which, in and of itself, is becoming, well, boring. I say this as a developer and web enthusiast). There are many things to consider when you design a site but one thing is for sure: you&#8217;ll have a menu bar, you&#8217;ll have buttons, blah, blah, blah. All of the navigational elements on the page have been put there with one goal in mind: to get you to click on them with a mouse. Can you interact with a web page or application in any other way than by clicking on something with a mouse or entering data via the keyboard? Clearly you can&#8217;t.</p>
<p>Once again, I believe that the iPad is set to revolutionise that and that is where it&#8217;s true genius lies.</p>
<p>Anyway! Onto another very interesting demo. Perhaps the future of the web and almost certainly the future of the web if the iPad has anything to do with it. This is Silverlight whose future is, I think, uncertain at best. But the interesting thing is the way that web applications can be designed to work with swiping, etc.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="265" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/wFB357TY9k0&amp;hl=en_GB&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="320" height="265" src="http://www.youtube.com/v/wFB357TY9k0&amp;hl=en_GB&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Swiping, squeezing, scraping, shaking and tilting your device to control your applications on the web&#8230;</p>
<p>Surely the best invention since the mouse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2010/02/the-ipad-is-genius/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dynamic quote generation for a painting company</title>
		<link>http://www.islandsmooth.com/2010/01/dynamic-quote-generation-for-a-painting-company/</link>
		<comments>http://www.islandsmooth.com/2010/01/dynamic-quote-generation-for-a-painting-company/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 05:37:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Recent Projects]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[object oriented]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=122</guid>
		<description><![CDATA[A small project for a painting company: an online quote generation tool which dynamically shows the price for the job depending on the options the user selects. Features object oriented javascript, AJAX, email notifications and lightweight lead management system.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F01%2Fdynamic-quote-generation-for-a-painting-company%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F01%2Fdynamic-quote-generation-for-a-painting-company%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<h3><img class="alignleft size-full wp-image-125" style="margin-right: 5px; margin-bottom: 5px; float: left;" title="purepainters" src="http://www.islandsmooth.com/wp-content/uploads/2010/01/purepainters.jpg" alt="Dynamic quote generation for a painting company" width="200" height="155" />Overview</h3>
<p>This was a small project for a painting company in Vancouver, Canada. It&#8217;s very simple: the customer chooses how many rooms they&#8217;d like painted. They enter the dimensions for each room as well as other options: would they like the ceiling painted, etc. A quote is calculated on the fly (all client-side, no page reloads) and displayed. The client can have the quote emailed to themselves. If they do this the client&#8217;s details are, at the same time, entered into a basic CRM system. There is an administrative interface through which the manager can manage settings for the front end (price per sq. ft., etc.) as well as view and manage the status of leads which have come in.</p>
<p><a href="http://www.islandsmooth.com/demos/painters/" target="_blank"><img class="alignleft size-full wp-image-216" title="livedemo" src="http://www.islandsmooth.com/wp-content/uploads/2010/02/livedemo.png" alt="" width="128" height="57" /></a></p>
<h3 style="clear: both; margin-top: 15px;">Languages and protocols used</h3>
<ul>
<li>Object oriented javascript, jquery, PHP / MySQL, AJAX, JSON</li>
</ul>
<h3>Features</h3>
<ul>
<li>Object oriented javascript</li>
<li>Inline form validation (checks validity of form responses before form submission (which is by AJAX)).</li>
<li>Dynamic updating of the quote depending on the options that the customer selects.</li>
<li>HTML email generation to customer and company management.</li>
<li>Custom administration interface with basic lead management system.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2010/01/dynamic-quote-generation-for-a-painting-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic business card design module with Paypal IPN integration</title>
		<link>http://www.islandsmooth.com/2010/01/dynamic-business-card-design-module-with-paypal-ipn-integration/</link>
		<comments>http://www.islandsmooth.com/2010/01/dynamic-business-card-design-module-with-paypal-ipn-integration/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 04:43:19 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Recent Projects]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[object oriented]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=109</guid>
		<description><![CDATA[A module for dynamic business card design via AJAX with logo insertion, template chooser, font chooser, font-color chooser. Includes Paypal IPN (Instant Payment Notification) integration, email notification with image attachments in MIME format, lightweight CRM for customer order management and admin interface to manage pricing, shipping charges, etc.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F01%2Fdynamic-business-card-design-module-with-paypal-ipn-integration%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2010%2F01%2Fdynamic-business-card-design-module-with-paypal-ipn-integration%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<h3><a href="http://www.islandsmooth.com/wp-content/uploads/2010/01/tricity.jpg"><img class="alignleft size-full wp-image-111" style="float: left; margin-right: 5px; margin-bottom: 5px;" title="tricity" src="http://www.islandsmooth.com/wp-content/uploads/2010/01/tricity.jpg" alt="Business card design with AJAX and PHP" width="200" height="144" /></a>Overview</h3>
<p>My client was a small printing firm in the Vancouver area who wanted to give their customers the ability to design, order and re-order business cards online. In the printing trade this is known as &#8216;web to print&#8217; and is big surprisingly business (i.e. expensive). So the idea was to create something that was simple, intuitive, easy to use and which streamlined the ordering process. It was one of those projects that you think is going to be easy but that becomes surprisingly complex with the customer requiring different fonts on different parts of the page, different colors for different parts of the page, image resizing (which meant image re-sampling) for logos,  right / center / left justification, &#8216;bleed&#8217; allowances, shipping cost calculators, etc.</p>
<p><a href="http://www.islandsmooth.com/demos/printers/cardDesign.php" target="_blank"><img class="alignleft size-full wp-image-216" title="livedemo" src="http://www.islandsmooth.com/wp-content/uploads/2010/02/livedemo.png" alt="" width="128" height="57" /></a></p>
<h3>Languages and protocols used</h3>
<ul>
<li>XHTML / CSS, PHP / MySql. Javascript, jquery, AJAX, JSON. Paypal IPN protocol. MIME</li>
</ul>
<h3>Project Features</h3>
<ul>
<li>Dynamic business card design with the ability to change the business card text, template, font (per line), font-color (per line) and logo on the fly with no page reloads.</li>
<li>Seamless ordering process with Paypal IPN (Instant Payment Notification) integration. The order process (database entry, sending of emails, etc. ) is completed dynamically upon notification of payment from Paypal. The system also includes notification authentication as well as payment processing error tracking, notification and logging.</li>
<li>Object oriented PHP enabling easy re-use and fonfiguration for new templates and designs.</li>
<li>Email notification of new orders to customer and administrator with the new design as an attachment in MIME format.</li>
<li>Dynamic pricing and shipping cost calculator based on distance from vendor.</li>
<li>Lightweight order management and CRM system.</li>
<li>Administration (pricing, etc.) interface.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2010/01/dynamic-business-card-design-module-with-paypal-ipn-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Property listing collection and management with PHP, javascript, jquery and AJAX</title>
		<link>http://www.islandsmooth.com/2009/12/table-filtering-and-sorting-with-jquery-api-integration-with-ajax/</link>
		<comments>http://www.islandsmooth.com/2009/12/table-filtering-and-sorting-with-jquery-api-integration-with-ajax/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 01:24:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Recent Projects]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web scraping]]></category>

		<guid isPermaLink="false">http://localhost/islandsmooth/?p=70</guid>
		<description><![CDATA[A project to consolidate information from five different sites and display it clearly and intuitively. Features client side table filtering and sorting with no page reloads. Also cross domain API calls and seamless information display using XML and AJAX. Utilises PHP, cURL, javascript, jquery, AJAX ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2009%2F12%2Ftable-filtering-and-sorting-with-jquery-api-integration-with-ajax%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2009%2F12%2Ftable-filtering-and-sorting-with-jquery-api-integration-with-ajax%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="size-full wp-image-86" style="width: auto; float: left; margin-right: 10px;" title="onlinerealtyfeed" src="http://www.islandsmooth.com/wp-content/uploads/2009/12/onlinerealtyfeed.png" alt="onlinerealtyfeed.com" width="200" height="148" /></p>
<h3>Overview</h3>
<p>This was a project for a client who bought and sold foreclosed properties in Las Vegas. In the summer of 2009 there were a huge number of properties coming onto the market (about 2,000 &#8211; 3,000 day) and my client was searching through them every night with printed spreadsheets and a pencil. So there was an obvious need to:</p>
<ul>
<li>Collect property listings from various sources and consolidate information about those properties into one database.</li>
<li>Collect information concerning those properties from other sources (primarily by means of API calls to property site zillow.com) and update the listings with that information.</li>
<li>Display the properties in such a way that the client could easily sort, filter and flag properties that were of interest to him.</li>
</ul>
<p><a href="http://174.132.149.194/~real/index.php" target="_blank"><img class="alignleft size-full wp-image-216" style="float: left; clear: both;" title="livedemo" src="http://www.islandsmooth.com/wp-content/uploads/2010/02/livedemo.png" alt="" width="128" height="57" /></a></p>
<h3>Languages and protocols used</h3>
<ul>
<li>Object oriented PHP, javascript, jquery, AJAX and a solid understanding of HTTP transactions.</li>
</ul>
<h3>Project features</h3>
<ul>
<li>Secure login and user management.</li>
<li>Authorised data collection (web scraping) from five different sites &#8211; some php, some ASP.net using PHP cURL libraries in automated scripts. Automated script authentication (script logs in with username and password).</li>
<li>Data consolidation in a mySQL database with dynamic listing update and cleanup.</li>
<li>Paginated data display.</li>
<li>Client side table sorting by column using jquery (no page reloads).</li>
<li>Intuitive, one-click filtering using jquery (no page reloads).</li>
<li>Cross domain API calling and information display using AJAX, PHP, XML and jquery (no page reloads).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2009/12/table-filtering-and-sorting-with-jquery-api-integration-with-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A multi-threaded website analysis tool with dynamic display</title>
		<link>http://www.islandsmooth.com/2008/08/a-multi-threaded-website-analysis-tool-with-dynamic-display/</link>
		<comments>http://www.islandsmooth.com/2008/08/a-multi-threaded-website-analysis-tool-with-dynamic-display/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 20:46:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Recent Projects]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery UI]]></category>
		<category><![CDATA[multi-threaded]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://www.islandsmooth.com/?p=315</guid>
		<description><![CDATA[A multi-threaded website analysis tool providing large amounts of information concerning a website, its contents and performance. Features object oriented PHP, CSS based graphs, jQuery UI and SOAP as well as RESTful API integration.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.islandsmooth.com%2F2008%2F08%2Fa-multi-threaded-website-analysis-tool-with-dynamic-display%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.islandsmooth.com%2F2008%2F08%2Fa-multi-threaded-website-analysis-tool-with-dynamic-display%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft size-full wp-image-319" style="float: left; margin: 0px 5px 5px 0px;" title="moksha" src="http://www.islandsmooth.com/wp-content/uploads/2010/08/moksha.png" alt="Website analysis tool for Moksha Media" width="200" height="145" /></p>
<h3>Overview</h3>
<p>My client runs a business providing website maintenance, updates and management services to medium sized businesses. He desired a tool that would analyze prospective clients&#8217; websites, giving them feedback on various metrics, with the idea that clients would hire his services to improve their performance on those metrics.</p>
<p><a href="http://www.islandsmooth.com/projects/moksha2/" target="_blank"><img class="alignleft size-full wp-image-216" style="float: left; clear: both;" title="livedemo" src="http://www.islandsmooth.com/wp-content/uploads/2010/02/livedemo.png" alt="" width="128" height="57" /></a></p>
<h3 style="clear: both;">Features</h3>
<ul>
<li>Multi-threaded: client launches multiple asynchronous requests (via AJAX) for concurrent (and quick) processing.</li>
<li>Dynamic page display using jQuery.</li>
<li>Object oriented PHP: used throughout the application, particularly in generating front-end presentation and graph templates.</li>
<li>CSS based graphs &#8211; allowing custom graph design</li>
<li>jQuery UI integration</li>
<li>PHP / MySQL. Captions, headings and images are defined or mapped in a MySQL database.</li>
<li>API integration: both SOAP and RESTful based.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.islandsmooth.com/2008/08/a-multi-threaded-website-analysis-tool-with-dynamic-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

