<?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>ClickOnChris</title>
	<atom:link href="http://www.clickonchris.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clickonchris.com</link>
	<description>Christopher G Johnson: programmer, entrepreneur, gamer</description>
	<lastBuildDate>Sat, 21 Jan 2012 23:31:29 +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>Download Sources for SpringSource Tool Suite and Grails 1.3.7</title>
		<link>http://www.clickonchris.com/2012/01/sts-download-sources-grail/</link>
		<comments>http://www.clickonchris.com/2012/01/sts-download-sources-grail/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 00:19:04 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=358</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://grails.org">Grails</a> is a great framework framework that enables rapid development with Java. Like with any framework however, you sometimes get stuck and need to take a look under the covers to solve a problem.</p>
<p>Today I was fighting with mapping a many-to-many relationship (a common occurrence in grails), and needed to figure out exactly why Grails and Hibernate were not doing what I expected.  One of the great things about Java is that nearly the whole stack is open source so you can just step through the code to see what is going on, as long as you can <em>find </em>the code (and navigate through injected dependencies, but that is a different story).</p>
<p>Eclipse Maven plugins provide great tools to &#8216;Download Sources&#8217; start viewing them immediately when you step into some third party library code.  I am developing a Grails application on SpringSource Tool Suite (STS, v2.8.2 as of this writing), which is becoming the industry standard IDE for Spring and Grails based applications.  Since Grails uses a Maven-like dependency management system, you would expect STS to be able to download sources for for any of the grails dependencies easily, right?</p>
<p>Not quite.</p>
<p>While this is a feature that might work for Grails 2.0, if you&#8217;re using Grails 1.3.7 then you will find a plugin named <em><a href="http://www.grails.org/plugin/eclipse-scripts">eclipse-scripts</a></em> that enables you to download sources and then configure your projects so that STS can find the sources.  Here&#8217;s what you do:</p>
<blockquote><p>
<pre><pre>grails install-plugin eclipse-scripts
grails compile
grails download-sources-and-javadocs
grails sts-link-sources-and-javadocs</pre></pre>
</p></blockquote>
<p>Then restart STS and refresh your project.  Now you can navigate into your project&#8217;s Grails Dependencies and view their source through STS!</p>
<p>I found the solution here: <a href="https://issuetracker.springsource.com/browse/STS-1440?focusedCommentId=36879&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-36879">https://issuetracker.springsource.com/browse/STS-1440?focusedCommentId=36879&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-36879</a></p>
<p>Credit for creating the eclipse-scripts plugin to <a href="http://twitter.com/#!/lhotari">Lari Hotari</a></p>
<g:plusone href="http://www.clickonchris.com/2012/01/sts-download-sources-grail/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2012/01/sts-download-sources-grail/&text=Download+Sources+for+SpringSource+Tool+Suite+and+Grails+1.3.7&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2012/01/sts-download-sources-grail/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2012/01/sts-download-sources-grail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Groovy Lunch and Learn</title>
		<link>http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/</link>
		<comments>http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 05:03:19 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=355</guid>
		<description><![CDATA[I gave a talk at the Geneca office back in July and did not realize that it was available on the internet until today. Linky: http://genecalal.posterous.com/groovy-talk-thursday-july-21]]></description>
			<content:encoded><![CDATA[<p>I gave a talk at the Geneca office back in July and did not realize that it was available on the internet until today.</p>
<p>Linky: <a href="http://genecalal.posterous.com/groovy-talk-thursday-july-21">http://genecalal.posterous.com/groovy-talk-thursday-july-21</a></p>
<g:plusone href="http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/&text=Groovy+Lunch+and+Learn&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/12/groovy-lunch-and-learn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Optimization: Doing Science</title>
		<link>http://www.clickonchris.com/2011/06/performance-optimization-doing-science/</link>
		<comments>http://www.clickonchris.com/2011/06/performance-optimization-doing-science/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 03:37:51 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=320</guid>
		<description><![CDATA[I couldn&#8217;t hold a candle to Brian Green on such topics as Quantum Entaglement, Higgs Boson, or Grand Unified Theory (despite obtaining a B.A. in Physics), however I can apply the scientific method to improving the performance of your software. In this article I will explain a basic, but often overlooked foundation for improving the [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t hold a candle to Brian Green on such topics as Quantum Entaglement, Higgs Boson, or Grand Unified Theory (despite obtaining a <a title="Augustana Graduation" href="http://physics.augustana.edu/alumni/2004/commencement-photo.html" target="_blank">B.A. in Physics</a>), however I <em>can</em> apply the scientific method to improving the performance of your software.</p>
<div id="attachment_337" class="wp-caption alignright" style="width: 372px"><a href="http://www.sciencebuddies.org/science-fair-projects/project_scientific_method.shtml" target="_blank"><img class="size-full wp-image-337" title="Scientific Method" src="http://www.clickonchris.com/wp-content/uploads/2011/06/overview_scientific_method2.gif" alt="" width="362" height="348" /></a><p class="wp-caption-text">The Scientific Method (sciencebuddies.org)</p></div>
<p>In this article I will explain a basic, but often overlooked foundation for improving the performance of any software application.</p>
<p>Much of software development is an art, but performance tuning is a science.  I&#8217;ve seen a lot of good developers waste time significant amounts of time on performance with little to show for it, or just as bad, improve performance without knowing exactly which change had the desired effect.</p>
<p>Do you remember talking about the Scientific Method from your high school science class?  The diagram on the right is a refresher.  The scientific method is the repeatable process on which all scientific exploration is based.  It gives scientists across the world a common language and framework to compare the process and outcomes of experiments.</p>
<p>The scientific process provides a few of important points that can be applied to software performance optimization:</p>
<ol>
<li>Repeatable process &#8211; use the same process for every performance enhancement you make</li>
<li>Only modify one variable at a time &#8211; Do not make multiple tweaks at the same time.</li>
<li>Record the results of each optimization.  Track what you did and how much it helped.</li>
</ol>
<div id="attachment_343" class="wp-caption alignright" style="width: 290px"><a href="http://www.clickonchris.com/wp-content/uploads/2011/06/performanceOptimization2.gif"><img class="size-full wp-image-343 " title="performance Optimization" src="http://www.clickonchris.com/wp-content/uploads/2011/06/performanceOptimization2.gif" alt="" width="280" height="495" /></a><p class="wp-caption-text">Performance Optimization Method (clickonchris.com)</p></div>
<p>This sounds simple right?  It is.  The tough part for software developers is to never break these rules during a round of optimizations.  To the right I&#8217;ve also included a more detailed diagram of what the scientific process looks like when applied to performance optimization.  Let&#8217;s call it the Performance Optimization Method.</p>
<p><em>But I know what I&#8217;m doing!  Why shouldn&#8217;t I make multiple tweaks at once?</em></p>
<p>Lets say you do make two changes at once.  You optimize two queries and drop the page load time from 3s to .1s.  Do you know how much relative impact the changes had?  Did each change reduce the cost by the same amount (50%/50%)?  Did one query account for most of the cost (75%/25%)?  Or did one of the changes not even have any impact (100%/0%)?  What if the two changes were somehow interdependent?  For the most part these questions are impossible to answer unless you use a repeatable process and only modify one variable at a time.  There are exceptions *(there are always exceptions.  If you have a good profiling tool that tells you exactly what two different method calls cost and you are absolutely sure they are not somehow related then you could cut a corner and make multiple changes at once.  If the results do not turn out as expected you still need to go back and make the changes one at a time).  By the way, I hope you are testing against a volume of data you expect in production.</p>
<p>Don&#8217;t forget to record the result of each optimization.  This way you can <a href="http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/" target="_blank">throw your results into a table</a>, and with a little explanation about the process and results you turn it into a report and send it to management so they can see how you&#8217;re spending their budget (and how good you are at science).  Having these sorts of metrics reports also makes it easy for stakeholders to justify the time spent on performance optimization activities.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Diminishing_returns" target="_blank">law of diminishing returns</a> applies to performance enhancements.  At some point you will have picked all of the low-hanging fruit and enhancements start to get progressively more expensive.  Stakeholders need insight into how this is progressing on your project so they can make decisions on how much more to spend on performance.  Metrics reports should provide sufficient detail for stakeholders to make those decisions.</p>
<p>Ultimately you will end up with a faster application and a clear story of how you got there.  Isn&#8217;t science fun?</p>
<g:plusone href="http://www.clickonchris.com/2011/06/performance-optimization-doing-science/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/06/performance-optimization-doing-science/&text=Performance+Optimization%3A+Doing+Science&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/06/performance-optimization-doing-science/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/06/performance-optimization-doing-science/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing JBoss&#8217;s Memory Footprint</title>
		<link>http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/</link>
		<comments>http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 17:58:41 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=323</guid>
		<description><![CDATA[I am working on a project to convert a handful of J2EE applications from an Oracle OC4J application (no longer supported) server to JBoss 5.1.0.  Among the many challenges in the conversion is the fact that JBoss&#8217;s default profile has a significantly larger memory footprint than OC4J.  In the past I have just accepted that [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a project to convert a handful of J2EE applications from an Oracle OC4J application (no longer supported) server to JBoss 5.1.0.  Among the many challenges in the conversion is the fact that JBoss&#8217;s default profile has a significantly larger memory footprint than OC4J.  In the past I have just accepted that <strong>Jboss uses over 400MB of heap space before you even deploy anything.</strong> This time however we were hoping to reuse the same hardware from the old application server with the new application server.  When the test system started paging and eventually using up all of the physical memory available, we were forced to choose between ordering more memory and trying to tune jboss to reduce the memory footprint.</p>
<p>We ended up having a lot of success reducing the footprint through tuning.  <strong>Bottom line: we reduced the memory footprint by 120MB, and the startup time from 53s to 24s</strong></p>
<p>Here were the steps taken</p>
<table border="0" width="550">
<tbody>
<tr>
<td width="189" valign="bottom"></td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom"><strong>Heap Size (MB)</strong></td>
<td width="64" valign="bottom"><strong>Used (MB)</strong></td>
<td width="101" valign="bottom"><strong>Reduction in Used (MB)</strong></td>
</tr>
<tr>
<td width="189" valign="bottom"><strong>Starting Heap</strong></td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom"><strong>419</strong></td>
<td width="64" valign="bottom"><strong>314</strong></td>
<td width="101" valign="bottom"></td>
</tr>
<tr>
<td width="189" valign="bottom"><span style="color: #800000;">commented out debug level MBeans annotation in deployers.xml</span></td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom"><span style="color: #800000;">322</span></td>
<td width="64" valign="bottom"><span style="color: #800000;">247</span></td>
<td width="101" valign="bottom"><strong><span style="color: #800000;">67</span></strong></td>
</tr>
<tr>
<td width="189" valign="bottom">removed ejb3 services</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">317</td>
<td width="64" valign="bottom">238</td>
<td width="101" valign="bottom">9</td>
</tr>
<tr>
<td width="189" valign="bottom">removed messaging folder &amp; props</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">310</td>
<td width="64" valign="bottom">238</td>
<td width="101" valign="bottom">0</td>
</tr>
<tr>
<td width="189" valign="bottom"><span style="color: #800000;">removed seam &amp; admin-console</span></td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom"><span style="color: #800000;">256</span></td>
<td width="64" valign="bottom"><span style="color: #800000;">205</span></td>
<td width="101" valign="bottom"><span style="color: #800000;"><strong>33</strong></span></td>
</tr>
<tr>
<td width="189" valign="bottom">Removed xnio-deployer and xnio-provider</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">256</td>
<td width="64" valign="bottom">203</td>
<td width="101" valign="bottom">2</td>
</tr>
<tr>
<td width="189" valign="bottom">removed ROOT.war</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">256</td>
<td width="64" valign="bottom">203</td>
<td width="101" valign="bottom">0</td>
</tr>
<tr>
<td width="189" valign="bottom">removed management</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">256</td>
<td width="64" valign="bottom">199</td>
<td width="101" valign="bottom">4</td>
</tr>
<tr>
<td width="189" valign="bottom">removed jbossws.sar</td>
<td width="64" valign="bottom"></td>
<td width="113" valign="bottom">256</td>
<td width="64" valign="bottom">193</td>
<td width="101" valign="bottom">6</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The instructions for each step can be found : <a href="http://community.jboss.org/wiki/JBoss5xTuningSlimming">http://community.jboss.org/wiki/JBoss5xTuningSlimming</a></p>
<p>Notes on my environment and testing process:</p>
<ul>
<li>Windows XP, JDK 1.6.0_22,</li>
<li>JBoss 5.1.0.GA.  Xmx=512M , Xmx=256 (this is why heap didn&#8217;t drop below 256)</li>
<li>I used jvisualvm to watch the heap and &#8220;used&#8221; memory values</li>
<li>For the &#8220;Used&#8221; memory, I took the maximum observed value while JBoss was starting.  If you understand that a time vs. memory usage graph follows a sawtooth pattern as objects are instantiated and garbage collected, then I took the value from the tip of the highest tooth.</li>
</ul>
<g:plusone href="http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/&text=Reducing+JBoss%E2%80%99s+Memory+Footprint&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/06/tuning-reducing-jboss-memory-footprint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eliminating Blog Waste</title>
		<link>http://www.clickonchris.com/2011/05/eliminating_blog_wast/</link>
		<comments>http://www.clickonchris.com/2011/05/eliminating_blog_wast/#comments</comments>
		<pubDate>Tue, 03 May 2011 04:51:18 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=315</guid>
		<description><![CDATA[I&#8217;ve recently bought into the idea that the best design is achieved when you can no longer find anything to eliminate while still achieving your goals.  This idea also aligns well with the concepts of Lean process improvement, and the constant elimination of waste. With this in mind, I simplified my blog UI today, switching [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently bought into the idea that the best design is achieved when you can no longer find anything to eliminate while still achieving your goals.  This idea also aligns well with the concepts of Lean process improvement, and the constant elimination of waste.</p>
<p>With this in mind, I simplified my blog UI today, switching to this theme from iNove (<a href="http://wordpress.org/extend/themes/inove">http://wordpress.org/extend/themes/inove</a>).  Its not a big change, but its an improvement.</p>
<g:plusone href="http://www.clickonchris.com/2011/05/eliminating_blog_wast/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/05/eliminating_blog_wast/&text=Eliminating+Blog+Waste&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/05/eliminating_blog_wast/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/05/eliminating_blog_wast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Fluff Just Stuff 2011, Madison, WI</title>
		<link>http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/</link>
		<comments>http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 19:54:02 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=303</guid>
		<description><![CDATA[I attended the No Fluff Just Stuff conference in Madison, WI this weekend. It was a great chance to learn the newest Java trends and share struggles in programming with people much like myself, even if most of them were cheeseheads. Here are some of my reflections on the state of Java tech post-conference: -Java [...]]]></description>
			<content:encoded><![CDATA[<p>I attended the <a href="http://www.nofluffjuststuff.com/">No Fluff Just Stuff</a> conference in Madison, WI this weekend.  It was a great chance to learn the newest Java trends and share struggles in programming with people much like myself, even if most of them were cheeseheads.  Here are some of my reflections on the state of Java tech post-conference:</p>
<p>-Java 7 is underwhelming, mostly because it will not have closures.  It will however introduce enhancements to speed up Groovy, JRuby, and Scala</p>
<p>-If I read between the lines what features are in HTML and any of them are supported by Chrome, then I think that HTML5+Chrome could easily turn into a gaming platform!</p>
<p>-There is no question that Groovy is the &#8220;next big thing&#8221; for Java.  Get on board.</p>
<p>-A java developer could easily add Hadoop to his resume (and dollars to his pocket), by learning Hadoop with <a href="http://www.cascading.org/">Cascading</a>.  Hadoop-worthy scale data sets are available for free from amazon: <a href="http://aws.amazon.com/publicdatasets/">http://aws.amazon.com/publicdatasets/</a></p>
<p>Grails is really cool.  I wish there was a hosting platform available that was anything close to Heroku for Rails.  I think it is unlikely that we will hear any good Startup stories with Grails for that reason.</p>
<g:plusone href="http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/&text=No+Fluff+Just+Stuff+2011%2C+Madison%2C+WI&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/02/no-fluff-just-stuff-2011-madison-wi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebooker2 Demo Video</title>
		<link>http://www.clickonchris.com/2011/02/facebooker2-demo-video/</link>
		<comments>http://www.clickonchris.com/2011/02/facebooker2-demo-video/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 09:08:25 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=287</guid>
		<description><![CDATA[I published my first ever screen cast tonight. enjoy! The source code is available here: https://github.com/clickonchris/facebooker-demo]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="600" height="360" src="http://www.youtube.com/embed/H5s5yKcO6r8" frameborder="0" allowfullscreen></iframe></p>
<p>I published my first ever screen cast tonight.  enjoy!</p>
<p>The source code is available here: <a href="https://github.com/clickonchris/facebooker-demo">https://github.com/clickonchris/facebooker-demo</a></p>
<g:plusone href="http://www.clickonchris.com/2011/02/facebooker2-demo-video/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/02/facebooker2-demo-video/&text=Facebooker2+Demo+Video&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/02/facebooker2-demo-video/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/02/facebooker2-demo-video/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sprite Club</title>
		<link>http://www.clickonchris.com/2011/01/sprite-club/</link>
		<comments>http://www.clickonchris.com/2011/01/sprite-club/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 02:40:54 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Business Ventures]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=278</guid>
		<description><![CDATA[I have been working on a Facebook application in my spare time for quite a while now and I think that it is finally interesting enough to start telling people about. The application is a game called Sprite Club; it is a place where you can judge kids (sprites) on the basis of cuteness, and [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a Facebook application in my spare time for quite a while now and I think that it is finally interesting enough to start telling people about.</p>
<p><a href="http://www.clickonchris.com/wp-content/uploads/2011/01/sc_logo.gif"><img class="size-full wp-image-282 alignnone" title="Sprite Club banner" src="http://www.clickonchris.com/wp-content/uploads/2011/01/sc_logo.gif" alt="Sprite Club banner" width="600" height="125" /></a></p>
<p>The application is a game called <strong>Sprite Club</strong>; it is a place where you can judge kids (sprites) on the basis of cuteness, and upload a photo of your own sprite to have them compete for internet fame.  The application is accessible from</p>
<p><a href="http://apps.facebook.com/spriteclub">apps.facebook.com/spriteclub</a></p>
<p>or from the friendly url:<br />
<a href="http://www.spriteclub.net">www.spriteclub.net</a></p>
<p>The idea was conceived by my uncle, Matthew Deutch, while looking for an outlet to prove that his daughter is the cutest kid on the internet (We think she&#8217;s pretty great).  I am in the project to learn how to do Facebook and social media development.  The application is written in Rails and uses the Facebooker library to interface with Facebook.</p>
<p>If you have a chance to check out the application and have any feedback, please share.  Feedback is extremely important to me &#8211; the more brutally honest the better.  I will repay feedback with beer.</p>
<p>Enjoy!</p>
<g:plusone href="http://www.clickonchris.com/2011/01/sprite-club/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2011/01/sprite-club/&text=Sprite+Club&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2011/01/sprite-club/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2011/01/sprite-club/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebooker &#8211; converting from FBML to iFrame</title>
		<link>http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/</link>
		<comments>http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 06:24:58 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=264</guid>
		<description><![CDATA[In my free time I dabble in Ruby on Rails development and Facebook application development.   Last year I picked up Mike Mangino’s book, Developing Facebook Platform Applications with Rails, which gives great step-by-step instructions for creating a facebook FBML application using the facebooker gem. FBML is not the only type of Facebook application, however.  There [...]]]></description>
			<content:encoded><![CDATA[<p>In my free time I dabble in Ruby on Rails development and Facebook application development.   Last year I picked up Mike Mangino’s book, Developing Facebook Platform Applications with Rails, which gives great step-by-step instructions for creating a facebook FBML application using the facebooker gem.</p>
<p>FBML is not the only type of Facebook application, however.  There is also the iframe method, which Lead Facebook Engineer Charlie Cheever has been endorsing for a while.  His blog post gives a good comparison of the two methods:<a href="http://www.ccheever.com/blog/?p=10">http://www.ccheever.com/blog/?p=10</a> .  In addition to this, the Facebook developer roadmap (<a href="http://developers.facebook.com/roadmap">http://developers.facebook.com/roadmap</a> ) shows that soon you will not be able to create new FBML applications, and is recommending that existing FBML applications be migrated to iframe.  The message is clear: time to switch to iframe people!</p>
<p>Unfortunately the tutorials performing this kind of switch are hard to come by.  Mike Mangino has created a new RoR gem named facebooker2 to support iframe and facebook connect development but documentation is limited.</p>
<p>This blog post includes some documentation on how to convert a facebooker FBML app to a facebooker2 iframe app.  Read Charlie Cheever’s blog post to understand the architectural differences between the FBML and iframe approach, especially the bit about server-side FBML.  More details here: <a href="http://developers.facebook.com/docs/reference/fbml/serverFbml">http://developers.facebook.com/docs/reference/fbml/serverFbml</a></p>
<p>Remove the facebooker gem</p>
<p>Get Facebooker2 and mogli<br />
<pre><code>
$gem install facebooker2
$gem install mogli
</code></pre></p>
<p>Reccomended: unpack gems to /vendor (<a href="http://errtheblog.com/posts/50-vendor-everything">http://errtheblog.com/posts/50-vendor-everything</a>)</p>
<p>Update environment.rb, set <pre>RAILS_GEM_VERSION = 2.3.5</pre></p>
<p>Create an initializers/load_facebook_yaml.rb file to read from facebook.yml.  It should include a single line:</p>
<p>Facebooker2.load_facebooker_yaml</p>
<p>Inside your facebook.yml file add the following two parameters to each environment config:<br />
<pre><code>app_id: 131336175362
secret: f7b15a925058e7be60f0a4d56294e938</code></pre></p>
<p>Application controller</p>
<p>Rename application.rb to application_controller.rb.  Add the following command to your application_controller.rb</p>
<p><pre>Include Facebooker2::Rails::Controller</pre></p>
<p>Comment out the set_current_user method</p>
<p>Paste in this method:</p>
<p><pre><code>
&nbsp;&nbsp;def current_user
&nbsp;&nbsp;&nbsp;&nbsp;if session[:user_id]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@current_user ||= User.find(session[:user_id])
&nbsp;&nbsp;&nbsp;&nbsp;elsif current_facebook_user and @current_user.nil?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@current_user = User.find_by_facebook_id(current_facebook_user.id)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session[:user_id] = @current_user.id
&nbsp;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;end
</code></pre></p>
<p>Add a ‘ensure_authenticated_to_facebook’ method to keep making sure that the user has a facebook session when accessing your site.  In my case my sessions/login page just displays “please login to facebook”, and since we’re in an iframe in the context of apps.facebook.com/myapp, there is a facebook login prompt displayed immediately above my page.</p>
<p><pre><code>
before_filter :ensure_authenticated_to_facebook&nbsp;&nbsp;
def ensure_authenticated_to_facebook
&nbsp;&nbsp; if current_user == nil
&nbsp;&nbsp;&nbsp;&nbsp; logger.info &quot;current user is nil&quot;
&nbsp;&nbsp;&nbsp;&nbsp; redirect_to :controller=&gt;&#039;sessions&#039;, :action=&gt;&#039;login&#039;
&nbsp;&nbsp; end
end
</code></pre></p>
<p>With Facebook Connect it is not required that your application runs inside the context of apps.facebook.com/myapp.  Your login page could technically detect if it is running in app.facebook.com and only display “please login”, otherwise if you are running it as a standalone page present the user with a facebook connect login button.</p>
<p>Enable oauth 2.0.  This will facebook cause to send a “signed_request” request parameter to your application once the user has authenticated.  Mogli will use this token to authenticate the user and create the current_facebook_user object.</p>
<p><a href="http://www.clickonchris.com/wp-content/uploads/2010/11/signed_request1.jpg"><img src="http://www.clickonchris.com/wp-content/uploads/2010/11/signed_request1.jpg" alt="" title="oath signed request" width="669" height="348" class="alignnone size-full wp-image-270" /></a></p>
<p>Copy/Rename your .rhtml.erb files to .html.erb.  You will no longer have a canvas and will never render rhtml files again.</p>
<p>Remove  &lt;%= facebook_messages %&gt; in your erb files or replace them with &lt;%= flash[:error]  %&gt; or &lt;%= flash[:error]  %&gt;</p>
<p>Put the facebook connect javascript initializer in your layouts file so that it gets executed during each page load</p>
<p><pre><code>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% fb_connect_async_js&nbsp;&nbsp;do %&gt;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= yield :fb_connect%&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% end %&gt;
</code></pre></p>
<p>This should always be the first snippet of javascript to be executed as it will instantiate the FB global variable that the rest of your page will probably use.</p>
<p>Start going through your erb files and replace FBML code with &lt;fb:serverFBML /&gt; and their javascript SDK equivalents.  This is pretty much the final step and will require the most effort.  Use the documentation and test console found here: <a href="http://developers.facebook.com/docs/reference/javascript/">http://developers.facebook.com/docs/reference/javascript/</a></p>
<p>-facebooker2 reference project: <a href="https://github.com/mmangino/facebooker2_fb_connect_example">https://github.com/mmangino/facebooker2_fb_connect_example</a></p>
<p>-images for stream publisher popups need to be accessible by facebook servers.  You used to use a reverse tunnel so facebook could read them directly from your local server.  If you have images that fall into this category you may still need to use a reverse tunnel.</p>
<g:plusone href="http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/&text=Facebooker+%E2%80%93+converting+from+FBML+to+iFrame&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2010/11/facebooker-converting-from-fbml-to-iframe/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Facebook Javascript SDKs &#8211; Old vs. New</title>
		<link>http://www.clickonchris.com/2010/11/facebook-javascript-sdks/</link>
		<comments>http://www.clickonchris.com/2010/11/facebook-javascript-sdks/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 05:48:32 +0000</pubDate>
		<dc:creator>clickonchris</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.clickonchris.com/?p=235</guid>
		<description><![CDATA[There are two ways to handle initializing your fb:serverFBML tags 1 &#8211; using the New Javascript SDK doc: http://developers.facebook.com/docs/reference/javascript/ (identified by the js library http://connect.facebook.net/en_US/all.js) &#60;script src=&#34;http://connect.facebook.net/en_US/all.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; &#160;&#160; FB.init({appId: &#039;your app id&#039;, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;status: true, &#160;&#160;&#160;&#160;&#160;&#160;cookie: true, &#160;&#160;&#160;&#160;&#160;&#160;xfbml: true}); &#160;&#160; FB.Event.subscribe(&#039;auth.sessionChange&#039;, function(response) { &#160;&#160;&#160;&#160; if (response.session) { &#160;&#160;&#160;&#160;&#160;&#160; // A user has logged in, [...]]]></description>
			<content:encoded><![CDATA[<p>There are two ways to handle initializing your fb:serverFBML tags</p>
<p><b>1 &#8211; using the New Javascript SDK</b><br />
doc: <a href="http://developers.facebook.com/docs/reference/javascript/">http://developers.facebook.com/docs/reference/javascript/</a></p>
<p>(identified by the js library http://connect.facebook.net/en_US/all.js)</p>
<p><pre><code>&lt;script src=&quot;http://connect.facebook.net/en_US/all.js&quot;&gt;&lt;/script&gt; 
&lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;&nbsp; FB.init({appId: &#039;your app id&#039;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status: true,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookie: true,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xfbml: true});
&nbsp;&nbsp; FB.Event.subscribe(&#039;auth.sessionChange&#039;, function(response) {
&nbsp;&nbsp;&nbsp;&nbsp; if (response.session) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // A user has logged in, and a new cookie has been saved
&nbsp;&nbsp;&nbsp;&nbsp; } else {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The user has logged out
&nbsp;&nbsp;&nbsp;&nbsp; }
&nbsp;&nbsp; });
&lt;/script&gt;
</code></pre></p>
<p><b>2 &#8211; Using the Old Javascript SDK </b><br />
 which is what our friends at StackOverflow have done.  I reference this thread because it kept coming up while I was solving this problem, and the solution they give is outdated.</p>
<p><a href="http://stackoverflow.com/questions/820421/can-i-use-facebooks-fbfriend-selector-in-an-iframe">http://stackoverflow.com/questions/820421/can-i-use-facebooks-fbfriend-selector-in-an-iframe</a></p>
<p>(identified by the js library http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php and xd_receiver.html)<br />
doc:<a href="http://developers.facebook.com/docs/reference/oldjavascript/">http://developers.facebook.com/docs/reference/oldjavascript/ </a><br />
<pre><code>
&lt;script src=&quot;http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;FB_RequireFeatures(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;CanvasUtil&quot;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FB.XdComm.Server.init(&#039;/xd_receiver.html&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FB.CanvasClient.startTimerToSizeToContent();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;);
&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;FB_RequireFeatures([&quot;XFBML&quot;], function(){ FB.Facebook.init(&quot;Your Facebook API Key&quot;, &quot;/xd_receiver.html&quot;); });&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/script&gt;
</code></pre></p>
<g:plusone href="http://www.clickonchris.com/2010/11/facebook-javascript-sdks/"></g:plusone><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.clickonchris.com/2010/11/facebook-javascript-sdks/&text=Facebook+Javascript+SDKs+%E2%80%93+Old+vs.+New&via=clickonchris&related=richardxthripp%2Ctweetthisplugin" title="Post to Twitter"><img class="nothumb" src="http://www.clickonchris.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter6.png" alt="Post to Twitter" /></a></p></div><div align="left" style="vertical-align:top;display:inline-block; padding:2px 10px 10px 35px;"><a name="fb_share" type="button" share_url="http://www.clickonchris.com/2010/11/facebook-javascript-sdks/"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.clickonchris.com/2010/11/facebook-javascript-sdks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

