<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.3" -->
<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/"
	>

<channel>
	<title>live learn code</title>
	<link>http://www.livelearncode.com</link>
	<description>my reflections on stuff</description>
	<pubDate>Sat, 22 Mar 2008 15:53:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>
	<language>en</language>
			<item>
		<title>Future of RFacebook</title>
		<link>http://www.livelearncode.com/archives/30</link>
		<comments>http://www.livelearncode.com/archives/30#comments</comments>
		<pubDate>Thu, 10 Jan 2008 19:05:28 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>personal</category>
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/30</guid>
		<description><![CDATA[I&#8217;ve been maintaining RFacebook for the last 9 months or so, and recently I haven&#8217;t had the time to maintain it.  Unfortunately, I don&#8217;t have any current projects that actually use the Facebook platform on a daily basis, so I have had to rely primarily on patches from the community (thank you!) and bug [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been maintaining RFacebook for the last 9 months or so, and recently I haven&#8217;t had the time to maintain it.  Unfortunately, I don&#8217;t have any current projects that actually use the Facebook platform on a daily basis, so I have had to rely primarily on patches from the community (thank you!) and bug reports from other developers.</p>
<p>When I wrote the initial library, I was fairly new to Ruby and proper language idioms.  Needless to say, this has led to some not-so-great designs that are difficult to fix while maintaining backward-compatibility.  In particular, the direct access to the API via <strong>method_missing</strong> has turned out to be problematic for some people.  Also, the so-called facepricot chaining (which gives quick access to XML parsing) is particularly poorly designed and I would like to get rid of it if possible.</p>
<p>Ideally, RFacebook 1.0 would do away with the cruft and simplify some of the design.  As I considered certain aspects to redesign, I definitely re-evaluated <a href="http://facebooker.rubyforge.org/">Facebooker</a>, a very solid looking Gem and plugin from Chad Fowler and some other experienced Ruby guys.  Much of the improvements I would like to make to RFacebook are already present in Facebooker - API objects converted to Ruby objects, API methods are Ruby-ified, solid documentation, simplified Rails support, etc.  Since RFacebook 1.0 would break a lot of applications (with the removal of facepricot and others), I am considering deferring to Facebooker for future Rails Facebook development.  I am a big fan of not reinventing the wheel, and I feel that the Facebooker team has already achieved the improvements that RFacebook needs.</p>
<p>Through the process of writing and maintaining RFacebook, I&#8217;ve definitely learned quite a bit about Ruby, Rails, behavior-driven development, and the community around it all.  Your comments, feedback, and encouragement helped make it a valuable experience.  However, at this time I would really like to take on some new projects.</p>
<p>Regardless, I definitely <strong>do not want to leave existing RFacebook developers hanging</strong>.  If you want to take over the RFacebook project, <strong>please let me know via the comments</strong>.  I have also contacted the Facebooker developers to see if they are interested in a compatibility module (which I would write) for Facebooker to ease the transition from RFacebook to Facebooker.  Please let me know your thoughts.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/30/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook 0.9.8 out, reinstall your plugin too</title>
		<link>http://www.livelearncode.com/archives/28</link>
		<comments>http://www.livelearncode.com/archives/28#comments</comments>
		<pubDate>Wed, 09 Jan 2008 06:51:49 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/28</guid>
		<description><![CDATA[Hey everyone, RFacebook 0.9.8 is released.  The core API has been cleaned up a bit (although Facepricot is still in there, I plan on deprecating it in version 1.0 in favor of something much less hackish).  The biggest change is that the plugin is now COMPLETELY separate from the Gem.  This means [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone, RFacebook 0.9.8 is released.  The core API has been cleaned up a bit (although Facepricot is still in there, I plan on deprecating it in version 1.0 in favor of something much less hackish).  The biggest change is that the plugin is now COMPLETELY separate from the Gem.  This means that you&#8217;ll need to reinstall your plugin this time around:</p>
<div style="text-align:left; color: maroon; font-weight: bold">script/plugin install svn://rubyforge.org/var/svn/rfacebook/trunk/rfacebook/plugins/rfacebook</div>
<p>The good part is that the Gem is easier to update on a less-frequent basis, while the plugin can get some serious work/reworking without requiring a Gem release each time.  Also, everything <strong>should be Rails 2.0 compatible</strong> now.  Let me know if you still experience any issues with Rails 2.0.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/28/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook to see some updates and code slimming</title>
		<link>http://www.livelearncode.com/archives/27</link>
		<comments>http://www.livelearncode.com/archives/27#comments</comments>
		<pubDate>Sat, 05 Jan 2008 02:22:40 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
	<category>AJAX</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/27</guid>
		<description><![CDATA[It has been a while since I&#8217;ve updated RFacebook, and I finally have the time to do so.  Again, I&#8217;m always looking for dedicated help, since my time is limited as it is.  The project has gotten quite involved, and recent API changes + the Rails 2.0 release has complicated it somewhat.
In spite [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a while since I&#8217;ve updated RFacebook, and I finally have the time to do so.  Again, I&#8217;m always looking for dedicated help, since my time is limited as it is.  The project has gotten quite involved, and recent API changes + the Rails 2.0 release has complicated it somewhat.</p>
<p>In spite of the backlog of bugs and feature requests, you should see some improvements over the next few weeks.  I plan on slimming down the code as much as possible, as well as removing some poorly designed portions of the library.  I&#8217;ll have a few interim updates (0.98 and 0.99), but RFacebook 1.0 will have a much more solid core, with the Rails extensions pulled exclusively into a plugin.</p>
<p>Please let me know your biggest complaints with RFacebook (features, bugs, and code design) so that I can address them all fully.  Good luck Facebooking!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/27/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook Gets Unit Tests</title>
		<link>http://www.livelearncode.com/archives/26</link>
		<comments>http://www.livelearncode.com/archives/26#comments</comments>
		<pubDate>Tue, 28 Aug 2007 03:30:32 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/26</guid>
		<description><![CDATA[Unit Tests Come to RFacebook
Finally, RFacebook on Rails has a unit testing suite.  You can now run Rails testing like any other well-behaved Rails plugin.  My apologies - this was a long time coming.
RFacebook Looking for Developers
The RFacebook project has been maintained mostly by myself, in addition to the very helpful patches of [...]]]></description>
			<content:encoded><![CDATA[<h3>Unit Tests Come to RFacebook</h3>
<p>Finally, <a href="http://rfacebook.rubyforge.org">RFacebook on Rails</a> has a unit testing suite.  You can now run Rails testing like any other well-behaved Rails plugin.  My apologies - this was a long time coming.</p>
<h3>RFacebook Looking for Developers</h3>
<p>The RFacebook project has been maintained mostly by myself, in addition to the very helpful patches of a few others (Evan Weaver and Scott Nedderman, to name just a few).  In the coming months I will be quite busy, and I am looking for other developers that can help maintain the <a href="http:/rubyforge.org/projects/rfacebook">project</a>.</p>
<p>To help ease new developers into the library, I&#8217;ve done a few things starting with version 0.9.2 of the gem:</p>
<ul>
<li><strong>Cleaned up the core</strong> - the API library is now cleaned up of cruft and is much easier to understand</li>
<li><strong>Better documentation</strong> - the core API library is <a href="http://rfacebook.rubyforge.org/doc/">extensively documented</a>, and the plugin extensions are getting better documentation as well.</li>
<li><strong>Unit testing is well-separated</strong> - it is fairly simple to see where to place unit tests for any one component of RFacebook.  Unit tests are organized into separate tests for Rails controller, model, sessions, plugin initialization, and core API calls.
</ul>
<p>Hopefully there are some great Rails developers that would like to contribute to what I think has become a pretty solid library, thanks to the already sizeable contributions of its users.  With continuous vetting by tons of small developers, and a few large ones (like <a href="http://www.facebook.com/apps/application.php?id=2318966938&#038;b&#038;ref=pd">Causes</a>), RFacebook should continue to provide a great, simple way to get into the Facebook Platform.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/26/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook 0.9.1 Released</title>
		<link>http://www.livelearncode.com/archives/25</link>
		<comments>http://www.livelearncode.com/archives/25#comments</comments>
		<pubDate>Mon, 20 Aug 2007 22:48:08 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/25</guid>
		<description><![CDATA[The newest RFacebook gem is released. This release should fix some more session issues, as well as give you better backtraces inside Facebook (when using the Facebook Debug Panel).
Short list of changes:

added basic backtrace rendering to Facebook Debug Panel
added “raw_xml” method to the Facepricot responses
parsing of facebook.yml is more helpful when you specify absolute URLs [...]]]></description>
			<content:encoded><![CDATA[<p>The newest <a href="http://rfacebook.rubyforge.org/">RFacebook</a> gem is released. This release should fix some more session issues, as well as give you better backtraces inside Facebook (when using the <a href="http://rfacebook.rubyforge.org/debugpanel.html">Facebook Debug Panel</a>).</p>
<p><strong>Short list of changes:</strong></p>
<ul>
<li>added basic backtrace rendering to Facebook Debug Panel</li>
<li>added “raw_xml” method to the Facepricot responses</li>
<li>parsing of facebook.yml is more helpful when you specify absolute URLs instead of relative paths</li>
<li>improved usage of fb_sig_session_key to create Rails sessions</li>
<li>miscellaneous corner case fixes to url_for and redirect_to</li>
</ul>
<p>Hope this helps people out.  Initial feedback sounds like it is a pretty solid release.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/25/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook on Rails update</title>
		<link>http://www.livelearncode.com/archives/24</link>
		<comments>http://www.livelearncode.com/archives/24#comments</comments>
		<pubDate>Thu, 16 Aug 2007 19:05:47 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/24</guid>
		<description><![CDATA[The latest gem (0.8.8) adds support for mock ajax and Rails sessions when you are inside the Facebook Canvas.  Detailed summary below

Rails session[] and flash[] work (only ActiveRecord and PStore session containers, memcached store in a future release)
Added in_mock_ajax? to all controllers, so that you know when you are handling a mock ajax operation
Added [...]]]></description>
			<content:encoded><![CDATA[<p>The latest gem (0.8.8) adds support for mock ajax and Rails sessions when you are inside the Facebook Canvas.  Detailed summary below</p>
<ul>
<li><strong>Rails session[] and flash[] work</strong> (only ActiveRecord and PStore session containers, memcached store in a future release)</li>
<li>Added <strong>in_mock_ajax?</strong> to all controllers, so that you know when you are handling a mock ajax operation</li>
<li>Added support for a new url_for parameter, <strong>:mock_ajax => true</strong>, so that you can override the http://app.facebook.com rewriting (since mock ajax URLs have to be absolute)</li>
<li>Fixed a bug where ampersands were being converted to &#038;amp entities in URLs received from the API.  Now, you can use <strong>fbsession.notifications_sendRequest(&#8230;).response</strong>, and the entities will automatically be gsub&#8217;ed with real ampersands</li>
<p>Thanks to everyone who filed bugs and contributed patches for this release!  It&#8217;s looking pretty solid.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/24/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook on Rails</title>
		<link>http://www.livelearncode.com/archives/23</link>
		<comments>http://www.livelearncode.com/archives/23#comments</comments>
		<pubDate>Mon, 06 Aug 2007 07:50:11 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>Ruby</category>
	<category>Rails</category>
	<category>Facebook</category>
	<category>APIs</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/23</guid>
		<description><![CDATA[Another update - wow these are coming fast now.  This weekend I finished up another fairly major upgrade to RFacebook: a true Rails plugin.  Features include:

fbsession and fbparams in both controllers and views
automatic URL rewriting when you are in the Canvas (all URLs made relative to apps.facebook.com)
acts_as_facebook_user
a unique debug panel to help with [...]]]></description>
			<content:encoded><![CDATA[<p>Another update - wow these are coming fast now.  This weekend I finished up another fairly major upgrade to RFacebook: a true Rails plugin.  Features include:</p>
<ul>
<li>fbsession and fbparams in both controllers and views</li>
<li>automatic URL rewriting when you are in the Canvas (all URLs made relative to apps.facebook.com)</li>
<li>acts_as_facebook_user</li>
<li>a unique <a href="http://rfacebook.rubyforge.org/debugpanel.html">debug panel</a> to help with common issues</li>
<li>configuration via <strong>facebook.yml</strong> file</li>
<li>easy SSH <a href="http://rfacebook.rubyforge.org/tunnel.html">tunneling</a> so that you can develop from your local machine</li>
<li>no need to keep the plugin up to date - it stays up to date with the Gem</li>
</ul>
<p>You can get all the information and documentation here: <a href="http://rfacebook.rubyforge.org">rfacebook.rubyforge.org</a>.</p>
<p>Hope you enjoy the new features.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/23/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>RFacebook Updates!</title>
		<link>http://www.livelearncode.com/archives/22</link>
		<comments>http://www.livelearncode.com/archives/22#comments</comments>
		<pubDate>Mon, 30 Jul 2007 07:17:48 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
		<guid isPermaLink="false">http://www.livelearncode.com/archives/22</guid>
		<description><![CDATA[It&#8217;s been awhile since my last blog post, but things haven&#8217;t exactly been quiet on the Facebook API front.  There are tons of apps going up on Facebook every day, and its been pretty exciting.  Hopefully RFacebook has been helping you all get your ideas out there.
There&#8217;s now an official home page for [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been awhile since my last blog post, but things haven&#8217;t exactly been quiet on the Facebook API front.  There are tons of apps going up on Facebook every day, and its been pretty exciting.  Hopefully RFacebook has been helping you all get your ideas out there.</p>
<p>There&#8217;s now an official home page for RFacebook:</p>
<p><a href="http://rfacebook.rubyforge.org/" alt="RFacebook home page">http://rfacebook.rubyforge.org/</a></p>
<p>This will hopefully have the latest docs and information about the Gem.  There has also been some updates to the API syntax:</p>
<h3>&#8220;Facepricot&#8221; Responses</h3>
<p>Every RFacebook API call returns a Facepricot document. This is a wrapper for an Hpricot XML document. Note that ALL of the standard Hpricot methods <strong>still</strong> apply (you can even grab the original Hpricot document via xml.hpricot and use the Hpricot stuff directly). However, a Facepricot document gives you some neat methods that simplify your code.  Now, you don&#8217;t have to type this:</p>
<pre>
sess.friends_get.search("//uid").map{|xmlnode| xmlnode.inner_html} // get an array of all friend UIDs
sess.friends_get.at("//uid").inner_html // get the first UID of friends
</pre>
<p>Instead, you can type this:</p>
<pre>
sess.friends_get.uid_list // get an array of all friend UIDs
sess.friends_get.uid // get the first UID of friends
</pre>
<p>Much cleaner.  Hopefully that helps out.</p>
<h3>Easier Logging</h3>
<p>Another highly requested feature: logging.  Now you can do:</p>
<pre>
sess.logger = MyLogger.new
</pre>
<p>or, if you use Rails</p>
<pre>
sess.logger = RAILS_DEFAULT_LOGGER
</pre>
<p>FacebookSession uses the &#8220;debug&#8221; log method on that logger to provide some useful behind-the-scenes information.</p>
<h3>Caching</h3>
<p>Yep, caching is built in now.  If you make a call like <strong>cached_friends_get</strong>, the FacebookSession will automatically cache the response.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/22/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Making AJAX calls onUnload</title>
		<link>http://www.livelearncode.com/archives/11</link>
		<comments>http://www.livelearncode.com/archives/11#comments</comments>
		<pubDate>Sat, 15 Jul 2006 02:49:34 +0000</pubDate>
		<dc:creator>mjpizz</dc:creator>
		
	<category>coding</category>
	<category>AJAX</category>
		<guid isPermaLink="false">http://blog.mjpizz.com/archives/11</guid>
		<description><![CDATA[I suppose this will be my first &#8220;official&#8221; developer blog entry, so bear with me if it seems a little sparse.  This summer I&#8217;ve been doing a ton of work with object oriented Javascript and AJAX, and up until today the AJAX part has been mostly simplified by Atlas webservice proxies.  However, today [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose this will be my first &#8220;official&#8221; developer blog entry, so bear with me if it seems a little sparse.  This summer I&#8217;ve been doing a ton of work with object oriented Javascript and AJAX, and up until today the AJAX part has been mostly simplified by Atlas webservice proxies.  However, today I hit one of those problems that just hasn&#8217;t been very well documented by anybody else, so I thought I&#8217;d write something about it.</p>
<p>Basically, our application keeps a form of session state server-side, and it needs to be notified when the browser window is closed or refreshed.  Clearly, the thing to do here is to hook into the <strong>window.onUnload</strong> event (side note for new Atlas developers: don&#8217;t use window.onUnload, use <strong>Sys.Application.unload.add([yourUnloadHandler])</strong> instead).</p>
<p>So at first I just went happily along, sending the usual XmlHttpRequest when the page unloaded.  However, this of course poses a problem with the asynchronous response from the server: by the time the response comes back, the page has unloaded and the callback function won&#8217;t exist anymore.  This generates an ugly Javacript &#8220;function is not defined&#8221; error.  In any case, here&#8217;s a nice little picture of what happens:</p>
<p><img id="image12" src="http://blog.mjpizz.com/wp-content/uploads/2006/07/AsyncUnload.jpg" alt="AsynchronousJavacriptUnload" /></p>
<p>The solution here is to make sure that any AJAX requests that you make onUnload are make <strong>synchronously</strong> instead of asynchronously (SJAX?).  This will ensure that the page doesn&#8217;t finish unloading before the server response comes back.  Hence, the much happier picture below:</p>
<p><img id="image13" src="http://blog.mjpizz.com/wp-content/uploads/2006/07/SyncUnload.jpg" alt="SynchronousJavascriptUnload" /></p>
<p>Bertrand Le Roy has a quick <a href="http://weblogs.asp.net/bleroy/archive/2005/12/15/433278.aspx">chunk of Javascript</a> that you can use to do alter the XmlHttpRequest object to temporarily do only synchronous calls.  Use this Javascript before any AJAX calls in your unload event, and you&#8217;ve solved your problem!</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.livelearncode.com/archives/11/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
