<?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>BuzaMoto &#187; Client Work</title>
	<atom:link href="http://blog.buzamoto.com/category/client-work/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.buzamoto.com</link>
	<description>Life as a BuzaMoto Employee</description>
	<lastBuildDate>Tue, 03 Aug 2010 20:54:23 +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>Cara&#8217;s Site</title>
		<link>http://blog.buzamoto.com/2010/08/03/caras-site/</link>
		<comments>http://blog.buzamoto.com/2010/08/03/caras-site/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 20:53:30 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>
		<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=298</guid>
		<description><![CDATA[
A quick weekend project, building a site for my friend Cara using Indexhibit. It was easy enough to get started although while writing the plugin, I did have to add some extra stuff to the core. It did make me feel a little sad having to write PHP, but maybe this will inspire me to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://carabrower.com" target="_blank"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/08/1-500x424.png" alt="" title="carabrower.com" width="500" height="424" class="aligncenter size-medium wp-image-299" /></a></p>
<p>A quick weekend project, building a site for my friend Cara using <a href="http://www.indexhibit.org/" target="_blank">Indexhibit</a>. It was easy enough to get started although while writing the plugin, I did have to add some extra stuff to the core. It did make me feel a little sad having to write PHP, but maybe this will inspire me to port it as a Rails/Sinatra app?</p>
<p>PS Cara is awesome if any one is looking for a production designer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/08/03/caras-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Launch: Knoll Antenna Workspaces Teaser</title>
		<link>http://blog.buzamoto.com/2010/06/15/site-launch-knoll-antenna-workspaces-teaser/</link>
		<comments>http://blog.buzamoto.com/2010/06/15/site-launch-knoll-antenna-workspaces-teaser/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 17:55:47 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=282</guid>
		<description><![CDATA[
Just in time for the launch of Antenna Workspaces by Knoll at NeoCon 2010, the Teaser website goes live.
We worked on this site in a really short time, but are happy with the outcome. Thanks to tips from Apple engineers last week at WWDC, the site runs fast on the iPad and iPhone, and enhances [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.knoll.com/neocon/10/neocon2010_prs.jsp#open"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/06/Screen-shot-2010-06-15-at-1.32.35-PM-500x368.png" alt="" title="Antenna Workspaces at NeoCon 2010" width="500" height="368" class="aligncenter size-medium wp-image-283" /></a></p>
<p>Just in time for the launch of <a href="http://www.knoll.com/neocon/10/neocon2010_prs.jsp">Antenna Workspaces</a> by <a href="http://knoll.com">Knoll</a> at <a href="http://www.neocon.com/">NeoCon 2010</a>, the <a href="http://www.knoll.com/neocon/10/neocon2010_prs.jsp#open">Teaser website</a> goes live.</p>
<p>We worked on this site in a really short time, but are happy with the outcome. Thanks to tips from Apple engineers last week at WWDC, the site runs fast on the iPad and iPhone, and enhances the experience with support for multi-touch. Move four objects at once if you want!</p>
<p>The source of this website runs inside <a href="http://www.knoll.com/neocon/10/neocon2010_prs.jsp">Knoll&#8217;s NeoCon page</a> using <a href="http://www.shadowbox-js.com/">Shadowbox</a>, and what&#8217;s notable about this site is that users can share links to any image, which will open the page in Shadowbox and open up the specific image that was linked.</p>
<p>Now I deserve a vacation, but it probably won&#8217;t happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/06/15/site-launch-knoll-antenna-workspaces-teaser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Launch: Village Version 2.0</title>
		<link>http://blog.buzamoto.com/2010/01/05/site-launch-village-version-2-0/</link>
		<comments>http://blog.buzamoto.com/2010/01/05/site-launch-village-version-2-0/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 04:29:27 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=138</guid>
		<description><![CDATA[
It&#8217;s been a long project, but finally, Village Version 2.0 launches! We (Village and BuzaMoto) worked really hard on it and I think the site turned out great. I urge everyone to check it out. For the curious, the site was built with Rails, and runs an all new version of MudTyper, which supports OTF [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://vllg.com"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/01/vllg-2-500x366.png" alt="vllg-2" title="vllg-2" width="500" height="366" class="aligncenter size-medium wp-image-164" /></a></p>
<p>It&#8217;s been a long project, but finally, <a href="http://vllg.com">Village Version 2.0</a> launches! We (Village and BuzaMoto) worked really hard on it and I think the site turned out great. I urge everyone to <a href="http://vllg.com">check it out</a>. For the curious, the site was built with Rails, and runs an all new version of MudTyper, which supports OTF with kerning in addition to many OTF features (including contextual alternates). More about MudTyper in the future when I have time to write about the more interesting technical aspects of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/01/05/site-launch-village-version-2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Site Launch: ProjectNo8</title>
		<link>http://blog.buzamoto.com/2010/01/05/site-launch-projectno8/</link>
		<comments>http://blog.buzamoto.com/2010/01/05/site-launch-projectno8/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:31:50 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=155</guid>
		<description><![CDATA[
Just before the end of 2009, we launched a new e-commerce website for ProjectNo8. The site was designed by my friend Christian Schmidt. For this website, we decided to build it using Spree, an e-commerce framework built on Rails. Spree was great to work with and really sped up the development time. It was still [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://projectno8.com"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/01/pn8-home-500x534.png" alt="pn8-home" title="pn8-home" width="500" height="534" class="aligncenter size-medium wp-image-161" /></a></p>
<p>Just before the end of 2009, we launched a new e-commerce website for <a href="http://projectno8.com">ProjectNo8</a>. The site was designed by my friend Christian Schmidt. For this website, we decided to build it using <a href="http://spreecommerce.com/">Spree</a>, an e-commerce framework built on Rails. Spree was great to work with and really sped up the development time. It was still flexible enough to implement everything we needed to, and it was familiar since it&#8217;s built with Rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/01/05/site-launch-projectno8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AgencyCollective Launch</title>
		<link>http://blog.buzamoto.com/2009/03/15/agencycollective-launch/</link>
		<comments>http://blog.buzamoto.com/2009/03/15/agencycollective-launch/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 20:18:58 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=86</guid>
		<description><![CDATA[




It&#8217;s been online for a couple weeks, but here&#8217;s an announcement that we just completed the new website for agency:collective. There are also screen captures with captions under our projects page.
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter">
<dl id="attachment_89" class="wp-caption aligncenter" style="width: 510px;">
<dt class="wp-caption-dt"><img class="size-medium wp-image-89" title="ac" src="http://blog.buzamoto.com/wp-content/uploads/2009/03/ac-500x554.png" alt="agency collective" width="500" height="554" /></dt>
</dl>
</div>
<p>It&#8217;s been online for a couple weeks, but here&#8217;s an announcement that we just completed the new website for <a href="http://www.agencycollective.com/">agency:collective</a>. There are also screen captures with captions under our <a href="http://www.buzamoto.com/projects/agency:collective">projects page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2009/03/15/agencycollective-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BatesHori Website (PHP: Revisiting the Past)</title>
		<link>http://blog.buzamoto.com/2009/02/07/bateshori-website-php-revisiting-the-past/</link>
		<comments>http://blog.buzamoto.com/2009/02/07/bateshori-website-php-revisiting-the-past/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 03:31:36 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Client Work]]></category>
		<category><![CDATA[Note]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=57</guid>
		<description><![CDATA[
Most of our client work involves Rails development. It seems everybody wants a website that allow them to change the content, anytime, anywhere, whenever they like. But I always tell my clients to think about how often this &#8220;change&#8221; is going to happen. It&#8217;s certainly a waste of money to pay for developing some feature that [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.bateshori.com/"><img class="aligncenter size-large wp-image-62" title="bateshori" src="http://blog.buzamoto.com/wp-content/uploads/2009/02/picture-1-1024x803.png" alt="bateshori" /></a></p>
<p>Most of our client work involves <a href="http://www.rubyonrails.org">Rails</a> development. It seems everybody wants a website that allow them to change the content, anytime, anywhere, whenever they like. But I always tell my clients to think about how often this &#8220;change&#8221; is going to happen. It&#8217;s certainly a waste of money to pay for developing some feature that you don&#8217;t end up using.</p>
<p>Even with Rails, having an &#8220;admin&#8221; backend requires extra design and development time. Also, with Rails and most other web frameworks, it&#8217;s not completely trivial to deploy and maintain these sites. For the client, it most likely means they need to ditch their current hosting provider and go with someone who will support Rails. Rails support on an affordable host is a hit or miss. I&#8217;m still surprised that Dreamhost still claims that they &#8220;support&#8221; Rails. In the world of VPS, the deployment is an easy thing, but for most clients, maintaining a VPS is a responsibility they don&#8217;t want. Why can&#8217;t it just work? I agree.</p>
<p>But this post isn&#8217;t about Rails. Instead, it&#8217;s about revisiting an oldie and ugly [but still sometimes a goodie] friend, PHP.</p>
<p><span id="more-57"></span></p>
<p>I just finished programming a site for <a href="http://www.bateshori.com/">Allen Hori</a>. His site doesn&#8217;t require many updates but he did want to update it himself whenever he needed to. Having a simple configuration file along with good old FTP to upload files was the way to go. I know there are those people that love XML and XSLT, but I&#8217;m not one of them. I hate XML &#8212; it&#8217;s hard to read, hard to edit in a text editor and it&#8217;s bloated&#8230;and I XSLT? It&#8217;s not for me, and that&#8217;s all there is to say. My choice was YAML and PHP.</p>
<p>I feel like I abandoned PHP long ago, but I still write it when I prototype, before going to Rails. As a language, I think PHP is ugly, inconsistent and generally something that makes me appreciate how great Ruby is. But PHP still has a lot going for it. First off, every host supports PHP. It doesn&#8217;t matter if it&#8217;s a linux, solaris or MS, they all support it. Also, it&#8217;s fast and easy to deploy. Copy the files over to the server, and it does it&#8217;s thing. No need to start a server or restart a process after your shared host restarts the server without warning.</p>
<p>Okay, enough with the talk, now for the technical goodies.</p>
<h2>Configuration</h2>
<p>Each &#8220;gallery&#8221; page is configurable. You can specify images and captions. This is easily described in YAML like this:</p>
<pre style="padding-left: 30px; ">title: Gallery Name
path: path/to/images
images:
  - image: first.jpg
    text: |
      here's a caption for the first image.
  - image: second.jpg
    text: |
      here's a caption for the second image.</pre>
<p>Parsing this in PHP is easy. We just google for a PHP yaml parser. I chose <a href="http://spyc.sourceforge.net/">spyc</a> because it comes as one file that you simply include. No installation necessary. You simply parse the yaml file like this:</p>
<pre style="padding-left: 30px;">$config = Spyc::YAMLLoad('config/gallery.yml');</pre>
<p>and magically, $config becomes a hash with the contents of the yaml file. That&#8217;s pretty much it, you can then go spaghetti style and insert content wherever you need. Whenever your client needs to update content, they just need to update the yaml file and upload any new images.</p>
<p>And&#8230;there&#8217;s more. Remember how this is a site that doesn&#8217;t change all that often? But we also don&#8217;t know when it will be updated. But with this current setup, every request will require PHP to do the same task. So being the responsible programmer, we need to implement caching.</p>
<h2>Caching</h2>
<p>We don&#8217;t know when Allen will decide to update the pages. But this is easy to determine. We know there was an update to the content any time the configuration file gets updated. So we need a way to generate a cache and update that cache anytime the configuration file is updated.</p>
<p>How do we do this? It&#8217;s actually really simple. Everything we need is built into PHP. To generate the cache, all we do is use <a href="http://ca2.php.net/outcontrol">PHP&#8217;s output buffer</a>. It&#8217;s surprisingly easy; 1. start the buffer, 2. generate the page, 3. open a file handler, 4. write the buffer contents, and 5. flush the buffer to the browser.</p>
<pre style="padding-left: 30px;">ob_start();
// generate the page here
$fp = fopen("cache_file_location", "w");
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();</pre>
<p>This will save what&#8217;s sent to the browser to a file. To decide when to use the cache and when to generate a new one, we simply compare the file modification times of the yaml file and the cache.</p>
<pre style="padding-left: 30px;">if (file_exists($cachefile)) {
  if (filemtime("config/gallery.yml") &lt; filemtime($cachefile)) {
    include($cachefile);
    exit();
  }
}</pre>
<p>This will serve the contents of the cache file if the cache is up to date. Of course this conditional needs to run with every request, it will be much faster than having to evaluate the same PHP script over and over.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2009/02/07/bateshori-website-php-revisiting-the-past/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
