<?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>BO {Designs}*</title>
	<atom:link href="http://bodesigns.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bodesigns.com</link>
	<description>Ramblings of a Interaction Designer</description>
	<lastBuildDate>Wed, 21 Sep 2011 14:25:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>foodiemob.com redesign</title>
		<link>http://bodesigns.com/foodiemob-com-redesign/</link>
		<comments>http://bodesigns.com/foodiemob-com-redesign/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 14:25:02 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=392</guid>
		<description><![CDATA[Spent last weekend restyling foodiemob to make it easier to find recipes. I also revamped the grid, logo, look, tone and feel&#8230; It is still a work in progress&#8230; should have a mobile version of the site available soon&#8230;.]]></description>
			<content:encoded><![CDATA[<p>Spent last weekend restyling foodiemob to make it easier to find recipes. I also revamped the grid, logo, look, tone and feel&#8230; It is still a work in progress&#8230; should have a mobile version of the site available soon&#8230;.</p>
<p><a href="http://www.foodiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/fm1.png" alt="" title="fm1" width="610" height="432" class="alignnone size-full wp-image-393" /></a></p>
<p><a href="http://www.foodiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/fm3.png" alt="" title="fm3" width="610" height="432" class="alignnone size-full wp-image-395" /></a></p>
<p><a href="http://www.foodiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/fm4.png" alt="" title="fm4" width="610" height="432" class="alignnone size-full wp-image-396" /></a></p>
<p><a href="http://www.foodiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/fm5.png" alt="" title="fm5" width="610" height="432" class="alignnone size-full wp-image-397" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/foodiemob-com-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>otterbrau brewing co. &#8211; work in progress</title>
		<link>http://bodesigns.com/otterbrau-brewing-co-work-in-progress/</link>
		<comments>http://bodesigns.com/otterbrau-brewing-co-work-in-progress/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 15:45:50 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=361</guid>
		<description><![CDATA[I have finally started working on my brewing website. I have been brewing beer for about 4 years now and I specialize in creating big stouts&#8230; thought I&#8217;d share&#8230;]]></description>
			<content:encoded><![CDATA[<p>I have finally started working on my brewing website. I have been brewing beer for about 4 years now and I specialize in creating big stouts&#8230; thought I&#8217;d share&#8230;</p>
<p><a href="http://otterbrau.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/otter-logo.png" alt="" title="otter-logo" width="610" height="574" class="alignnone size-full wp-image-370" /></a></p>
<p><a href="http://www.otterbrau.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/otter-beer.png" alt="" title="otter-beer" width="610" height="645" class="alignnone size-full wp-image-368" /></a></p>
<p><a href="http://www.otterbrau.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/09/otter-loc.png" alt="" title="otter-loc" width="610" height="310" class="alignnone size-full wp-image-369" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/otterbrau-brewing-co-work-in-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>drinkiemob redesign&#8230;</title>
		<link>http://bodesigns.com/drinkiemob-redesign/</link>
		<comments>http://bodesigns.com/drinkiemob-redesign/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 14:12:00 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=353</guid>
		<description><![CDATA[Having a long hangover Sunday at home has it&#8217;s advantages sometimes&#8230; especially when you have a beer blog in serious need of a redesign&#8230; the trick is to just make sure to stay hydrated&#8230; and maybe a little hair of the dog&#8230;]]></description>
			<content:encoded><![CDATA[<p>Having a long hangover Sunday at home has it&#8217;s advantages sometimes&#8230; especially when you have a beer blog in serious need of a redesign&#8230; the trick is to just make sure to stay hydrated&#8230; and maybe a little hair of the dog&#8230;</p>
<p><a href="http://www.drinkiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-65-1024x625.png" alt="" title="screen-capture-65" width="610" class="alignnone size-large wp-image-387" /></a></p>
<p><a href="http://www.drinkiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/drinkie-shots1.png" alt="" title="drinkie-shots1" width="610" height="400" class="alignnone size-full wp-image-381" /></a></p>
<p><a href="http://www.drinkiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/drinkie-shots2.png" alt="" title="drinkie-shots2" width="610" height="400" class="alignnone size-full wp-image-382" /></a></p>
<p><a href="http://www.drinkiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-67-1024x686.png" alt="" title="screen-capture-67" width="610" class="alignnone size-large wp-image-390" /></a></p>
<p><a href="http://www.drinkiemob.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/drinkie-shots3.png" alt="" title="drinkie-shots3" width="610" height="400" class="alignnone size-full wp-image-383" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/drinkiemob-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gourmet Island Breads</title>
		<link>http://bodesigns.com/gourmet-island-breads/</link>
		<comments>http://bodesigns.com/gourmet-island-breads/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 16:44:30 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=345</guid>
		<description><![CDATA[This was a fun little project for my brother in-law&#8230; They live in Oahu and have their own bread business selling bread and pizza&#8217;s around the island so I offered to design and built a simple brochure site on WordPress&#8230; I used WordPress again because it makes it really easy for them to keep it [...]]]></description>
			<content:encoded><![CDATA[<p>This was a fun little project for my brother in-law&#8230; They live in Oahu and have their own bread business selling bread and pizza&#8217;s around the island so I offered to design and built a simple brochure site on WordPress&#8230; I used WordPress again because it makes it really easy for them to keep it updated&#8230;</p>
<p><a href="http://www.gourmetislandbreads.com/" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/gib1.png" alt="" title="gib1" width="610" height="543" class="alignnone size-full wp-image-375" /></a></p>
<p><a href="http://www.gourmetislandbreads.com/" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/gib3.png" alt="" title="gib3" width="610" height="543" class="alignnone size-full wp-image-377" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/gourmet-island-breads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal blog redesign</title>
		<link>http://bodesigns.com/personal-blog-redesign/</link>
		<comments>http://bodesigns.com/personal-blog-redesign/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 14:05:55 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=324</guid>
		<description><![CDATA[So I finally had time this weekend to just relax, have a few beers and redesign my personal blog. The new bits: Our logo, overall look tone and feel, custom background js and a full screen photo viewer app that pulls all of our photos from all posts into one view and lets you easily [...]]]></description>
			<content:encoded><![CDATA[<p>So I finally had time this weekend to just relax, have a few beers and redesign my personal blog. The new bits: Our logo, overall look tone and feel, custom background js and a full screen photo viewer app that pulls all of our photos from all posts into one view and lets you easily scroll through and view any image full screen&#8230; I still am working on some of the interactions but thought I&#8217;d share.</p>
<p><a href="http://www.brentandvictoria.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-25-1024x688.png" alt="" title="screen-capture-25" width="610" class="alignnone size-large wp-image-325" /></a></p>
<p><a href="http://www.brentandvictoria.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-26-1024x679.png" alt="" title="screen-capture-26" width="610" class="alignnone size-large wp-image-326" /></a></p>
<p><a href="http://www.brentandvictoria.com/?page_id=297" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-27-1024x671.png" alt="" title="screen-capture-27" width="610" class="alignnone size-large wp-image-327" /></a></p>
<p><a href="http://www.brentandvictoria.com/?page_id=297" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-29-1024x671.png" alt="" title="screen-capture-29" width="610" class="alignnone size-large wp-image-329" /></a></p>
<p><a href="http://www.brentandvictoria.com/?page_id=297" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/08/screen-capture-28-1024x670.png" alt="" title="screen-capture-28" width="610" class="alignnone size-large wp-image-328" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/personal-blog-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libertiphoto.com</title>
		<link>http://bodesigns.com/libertiphoto-com/</link>
		<comments>http://bodesigns.com/libertiphoto-com/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 16:03:27 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=312</guid>
		<description><![CDATA[A couple months back I designed and implemented a custom WordPress theme for a local photographer &#8211; Dan Liberti. It is designed to leverage the CMS and category tagging aspects of WordPress to make it super easy for him to add photos and have the flexibility to display them wherever he needs them. The front [...]]]></description>
			<content:encoded><![CDATA[<p>A couple months back I designed and implemented a custom <a href="http://www.wordpress.org" target="_blank">WordPress</a> theme for a local photographer &#8211; <a href="http://libertiphoto.com" target="_blank">Dan Liberti</a>.</p>
<p><a href="http://libertiphoto.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/06/screen-capture-16-1024x706.png" alt="" title="screen-capture-16" width="610" class="alignnone size-large wp-image-317" /></a></p>
<p>It is designed to leverage the CMS and category tagging aspects of <a href="http://www.wordpress.org" target="_blank">WordPress</a> to make it super easy for him to add photos and have the flexibility to display them wherever he needs them. </p>
<p>The front end queries the DB filtering by category tags which correspond to the different sections of his site. Adding a new category will create a new tab on the top linking to a slideshow which displays all the photo posts that have that category tag. This allows him to easily share photo collections across sections by giving photo posts multiple tags. This also allows him to still have a blog section by tagging the post with a blog category tag.</p>
<p>For the UI, I am using jQuery to create a light weight slideshow for users to either scroll through the images or if you look closely click on the little play button on the bottom right corner to run through the slideshow automatically (This feature was added specifically for Dan to show off his site to potential clients which is why it is more of a discoverable feature).</p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/libertiphoto-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blinklab.com is live&#8230;</title>
		<link>http://bodesigns.com/blinklab-is-live/</link>
		<comments>http://bodesigns.com/blinklab-is-live/#comments</comments>
		<pubDate>Mon, 23 May 2011 05:19:17 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=277</guid>
		<description><![CDATA[Actually it went live a couple months ago&#8230; just haven&#8217;t had a chance to share&#8230; Blinklab is a digital retouch studio based in San Francisco and they hired me last year to build their site. The site was built using resourcespace an opensource php digital asset management system. I extended the system to include a [...]]]></description>
			<content:encoded><![CDATA[<p>Actually it went live a couple months ago&#8230; just haven&#8217;t had a chance to share&#8230;</p>
<p><a href="http://www.blinklab.com" target="_blank">Blinklab</a> is a digital retouch studio based in San Francisco and they hired me last year to build their site. The site was built using <a href="http://www.resourcespace.org/" target="_blank">resourcespace</a> an opensource php digital asset management system. I extended the system to include a templateing system for the front end so that they can both use the system as a cloud based storage and cataloging system and a consumer facing website. Design was done by them and I did all coding &#8211; PHP/HTML/CSS. I also set up their in house server and deployed their site.</p>
<p><a href="http://www.blinklab.com" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/05/blinklab.png" alt="" title="blinklab" width="610" class="alignnone size-full wp-image-278" /></a></p>
<p><a href="http://blinklab.com/www/pages/projects.php?search=!collection18&amp;k=d2cbdf09d8&amp;n=campaigns&amp;cid=18" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/05/screen-capture-37-1024x664.png" alt="" title="Portfolio" width="610" class="alignnone size-large wp-image-335" /></a></p>
<p><a href="http://blinklab.com/www/pages/slide.php?search=!collection167&amp;k=6bac346def&amp;cid=167" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/05/screen-capture-38-1024x622.png" alt="" title="Process slide show" width="610" class="alignnone size-large wp-image-336" /></a></p>
<p><a href="http://blinklab.com/www/blinklab_about.php" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/05/screen-capture-39-1024x631.png" alt="" title="About screen" width="610" class="alignnone size-large wp-image-337" /></a></p>
<p><a href="http://blinklab.com/www/blinklab_contact.php" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2011/05/screen-capture-40-1024x620.png" alt="" title="Contact screen" width="610" class="alignnone size-large wp-image-338" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/blinklab-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple web app using node.js</title>
		<link>http://bodesigns.com/simple-web-app-using-node-js/</link>
		<comments>http://bodesigns.com/simple-web-app-using-node-js/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 20:07:50 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[node.js]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve heard a little buzz about node.js online lately and after doing a little poking around and reading up on it I decided that I wanted to try my hand at creating a little app and deploying it on my personal server just to see how easy node.js is to use as a viable solution [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard a little buzz about <a href="http://nodejs.org/" target="_blank">node.js</a> online lately </p>
<p>and after doing a little poking around and reading up on it I decided that I wanted to try my hand at creating a little app and deploying it on my personal server just to see how easy <a href="http://nodejs.org/" target="_blank">node.js</a> is to use as a viable solution for future projects.</p>
<p><strong>Enter the Russian River Beer Finder</strong></p>
<p><a href="http://www.otterbrau.com/beer_finder.html" target="_blank"><img src="http://bodesigns.com/wp-content/uploads/2010/12/rr-beer.png" alt="" title="rr-beer" width="610" height="400" class="alignnone size-full wp-image-385" /></a></p>
<p>You can see the app here: <a href="http://www.otterbrau.com/beer_finder.html" target="_blank">http://www.otterbrau.com</a> (hopefully it is up when you check it out)</p>
<p><strong>Problem:</strong><br />
I like <a href="http://www.russianriverbrewing.com/" target="_blank">Russian River Brewing Co.</a> beer but their beer is super hard to find because they are a small micro-brewery in Northern California (Santa Rosa, Ca.) and have limited production. It would be awesome to have an app that will tell me if I am near a store or bar that sells their beer.</p>
<p><strong>Solution:</strong><br />
Create a small web app using <a href="http://nodejs.org/" target="_blank">node.js</a> to pull stores and bars from a database of <a href="http://www.russianriverbrewing.com/" target="_blank">Russian River Brewing Co.</a> beer resellers. This app needs to be able to open a connection to a mysql database and return the proper data in the proper format ie JSON to the front end so I can then construct a google map and list of stores in California in the browser using JavaScript.</p>
<p>Luckily <a href="http://nodejs.org/" target="_blank">node.js</a> makes creating a service that listens on a specific port that queries the database and returns JSON pretty easy&#8230;</p>
<p>For the data, I found that Russian River publishes their reseller directory on their site in a table based format. It wasn&#8217;t hard to grab that data, format it into a suitable format to import into mysql. &#8212; I converted it to csv, created the table with the proper fields and did a standard import.</p>
<p>Once I got the data in the database I constructed my <a href="http://nodejs.org/" target="_blank">node.js</a> server. I am using <a href="http://nodejs.org/" target="_blank">node.js</a> v.0.2.2 yea out of date by now&#8230; I am needing to update that&#8230; maybe my server will crash less&#8230; anyways here is the code to create the server. Check out the comments for explanation of what everything means. If you are following along at home you will need to get <a href="http://nodejs.org/" target="_blank">node.js</a> from <a href="http://nodejs.org/" target="_blank">here</a> and you are also going to want to download and install <a href="http://npmjs.org/" target="_blank">npm</a>, the node package manager and the node mysql package. There are a couple but they pretty much work exactly the same. You can search for them <a href="http://search.npmjs.org/" target="_blank">here</a>.</p>
<p><code>var gently = new (require('gently'));<br />
<br />
var  sys = require("sys"),<br />
http = require("http"),<br />
url = require("url"),<br />
path = require("path"),<br />
fs = require("fs"),<br />
events = require("events");<br />
<br />
// Create node.js server<br />
http.createServer(function(request, response) {<br />
// Require mysql plugin<br />
&nbsp;&nbsp;var Client = require('mysql').Client,<br />
&nbsp;&nbsp;client = new Client();<br />
// MYSQL username and password<br />
&nbsp;&nbsp;client.user = 'foo';<br />
&nbsp;&nbsp;client.password = 'bar';<br />
<br />
//client.debug = true;<br />
// Connect to the db<br />
&nbsp;&nbsp;client.connect();<br />
// This grabs the pathname after the base url from the request.<br />
// i.e. the /beer after http://www.otterbrau.com<br />
&nbsp;&nbsp;var uri = url.parse(request.url).pathname;<br />
&nbsp;&nbsp;if(uri === "/beer") {<br />
// do the mysql db stuffs<br />
&nbsp;&nbsp;&nbsp;&nbsp;client.query('USE russian_river;');<br />
&nbsp;&nbsp;&nbsp;&nbsp;client.query(<br />
&nbsp;&nbsp;&nbsp;&nbsp;'SELECT * FROM sellers',<br />
&nbsp;&nbsp;&nbsp;&nbsp;gently.expect(function selectCb(err, results, fields) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (err) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw err;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;response.sendHeader(200, { "Content-Type" : "text/plain" });<br />
&nbsp;&nbsp;&nbsp;&nbsp;console.log(results);<br />
&nbsp;&nbsp;&nbsp;&nbsp;response.write("getMarkerData("+JSON.stringify(results)+")");<br />
&nbsp;&nbsp;&nbsp;&nbsp;response.close();<br />
&nbsp;&nbsp;&nbsp;&nbsp;client.end();<br />
&nbsp;&nbsp;&nbsp;&nbsp;})<br />
<br />
&nbsp;&nbsp;&nbsp;);<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;else {<br />
&nbsp;&nbsp;&nbsp;response.write("oh no you didn't!");<br />
&nbsp;&nbsp;}<br />
// this is the port the server listens on<br />
}).listen(4020);<br />
<br />
sys.puts("Server running at http://localhost:4020/");</code></p>
<p>Not that bad, huh? Less than 50 lines of code and you have a server that queries a mysql database and returns the results as JSON wrapped in a callback function called getMarkerData&#8230; To start up your app you can do one of two different things. You can actually create a bootable service where you can start and stop your server by going start {appname} or stop {appname} or you can use initctl start {appname} initctl stop {appname} I prefer the former solution. For more info on how to do this check out <a href="http://kevin.vanzonneveld.net/techblog/article/run_nodejs_as_a_service_on_ubuntu_karmic/" target="_blank">Kevin van Zonneveld&#8217;s blog.</a> Now I am using Ubuntu server 10 so this only really applies to that&#8230; im sure their are similar or exactly the same ways to do this on other flavors of linux, OSX or heaven forbid Windows&#8230;</p>
<p>Now to the front end.</p>
<p>I created an basic HTML page which uses JavaScript to ping my <a href="http://nodejs.org/" target="_blank">node.js</a> server for the JSON and then renders everything on the front end using the google maps api and my own rendering functions.</p>
<p>Here are my scripts&#8230; I&#8217;ll leave it to you to check out the full HTML <a href="http://www.otterbrau.com" target="_blank">here</a> to see how it all works together.</p>
<p><code><br />
&nbsp;&nbsp;var map;<br />
&nbsp;&nbsp;var markersArray = [];<br />
<br />
// Initialize the google map<br />
&nbsp;&nbsp;function initialize() {<br />
// Center the map and create a marker at the RR brewery in Santa Rosa<br />
&nbsp;&nbsp;&nbsp;&nbsp;var rrbrew = new google.maps.LatLng(38.441287, -122.71162);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var mapOptions = {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zoom: 7,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;center: rrbrew,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapTypeId: google.maps.MapTypeId.TERRAIN<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp;&nbsp;&nbsp;map =  new &nbsp;&nbsp;&nbsp;&nbsp;google.maps.Map(document.getElementById("map_canvas"), mapOptions);<br />
<br />
          // RR Brewery Marker<br />
&nbsp;&nbsp;&nbsp;&nbsp;var marker = new google.maps.Marker({<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: rrbrew,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map: map,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title:"Russian River Brewery"<br />
&nbsp;&nbsp;});<br />
&nbsp;&nbsp;var contentString = "Russian River Brewery"<br />
&nbsp;&nbsp;var infowindow = new google.maps.InfoWindow({<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: contentString<br />
&nbsp;&nbsp;});<br />
<br />
&nbsp;&nbsp;google.maps.event.addListener(marker, 'click', function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;infowindow.open(map,marker);<br />
&nbsp;&nbsp;});<br />
<br />
         // Make JSON call to my node.js server for beer listings<br />
&nbsp;&nbsp;&nbsp;&nbsp;$("&lt;script/&gt;").attr("src", "http://www.otterbrau.com:4020/beer").appendTo('head');<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;function addMarker(location, placeName, sellerAddy) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var marker = new google.maps.Marker({<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: location,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map: map,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title: placeName,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html: "&lt;strong&gt;"+placeName+"&lt;br /&gt;&lt;/strong&gt;" + sellerAddy<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;var infowindow = new google.maps.InfoWindow({<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: placeName<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;google.maps.event.addListener(marker, 'click', function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infowindow.setContent(this.html);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infowindow.open(map, this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;markersArray.push(marker);<br />
&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;function getMarkerData(data) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var city;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var cityComp;<br />
		// Loop through Sellers and construct both map markers and business listings separated by city<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (i in data) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sellerLocation = new google.maps.LatLng(data[i].latitude, data[i].longitude);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sellerName = data[i].name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sellerAddy = data[i].address+" "+data[i].city+", "+data[i].state+" "+data[i].zipcode+" "+data[i].phone;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addMarker(sellerLocation, sellerName, sellerAddy);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cityComp = data[i].city;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (city == cityComp) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;city = cityComp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('&lt;div/&gt;').attr('class', 'rr-city-blk').append("&lt;h2&gt;"+cityComp+"&lt;/h2&gt;").appendTo('.rr-body-hldr');<br />
&nbsp;&nbsp;&nbsp;&nbsp;city = cityComp;<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;$('.rr-body-hldr').append("&lt;div class='rr-bus-listing' onclick='moveToSeller("+data[i].latitude+", "+data[i].longitude+");'&gt;&lt;div class='rr-loc-name'&gt;"+data[i].name+"&lt;/div&gt;&lt;div class='rr-addy'&gt;"+data[i].address+" "+data[i].city+" "+data[i].state+" "+data[i].zipcode+"&lt;/div&gt;&lt;div class='rr-phone'&gt;"+data[i].phone+"&lt;/div&gt;&lt;/div&gt;");<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;$('&lt;div/&gt;').attr('class', 'clear').appendTo('.rr-body-hldr');<br />
<br />
				 // Make seller listings clickable<br />
&nbsp;&nbsp;$('.rr-bus-listing').click(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;$.scrollTo(0, 3000);<br />
&nbsp;&nbsp;});<br />
}<br />
<br />
  function moveToSeller(sellat, sellong) {<br />
&nbsp;&nbsp; var centSel = new google.maps.LatLng(sellat, sellong);<br />
&nbsp;&nbsp;map.setCenter(centSel);<br />
&nbsp;&nbsp;map.setZoom(15);<br />
	}<br />
</code></p>
<p>And that is it&#8230;</p>
<p><strong>Conclusions:</strong><br />
<a href="http://nodejs.org/" target="_blank">node.js</a> is pretty cool, pretty fast and pretty easy to develop with but it is also pretty unstable. My server crashes every day or two&#8230; I have to continually restart it. Now it ain&#8217;t all bad because this is not a commercial app I am not going to release to the world but it does make me weary about using it as a real world solution just yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/simple-web-app-using-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zootool JSON widget</title>
		<link>http://bodesigns.com/zootool-json-widget/</link>
		<comments>http://bodesigns.com/zootool-json-widget/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 14:52:05 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=159</guid>
		<description><![CDATA[Creating a Zooltool feed widget in less than 20 lines of javascript&#8230; So you use Zootool to catalog your design inspiration but it would be cool to place them on your site, right? Well you&#8217;re in luck. Zootool has nice little JSON api which allows you to query your account and pull your feed in [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a Zooltool feed widget in less than 20 lines of javascript&#8230;</p>
<p>So you use <a href="http://zootool.com/">Zootool</a> to catalog your design inspiration but it would be cool to place them on your site, right?</p>
<p>Well you&#8217;re in luck. <a href="http://zootool.com/">Zootool</a> has nice little JSON api which allows you to query your account and pull your feed in JSON (you can do a ton of other things too) and in less than 20 lines of code I can show you how to do it.</p>
<p><strong>Here is an example:</strong><br />
<a href="http://bodesigns.com/projects/zootools.html"><img class="alignnone size-full wp-image-184" title="zootool-wid" src="http://bodesigns.com/wp-content/uploads/2010/08/zootool-wid.jpg" alt="" width="620" height="166" /></a></p>
<p>This code requires jQuery, mainly because I like how jQuery makes it easy to create elements and iterate through JSON but if you know javascript, you can totally do this without it&#8230; and you need to sign up for a developer account on <a href="http://zootool.com/api/docs">zootool.com</a>.</p>
<p>Once you have a dev account and your apikey, you are ready to go.</p>
<p><strong>Here is the code:</strong><br />
<code><br />
&lt;!-- jQuery --&gt;<br />
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;<br />
<br />
&lt;!-- This is where your feed images will go --&gt;<br />
&lt;div class="zooToolList"&gt;&lt;/div&gt;<br />
<br />
&lt;!-- Create JSON request and attach to the top of the document --&gt;<br />
&lt;script&gt;<br />
var script = document.createElement('script');<br />
script.src = 'http://zootool.com/api/users/items/?apikey=yourApiKey&amp;      amp;username=yourUserNam&amp;limit=10&amp;callback=zooRsp';<br />
script.type = 'text/javascript';<br />
var head = document.getElementsByTagName('head').item(0);<br />
head.appendChild(script);<br />
<br />
&lt;!-- Callback function --&gt;<br />
function zooRsp (data) {<br />
$.each(data, function(item) {<br />
$("&lt;a/&gt;").attr({<br />
href : this.permalink,<br />
target : '_blank'<br />
}).append(<br />
$("&lt;img/&gt;").attr({<br />
src : this.thumbnail,<br />
'class' : 'zooThumb'<br />
})<br />
).appendTo(".zooToolList");<br />
});<br />
}<br />
&lt;/script&gt;</code></p>
<p>just replace yourApiKey with your api key and yourUserName with your username.</p>
<p><a href="http://www.bodesigns.com/projects/zootools.html">Here</a> is a stand alone version that you can copy and paste the code out of&#8230;</p>
<p><strong>How it works:</strong><br />
Basically this code appends your API request to the top of your HTML file, which fires the query, and the returned object is a JSON object with all of your data with a callback function attached to it called zooRsp. The zooRsp function takes the JSON object and just loops through it and creates the elements based on the data and plunks them in the zooToolList div&#8230;</p>
<p>all you have to do is style up the resulting links and images to your liking and you are done&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/zootool-json-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zootool: A great design resource</title>
		<link>http://bodesigns.com/zootool-a-great-design-resource/</link>
		<comments>http://bodesigns.com/zootool-a-great-design-resource/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 18:10:09 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[Design Resources]]></category>
		<category><![CDATA[UI/UX Design]]></category>

		<guid isPermaLink="false">http://bodesigns.com/?p=153</guid>
		<description><![CDATA[Zooltool is a really cool way of saving and cataloging all of the design resources you come across everyday while browsing the web. There is a lot of &#8220;design resource&#8221; sites out there from design blogs like smashingmagazine.com, webdesignledger.com and alistapart.com to cool tools like ajaxload.info and css-tricks.com/examples/ButtonMaker but zootool has to be one of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zootool.com" target="_blank">Zooltool</a> is a really cool way of saving and cataloging all of the design resources you come across everyday while browsing the web.</p>
<p>There is a lot of &#8220;design resource&#8221; sites out there from design blogs like <a href="http://www.smashingmagazine.com" target="_blank">smashingmagazine.com</a>, <a href="http://www.webdesignledger.com" target="_blank">webdesignledger.com</a> and <a href="http://www.alistapart.com" target="_blank">alistapart.com</a> to cool tools like <a href="http://ww.ajaxload.info" target="_blank">ajaxload.info</a> and <a href="http://www.css-tricks.com/examples/ButtonMaker" target="_blank">css-tricks.com/examples/ButtonMaker</a> but <a href="http://www.zootool.com" target="_blank">zootool</a> has to be one of my favorites.</p>
<p><a href="http://bodesigns.com/wp-content/uploads/2010/08/zootool.jpg"><img class="alignnone size-full wp-image-155" title="zootool" src="http://bodesigns.com/wp-content/uploads/2010/08/zootool.jpg" alt="" width="620" height="458" /></a></p>
<p>Basically you can break the site into 3 parts.</p>
<p>1. This really cool script that you bookmark in your browser that injects javascript into the page and allows you to capture a webpage or individual image or video resources from that page and then save them to your Zooltool collections.</p>
<p>2. Your collection of images and resources that you can come back to and browse for inspiration</p>
<p>3. A cool public feed of other users inspirational images that you can see what you are missing in your everyday browsing of the web</p>
<p>(actually there is a fourth&#8230; their developer api so you can plug your feed into your site or whatever)</p>
<p>This site is awesome. The usability of the site is superb which makes it really easy to leverage this site in my everyday design life.</p>
]]></content:encoded>
			<wfw:commentRss>http://bodesigns.com/zootool-a-great-design-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

