<?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</title>
	<atom:link href="http://blog.buzamoto.com/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>When ripoffs go wrong</title>
		<link>http://blog.buzamoto.com/2010/07/01/when-ripoffs-go-wrong/</link>
		<comments>http://blog.buzamoto.com/2010/07/01/when-ripoffs-go-wrong/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 18:30:57 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=289</guid>
		<description><![CDATA[I just saw this in a flash ad:

which is clearly a rip off of the classic eye bee m poster by Paul Rand:

The rule to ripping something off is to make it better. In this case, a massive failure. If I ever get old and need grandpa reading glasses, I will not go to Lens [...]]]></description>
			<content:encoded><![CDATA[<p>I just saw this in a flash ad:</p>
<p><a href="http://blog.buzamoto.com/2010/07/01/when-ripoffs-go-wrong/ln/" rel="attachment wp-att-290"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/07/ln-500x578.jpg" alt="" title="ln" width="500" height="578" class="aligncenter size-medium wp-image-290" /></a></p>
<p>which is clearly a rip off of the classic eye bee m poster by Paul Rand:</p>
<p><a href="http://blog.buzamoto.com/2010/07/01/when-ripoffs-go-wrong/ibm/" rel="attachment wp-att-291"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/07/ibm.jpg" alt="" title="ibm" width="405" height="217" class="aligncenter size-full wp-image-291" /></a></p>
<p>The rule to ripping something off is to make it better. In this case, a massive failure. If I ever get old and need grandpa reading glasses, I will not go to Lens Crafters!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/07/01/when-ripoffs-go-wrong/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>Nerding Out At WWDC 2010</title>
		<link>http://blog.buzamoto.com/2010/06/07/nerding-out-at-wwdc-2010/</link>
		<comments>http://blog.buzamoto.com/2010/06/07/nerding-out-at-wwdc-2010/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 02:18:31 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/2010/06/07/nerding-out-at-wwdc-2010/</guid>
		<description><![CDATA[
Nerding out at WWDC. If you&#8217;re here, I&#8217;ll see you around. Lets meet at the Thurs Beer Bash!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.buzamoto.com/2010/06/07/nerding-out-at-wwdc-2010/sany0071/" rel="attachment wp-att-279"><img src="http://blog.buzamoto.com/wp-content/uploads/2010/06/SANY0071-500x375.jpg" alt="" title="WWDC" width="500" height="375" class="aligncenter size-medium wp-image-279" /></a></p>
<p>Nerding out at WWDC. If you&#8217;re here, I&#8217;ll see you around. Lets meet at the Thurs Beer Bash!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/06/07/nerding-out-at-wwdc-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feedabot Viewer : A Video</title>
		<link>http://blog.buzamoto.com/2010/05/19/feedabot-viewer-a-video/</link>
		<comments>http://blog.buzamoto.com/2010/05/19/feedabot-viewer-a-video/#comments</comments>
		<pubDate>Thu, 20 May 2010 02:39:44 +0000</pubDate>
		<dc:creator>buza</dc:creator>
				<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=255</guid>
		<description><![CDATA[
I finally got around to putting up a video of the Feedabot Viewer.
]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" 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://vimeo.com/moogaloop.swf?clip_id=11886056&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=11886056&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I finally got around to putting up a video of the Feedabot Viewer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/05/19/feedabot-viewer-a-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Navigating the Feedabot Archive</title>
		<link>http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/</link>
		<comments>http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/#comments</comments>
		<pubDate>Wed, 12 May 2010 00:55:45 +0000</pubDate>
		<dc:creator>buza</dc:creator>
				<category><![CDATA[Note]]></category>

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

Every day, the collection of pages rendered by feedabot grows larger. In fact, there are approximately 250,000 pages in the feedabot archive as of a few days ago. Using the current web-based interface to navigate through this collection (one mouse click loads six new images), it would take approximately 35 hours of nonstop clicking to view all [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-243" href="http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/screen-shot-2010-05-11-at-1-32-57-pm/"><img title="Screen shot 2010-05-11 at 1.32.57 PM" src="http://blog.buzamoto.com/wp-content/uploads/2010/05/Screen-shot-2010-05-11-at-1.32.57-PM-500x318.png" alt="" width="500" height="318" /></a></p>
<p><a rel="attachment wp-att-241" href="http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/screen-shot-2010-05-11-at-1-53-36-pm/"><img class="alignnone size-medium wp-image-241" title="Screen shot 2010-05-11 at 1.53.36 PM" src="http://blog.buzamoto.com/wp-content/uploads/2010/05/Screen-shot-2010-05-11-at-1.53.36-PM-500x322.png" alt="" width="500" height="322" /></a><a rel="attachment wp-att-242" href="http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/screen-shot-2010-05-11-at-1-54-32-pm/"><img class="alignnone size-medium wp-image-242" title="Screen shot 2010-05-11 at 1.54.32 PM" src="http://blog.buzamoto.com/wp-content/uploads/2010/05/Screen-shot-2010-05-11-at-1.54.32-PM-500x322.png" alt="" width="500" height="322" /></a></p>
<p>Every day, the collection of pages rendered by <a href="http://feedabot.com/">feedabot</a> grows larger. In fact, there are approximately 250,000 pages in the feedabot archive as of a few days ago. Using the current web-based interface to navigate through this collection (one mouse click loads six new images), it would take approximately <em>35 hours</em> of nonstop clicking to view all of those pages. A choice of layout similar to the <a href="http://tmv.proto.jp/">Tumblr Mosaic Viewer</a> would certainly help matters, but only slightly. It was only a matter of time before coming to the realization that there must be a better way to navigate (and further explore) such a large collection of web pages.</p>
<p>At this point, we must leave the browser and head back to the desktop. Even with rich media technologies such as Flash, the browser really isn&#8217;t the best place to experiment with interfaces for quickly navigating large data sets. The desktop viewer for the feedabot archive, tentatively called the &#8216;feedabot viewer&#8217;, was designed to be clean, fun, and aesthetically pleasing.</p>
<p>Interaction with the viewer is purely mouse-based, containing no popup menus or dialog boxes. A day&#8217;s worth of feedabot-rendered pages is loaded with a flick of the horizontal scroll wheel. Navigation through the resulting set occurs through the use of the vertical scroll wheel, and the mouse cursor position is used to reveal the tweet that contained the link of the rendered page. At this point, the user may &#8217;select&#8217; the page with a mouse click to extract the image resources from the page itself. The resulting images are placed on a layer in front of the view, with navigation possible through the use of the horizontal scroll wheel. When the mouse cursor position moves beyond the currently selected page, these images disappear. One can only hope that navigating the web will be this pleasant in the future.</p>
<p>A few more images of the viewer in action can be found on my blog, and in this <a href="http://www.flickr.com/photos/kylebuza/sets/72157623919095799/">Flickr set</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/05/11/navigating-the-feedabot-archive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PhotoViewer + Feedabot</title>
		<link>http://blog.buzamoto.com/2010/04/23/photoviewer-feedabot/</link>
		<comments>http://blog.buzamoto.com/2010/04/23/photoviewer-feedabot/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 07:49:32 +0000</pubDate>
		<dc:creator>buza</dc:creator>
				<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=231</guid>
		<description><![CDATA[
Hooking up Tak&#8217;s outstanding PhotoViewer to Feedabot is clearly an excellent idea. Here&#8217;s proof.
]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-230" href="http://blog.buzamoto.com/2010/04/23/photoviewer-feedabot/feedabot_viewer/"><img class="alignnone size-full wp-image-230" title="feedabot_viewer" src="http://blog.buzamoto.com/wp-content/uploads/2010/04/feedabot_viewer.png" alt="" width="455" height="363" /></a></p>
<p>Hooking up Tak&#8217;s outstanding PhotoViewer to <a href="http://feedabot.com">Feedabot</a> is clearly an excellent idea. Here&#8217;s proof.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/04/23/photoviewer-feedabot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhotoViewer with CSS Transition Goodies</title>
		<link>http://blog.buzamoto.com/2010/04/14/photoviewer/</link>
		<comments>http://blog.buzamoto.com/2010/04/14/photoviewer/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 23:46:24 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=215</guid>
		<description><![CDATA[
I wanted to play with the new CSS transition stuff, to see what all the fuss was about. At the same time I wanted to make something useful, so I thought why not make a little site for my friend Dave, who is one bad ass photographer. I have a rough demo up and it [...]]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10946270&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10946270&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p>I wanted to play with the new CSS transition stuff, to see what all the fuss was about. At the same time I wanted to make something useful, so I thought why not make a little site for my friend Dave, who is one bad ass photographer. I have a rough demo up and it works pretty well. It only works with Safari 4, but the good news is that it also works with Mobile Safari.</p>
<p>It&#8217;s really nice that the animation is defined in the CSS and you don&#8217;t need any JavaScript to move objects. It was also really simple to implement, most of the work was done in about an hour. The interaction is simple. Click a picture to zoom into it, then a full version loads, click on it and you zoom back out. You can also move the thumbnails around.</p>
<p>I had to violate some ui for the iPad because of the way mobile safari handles events, or more precisely, doesn&#8217;t handle events. I wanted to maintain the native gestures of but weirdly enough safari does fire any events when double tapping to zoom in, as stated in their documentation. Why?</p>
<p>I decided implementing my own photo uploading/managing would be too much of a pain in the ass, after all Dave isn&#8217;t paying me for this. Yes, this may come as a shock, but I&#8217;m not a total asshole. So I decided to use Flickr as a CMS. Since the API allows for a JavaScript callback, there&#8217;s no backend proxy work required.</p>
<p>Anyway, here&#8217;s a little taste of how it works. You need Safari 4 or iPhone OS 3. Currently, there are three different ways to load photos.</p>
<p>1) Load from a JSON file</p>
<p>Loading a JSON file, don&#8217;t pass any query terms: <a href="http://mud.mitplw.com/PhotoViewer/">http://mud.mitplw.com/PhotoViewer/</a></p>
<p>The actual JSON file is: <a href="http://mud.mitplw.com/PhotoViewer/index.json"> http://mud.mitplw.com/PhotoViewer/index.json</a></p>
<p>2) Load Photosets from a Flickr user</p>
<p>Pass a photoset=flickr_user_id query, like this (using <a href="http://black.mitplw.com/">Luis&#8217;s</a> <a href="http://www.flickr.com/photos/blackaller/">Flickr account</a>)</p>
<p><a href="http://mud.mitplw.com/PhotoViewer/?photoset=75903973@N00">http://mud.mitplw.com/PhotoViewer/?photoset=75903973@N00</a></p>
<p>HINT: you can look up user_ids with <a href="http://idgettr.com/">idGettr</a>.</p>
<p>3) Load Photos from Flickr using tag search</p>
<p>Pass any comma delimited tags like ?drunk,punks</p>
<p><a href="http://mud.mitplw.com/PhotoViewer/?drunk,punks">http://mud.mitplw.com/PhotoViewer/?drunk,punks</a></p>
<p>Finally, I&#8217;ll post the source on github when I finally finish Dave&#8217;s site. Also, maybe in the near future I&#8217;ll add some local storage and HTML5 video support&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/04/14/photoviewer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Private Members and Prototype</title>
		<link>http://blog.buzamoto.com/2010/03/20/private-members-and-prototype/</link>
		<comments>http://blog.buzamoto.com/2010/03/20/private-members-and-prototype/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 02:26:40 +0000</pubDate>
		<dc:creator>mud</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=207</guid>
		<description><![CDATA[When writing JavaScript, most people don&#8217;t think about member access. Every member in an object is essentially a public variable. This is because there isn&#8217;t support for declaring variable modifiers (ie. public, protected, private) in the language. For most simple developments, this shouldn&#8217;t be a problem, and I never really thought too hard about it. [...]]]></description>
			<content:encoded><![CDATA[<p>When writing JavaScript, most people don&#8217;t think about member access. Every member in an object is essentially a public variable. This is because there isn&#8217;t support for declaring variable modifiers (ie. public, protected, private) in the language. For most simple developments, this shouldn&#8217;t be a problem, and I never really thought too hard about it. But now that I&#8217;m knee deep in a big JavaScript project (and interesting new JS projects popping up like <a href="http://nodejs.org">node.js</a>) putting more consideration into encapsulation is a good idea.</p>
<p>According to <a href="http://crockford.com">Douglas Crockford</a> it&#8217;s possible to create <a href="http://javascript.crockford.com/private.html">private variables</a> and methods, and privileged methods (public methods with access to private variables and methods). Crockford&#8217;s article also gives us some patterns to follow which we can easily follow.</p>
<p>I was curious to see how this might look like in my preferred JS framework, <a href="http://prototypejs.org">Prototype.js</a>. It didn&#8217;t take long before I concluded that you can&#8217;t use private variables with Class.create().</p>
<p>Here&#8217;s a rather useless class:</p>
<pre>
var AssetRequest = Class.create({
  initialize: function(_id, _url) {
    this.id      = _id;
    this.url     = _url;
    this.loaded  = false;
    this.content = null;
    this.request = null;
  },
  load: function() {
    if (!this.loaded) {
      this.request = new Ajax.Request(this.url, {
        onSuccess: function(transport) {
          this.loaded = true;
          this.content = transport.responseText;
          Event.fire(document, 'assetrequest:loaded', this);
        },
        onFailure: function() {
          Event.fire(document, 'assetrequest:failed', this);
        }
      });
    }
  }
});
</pre>
<p>The idea here is that you will create an AssetRequest object for an asset, say a JSON file. As you can imagine, all the members are editable. You can do something really dumb like this:</p>
<pre>
var request = new AssetRequest('req1', '/assets/asset-1.js');
request.loaded = true;
if (request.loaded) {
  alert(request.id + ' is loaded');
}
</pre>
<p>If you count on request.loaded to tell you if an asset has been loaded, it&#8217;s not reliable. So obviously we want to make this a private variable set it&#8217;s value internally, and create a privileged method that will provide access to its value. But you&#8217;ll see that this is actually not possible if we construct AssetRequest with Prototype&#8217;s Class.create.</p>
<p>It&#8217;s tempting to write:</p>
<pre>
var AssetRequest = Class.create((function() {
  var id,
      url,
      loaded  = false,
      content = null,
      request = null;

  return {
    initialize: function(_id, _url) {
      id  = _id;
      url = _url;
    },
    load: function() {
      if (!loaded) {
        request = new Ajax.Request(url, {
          onSuccess: function(transport) {
            loaded = true;
            content = transport.responseText;
            Event.fire(document, 'assetrequest:loaded', this);
          },
          onFailure: function() {
            Event.fire(document, 'assetrequest:failed', this);
          }
        });
      }
    },
    getURL:   function() { return url; },
    isLoaded: function() { return loaded; }
  }
})());
</pre>
<p>If you try this out, you&#8217;ll soon realize something is wrong:</p>
<pre>
var req = new AbstractRequest('1', '/request1');
alert(req.getURL());
//-> '/request'
var req2 = new AbstractRequest('2', '/request2');
alert(req2.getURL());
//-> '/request2'
alert(req.getURL());
//-> '/request2' ... this isn't good!
</pre>
<p>It seems the &#8220;private&#8221; variables that are created are not instance variables, instead they are &#8220;static&#8221; variables. I then thought the only way to create private variables would be defining the variables and all private/privileged methods inside the initialize method. But that&#8217;s where I gave up since that would be just so dirty looking.</p>
<p>I decided to not use Class.create and instead create my own constructor, just like the Crock style. So now our example will look like:</p>
<pre>
var AssetRequest = function(_id, _url) {
  var that    = this,
      id      = _id,
      url     = _url,
      loaded  = false,
      content = null,
      request = null;

  this.load = function() {
    if (!loaded) {
      request = new Ajax.Request(url, {
        onSuccess: function(transport) {
          loaded = true;
          content = transport.responseText;
          Event.fire(document, 'assetrequest:loaded', that);
        },
        onFailure: function() {
          Event.fire(document, 'assetrequest:failed', that);
        }
      });
    }
  };
  this.getURL   = function() { return url; };
  this.isLoaded = function() { return loaded; };
};
</pre>
<p>The problem now is that this new class can&#8217;t be extended as if it were created with Class.create. For now I only use this method for classes that don&#8217;t need to be subclassed, but hopefully in the near future, there will be an update to Prototype that will allow private variables!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/03/20/private-members-and-prototype/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Resource Peeking in Feedabot</title>
		<link>http://blog.buzamoto.com/2010/02/23/resource-peeking-in-feedabot/</link>
		<comments>http://blog.buzamoto.com/2010/02/23/resource-peeking-in-feedabot/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 22:06:03 +0000</pubDate>
		<dc:creator>buza</dc:creator>
				<category><![CDATA[Note]]></category>

		<guid isPermaLink="false">http://blog.buzamoto.com/?p=189</guid>
		<description><![CDATA[
Quick Look-like interaction in the browser! Read more here.
]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-192" href="http://blog.buzamoto.com/2010/02/23/resource-peeking-in-feedabot/feedabot_peeker/"><img class="alignnone size-medium wp-image-192" title="feedabot_peeker" src="http://blog.buzamoto.com/wp-content/uploads/2010/02/feedabot_peeker-500x370.png" alt="" width="500" height="370" /></a></p>
<p><a rel="attachment wp-att-192" href="http://blog.buzamoto.com/2010/02/23/resource-peeking-in-feedabot/feedabot_peeker/"></a><a href="http://www.apple.com/macosx/what-is-macosx/quick-look.html">Quick Look</a>-like interaction in the browser! Read more <a href="http://buza.mitplw.com/blog/?p=285">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.buzamoto.com/2010/02/23/resource-peeking-in-feedabot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
