<?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>jfrank &#187; open source</title>
	<atom:link href="http://www.joshuafrankamp.com/blog/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshuafrankamp.com/blog</link>
	<description>technology and some random stuff</description>
	<lastBuildDate>Wed, 04 Jan 2012 20:29:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>It&#8217;s Not the Critic Who Counts: 2011 Part 3</title>
		<link>http://www.joshuafrankamp.com/blog/not-the-critic-2011-3/</link>
		<comments>http://www.joshuafrankamp.com/blog/not-the-critic-2011-3/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 02:35:51 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=298</guid>
		<description><![CDATA[Welcome to Part 3 of my year in review. Part 1 was all about changing things up. Part 2 is about a few projects I did, and here are a few more.
linked in left out

I had an thought and built a&#8230; sketch of the concept at www.repcard.org. The idea is basically linked-in for people experiencing homelessness. Instead [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Welcome to Part 3 of my year in review. <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/">Part 1</a> was all about changing things up. <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-2/">Part 2</a> is about a few projects I did, and here are a few more.</div>
<h2>linked in left out</h2>
<div><a href="http://www.repcard.org"><img class="alignnone" src="http://www.repcard.org/images/repcard.png" alt="" width="400" height="229" /></a></div>
<p>I had an thought and built a&#8230; sketch of the concept at <a href="http://www.repcard.org">www.repcard.org</a>. The idea is basically linked-in for people experiencing homelessness. Instead of professional high fives, they would exchange bits of reputation, like ebay&#8217;s based on how many positive impacts they make in the community big and small. Non monetary, since credit/capital isn&#8217;t usually available to that population. The card could function as some sort of ad-hoc resume or a way to gauge trust in someone you meet. I&#8217;m not an expert in this area so I don&#8217;t know if its a good idea, but I wanted to submit it as a sort of working sketch to show it to people in the social work field.</p>
<p><em>Technologies Used: Google App Engine, Gaelyk, Groovy, Java</em></p>
<h2>(un)shredding like a boss</h2>
<div>I jumped in to the Darpa Shredder Challenge at the last minute. I wrote up a <a href="http://www.joshuafrankamp.com/blog/unshredding/">small post about this</a> so I won&#8217;t go into too many details. This was a fun chance to apply some of my machine learning skills that I talked about in <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/">part 1</a>. I used a clustering algorithm to sort piece segments by similarity before a search algorithm attempted to piece together likely candidate neighbors. Here is a video visualization to make you happy.</div>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="301" 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://www.youtube.com/v/lJPmdJ4YQYM?version=3&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="400" height="301" src="http://www.youtube.com/v/lJPmdJ4YQYM?version=3&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div><em>Technologies Used: NumPy, Python, Gimp-Fu/Python-Fu</em></div>
<h2>look no hands, brain surgery for a hotplate</h2>
<div>I started playing with Node at the end of this year. If you&#8217;re going to play with node, you should also be doing something with socket.io because why not they are made for each other! I decided to hack a hotplate stirrer that I had acquired for science. For science, you monster. First I plugged in a locally made <a href="http://www.pjrc.com/teensy/">Teensy</a> Arduino clone chip to a solderless breadboard and loaded up a slightly modified <a href="http://code.google.com/p/arduinoscope/">Arduinoscope</a>. Using that software oscilliscope and a digital multimeter I mapped the pins of the old Motorolla microcontroller (seen right disconnected). I rebuilt the functionality of the original chip in Arduino&#8217;s (easy) C like environment, and then began improving it.</div>
<div><img class="alignnone" src="http://p.twimg.com/AhPu46BCAAA1qay.jpg:small" alt="" width="340" height="192" /></div>
<div>I added a usb &#8211; serial api to the Teensy to control the hardware, I implemented the other side on my laptop in Node. Because that was running on my laptop, it was available on my local wireless network. I chose JQuery Mobile to build a cross platform, ridiculously simple UI with live events on the slider bars. Socket.IO pushes down the hardware state (rpm&#8217;s and temp) and pushes up commands (change rpm or temp) and the teensy sketch gives serial state output and waits for commands.</div>
<div><img class="alignnone" src="http://p.twimg.com/AhkRx16CEAAX_qo.jpg:small" alt="" width="340" height="600" /></div>
<div><em>Technologies Used: Node, Socket.Io, Arduino, Corning Hotplate Stirrer, JQuery Mobile</em></div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/not-the-critic-2011-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Not the Critic Who Counts: 2011 Part 2</title>
		<link>http://www.joshuafrankamp.com/blog/not-the-critic-2011-2/</link>
		<comments>http://www.joshuafrankamp.com/blog/not-the-critic-2011-2/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 00:04:21 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=282</guid>
		<description><![CDATA[In part one I moved and started new things&#8230; here is what else I did.
helicopters that fly upside down
One of my big goals this year was to study machine learning. I worked my way though Andrew Ng&#8217;s Stanford Machine Learning course. One of his demos is flying a helicopter upside down using reinforcement learning.

Technologies used: Python&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/">part one</a> I moved and started new things&#8230; here is what else I did.</p>
<h2>helicopters that fly upside down</h2>
<p>One of my big goals this year was to study machine learning. I worked my way though Andrew Ng&#8217;s Stanford <a href="http://see.stanford.edu/see/courseinfo.aspx?coll=348ca38a-3a6d-4052-937d-cb017338d7b1">Machine Learning course</a>. One of his demos is flying a helicopter upside down using reinforcement learning.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="233" 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://www.youtube.com/v/VCdxqn0fcnE&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="400" height="233" src="http://www.youtube.com/v/VCdxqn0fcnE&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<em>Technologies used: Python&#8217;s NumPy, Octave</em></p>
<h2>transformations in 3d</h2>
<p>I quickly learned that in order to grasp most machine learning algorithms, an understanding of linear algebra was a must. I put Machine Learning on hold and took Gilbert Strang&#8217;s MIT <a href="http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/">Linear Algebra</a> course next. This guy can describe your haircut before and after in terms of a matrix operation. I earned 83,802 Khan Academy points mostly working through semi-advanced mathematics.</p>
<p><em>Technologies used: Python&#8217;s NumPy, Octave</em></p>
<h2>the basic tools of science</h2>
<p>I think everyone should own the basic tools of science, that&#8217;s why this year I set out to buy them. I acquired a 1600x microscope, a digital thermometer, a magnetic stirring hotplate, lab glassware and a balance that is sensitive down to a thousandth of a gram. Somehow in modern media portrayals home science equipment has nothing but bad connotations. I wholly reject that idea. Science belongs at home! In a great article Bill Nye <a href="http://www.setexasrecord.com/arguments/238065-legally-speaking-kids-dont-try-this-at-home">put it best</a></p>
<blockquote><p>People who want to make meth will find ways to do it that don&#8217;t require an Erlenmeyer flask. But raising a generation of people who are technically incompetent is a recipe for disaster</p></blockquote>
<h2>combine at 80 degrees celsius</h2>
<p>Women&#8217;s deodorant is bad. Not because it doesn&#8217;t work, it does, but because it contains aluminum. For those with sensitive skin, its awful. There are also a few potential hazards with applying nano sized metals that are easily absorbable into the human body.  My brother is a PhD chemist, so he helped me with my lab technique. I asked a large chemical company for a sample of sodium sterate (they sent me 2 kilos free!), bought some propylene glycol locally, and made a variant on old spice. Colorless, odorless. My wife loved it, but it needs some work.</p>
<p><img class="alignnone" src="https://twitpic.com/show/iphone/7007u0" alt="" width="426" height="241" /></p>
<h2>wingdings and matisse</h2>
<p>An Android app that uses Wingdings AND Matisse? You&#8217;re thinking &#8220;No you didn&#8217;t&#8221; but in fact I did. I did. In case you forgot these fonts.. let me give you a refresher:</p>
<p><a href="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/12/matissewingdings.png"><img class="alignnone size-full wp-image-293" title="matissewingdings" src="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/12/matissewingdings.png" alt="" width="501" height="103" /></a></p>
<p>I built a task manager with Android push notifications for a client who really really wanted one. I wanted to build an Android app, so we had a deal. A few weeks later it was done. I don&#8217;t know why people complain about Android development, I found it fairly painless.</p>
<p><em>Technologies Used: Java, Android SDK, Eclipse, PHP (client backend), Google&#8217;s Android Push API</em></p>
<h2>no pie for you</h2>
<p><a href="http://www.qrmyride.com/profiles/aytdzk"><img class="alignnone" src="http://www.qrmyride.com/images/flow.png" alt="" width="581" height="160" /></a></p>
<p>A friend of a friend approached me with an idea, and I took it on as a co-founder. We built out a QR powered profile site for hot-rods called <a href="http://www.qrmyride.com/">www.qrmyride.com</a>. After printing up some stickers we got some enthusiastic responses. We even applied for PIE, an incubator here in Portland but we were denied. There was stiff competition, but perhaps they were right. This site never really took off as planned. It costs next to nothing to run, so my partner and I will continue to let it run, but it was a good lesson in the cost of prototyping. I still think the idea is good, especially if adopted by a whole car club for the purposes of a unified car show.</p>
<p><em>Technologies Used: Google App Engine, Java, Groovy, QR codes</em></p>
<p>Next Post: <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-3/">Un-Shredding and Electronic Brain Surgery</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/not-the-critic-2011-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Not the Critic Who Counts: 2011 Part 1</title>
		<link>http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/</link>
		<comments>http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 23:23:39 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[magnolia]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=263</guid>
		<description><![CDATA[This has been a big year for me. So big that you all get a year-end recap of it because you are here, reading my blog. Except it&#8217;s too big to write in one post. So if you didn&#8217;t think you were going to get personal stuff mixed in to this mostly tech blog, now [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a big year for me. So big that you all get a year-end recap of it because you are here, reading my blog. Except it&#8217;s too big to write in one post. So if you didn&#8217;t think you were going to get personal stuff mixed in to this mostly tech blog, now is the time to unsubscribe.</p>
<p>One of my favorite quotes is this:</p>
<blockquote><p>It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood, who strives valiantly, who errs and comes up short again and again, because there is no effort without error or shortcoming, but who knows the great enthusiasms, the great devotions, who spends himself for a worthy cause; who, at the best, knows, in the end, the triumph of high achievement, and who, at the worst, if he fails, at least he fails while daring greatly, so that his place shall never be with those cold and timid souls who knew neither victory nor defeat &#8211; Roosevelt</p></blockquote>
<p>What this means to me is that I am getting comfortable not with success, but with failure. And with failure, slowly, haltingly, comes some measure of success.</p>
<h2>cloud surfing</h2>
<p>At the beginning of 2010 at my job at Mentor I enjoyed moving some more systems to AWS from an acquisition&#8217;s internal server farms. I closed out six years at Mentor; an excellent chapter in my life that I was sad to see end. I miss my co-workers, and agree with <a href="https://twitter.com/#!/barneyb/status/147888504733573120">Barney</a> &#8220;Twitter is such a poor excuse for seeing them every day.&#8221;  When I put my notice in, most were happy for me, some could hardly believe what I was doing. Others didn&#8217;t actually believe that I did not have a position to go to at another safe corporation. They kept asking what my real plan was, and I kept replying: &#8220;I&#8217;m taking a year off to study, to grow, to try new things.&#8221;</p>
<p><em>Technologies used: Bash, Railo, AWS API&#8217;s, Python</em></p>
<h2>life changes. no really it does!</h2>
<p>I<br />
quit my job in March,<br />
moved out of down town in June,<br />
rented a big old house a week later,<br />
became a foster parent in July,<br />
and enrolled as a fake student at PSU.</p>
<h2>it slices, it dices. well no, actually it only slices.</h2>
<p>I had a poor experience with a cloud dashboard company and built autosnappy.com as a response. It makes snapshots for AWS volumes on a schedule. So simple. Happy dance. It broke even almost immediately, and although it doesn&#8217;t make tons of money, there is a lot of room here for growth. A customer is asking to pay for me to develop new features for it currently so I may revisit it and roll out new things. I wanted to build this as compartmentalized as possible. One of my design goals was that the front end know as little as possible about the backing AWS services as it could. So it talks exclusively to the middle python tier, even though it is powerful enough to accomplish both functions. This means that if I needed to I could scale those components separately, and keep the user facing process in a separate linux user/group as the process that talks to AWS and has the security keys.</p>
<p><em>Technologies used: Java Magnolia and Railo templating front end, python web service backend,  AWS SimpleDb storage. Scaleable! Stateless! Cloud!</em></p>
<h2>on being a fake student</h2>
<p>Being a <em>fake</em> student is the best! When you take a one credit class at <a href="http://www.pdx.edu">PSU</a> you have access to super high speed internet, a research library, and a place to go work. I spent a large part of my year hacking code in Food For Thought cafe, next to artists, musicians, and hippies. But that&#8217;s not all. I also have access to the new(ish) Rec Center which has a pool, spa, rock wall and all the normal workout stuff.</p>
<p>Oh, and my one credit class? Yoga. So stressful.</p>
<p>Next post: <a href="http://www.joshuafrankamp.com/blog/not-the-critic-2011-2/">Basic Tools of Science and Flying Helicopters Upside Down</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/not-the-critic-2011-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RapidMiner and Machine Learning</title>
		<link>http://www.joshuafrankamp.com/blog/rapidminer-and-machine-learning/</link>
		<comments>http://www.joshuafrankamp.com/blog/rapidminer-and-machine-learning/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 07:54:56 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=205</guid>
		<description><![CDATA[You know what this picture tells me?

It tells me that BAC, KEY, MI, RF, SNV, and STI are related. They&#8217;re all acronyms, yes, but more than that. They are all banking stock symbols. The node that the arrow points to contains these values. All banks. The nodes on either side contain exclusively real estate holding [...]]]></description>
			<content:encoded><![CDATA[<p>You know what this picture tells me?</p>
<p><a href="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/01/graph_lg.png"><img title="graph_sm" src="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/01/graph_sm.png" alt="" width="201" height="187" /></a></p>
<p>It tells me that BAC, KEY, MI, RF, SNV, and STI are related. They&#8217;re all acronyms, yes, but more than that. They are all banking stock symbols. The node that the arrow points to contains these values. All banks. The nodes on either side contain exclusively real estate holding companies and home builders respectively.</p>
<p>This puts a huge grin on my face.</p>
<p>If you&#8217;ve talked to me in the last several months, I&#8217;ll have probably mentioned at some point that I&#8217;ve been learning some machine learning concepts. I&#8217;ve been watching and working through the examples in the Stanford machine learning <a href="http://see.stanford.edu/see/courseinfo.aspx?coll=348ca38a-3a6d-4052-937d-cb017338d7b1">course by Andrew Ng</a>. On the one hand, the course is excellent. Andrew clearly knows his stuff and teaches toward underlying theory and principle. His goals are exactly how I like to approach a new area of study; always asking why not how. The concepts are compelling but on the other hand the math is difficult for me and it is lacking the kind of &#8220;proof is in the pudding&#8221; mentality that I&#8217;m used to as a programmer. I decided that I also need to approach this topic from the practical side. I&#8217;ve just discovered <a href="http://rapid-i.com">RapidMiner</a> and have been playing with it recently.</p>
<p>My chosen problem set is stock data. I love the uncertainty inherent in the market, its a mass of data, action and reaction. One problem (an easy one to start with) that I&#8217;ve always wanted to work on is stock correlation. Simply put, stocks that are similar move together. If you have two businesses that are similar in industry and size, they will likely move together as they have similar economic environment. News that affects one is much more likely to affect the other than a third unrelated company in another industry. This relationship can be coaxed out of the data. For each stock, you should be able to calculate a web of close &#8220;neighbors&#8221; that move similarly, and moving out from there you may approach another &#8220;neighborhood&#8221; of related stocks. In machine learning this problem could be approached as a time series or as clustering. Since we don&#8217;t know the labels (names of the clusters so to speak) it&#8217;s not classification.</p>
<p><a href="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/01/folder.png"><img title="folder" src="http://www.joshuafrankamp.com/blog/wp-content/uploads/2011/01/folder.png" alt="" width="381" height="414" /></a></p>
<p>After many false starts, I grabbed some stock data and loaded it into RM with the built in jdbc tools they have. I then selected stocks for the last two years without missing data points on days where volume was greater than zero and pulled the set into a hierarchical clustering algorithm. The hierarchical clusterer uses an internal simpler one level cluster (kmeans) and applies it it recursively and in parallel. I also had some promising results with a correlation matrix which showed for example that INTC (Intel) and MU (Micron) are related much more closely than MU and KFT (Kraft).</p>
<p>Its great to be able to test out some of the things that I&#8217;ve been learning about in an environment that lets me try a lot of things in a relatively short amount of time. Up next: Better clustering algorithms, and using class labels from my clustering to train a model for prediction.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/rapidminer-and-machine-learning/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Keeping Dry</title>
		<link>http://www.joshuafrankamp.com/blog/keeping-dry/</link>
		<comments>http://www.joshuafrankamp.com/blog/keeping-dry/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 00:57:13 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=196</guid>
		<description><![CDATA[Did you ever wonder what is shared between all those CF frameworks? I put together a copy paste detector implementation of the interface for cfm and cfc files, as part of the PMD project. I also plugged it into hudson via the DRY visualizer of the output, but that is just candy on top.
Basically it [...]]]></description>
			<content:encoded><![CDATA[<p>Did you ever wonder what is shared between all those CF frameworks? I put together a <a href="http://pmd.sourceforge.net/cpd.html">copy paste detector</a> implementation of the interface for cfm and cfc files, as part of the <a href="http://pmd.sourceforge.net/">PMD project</a>. I also plugged it into hudson via the DRY visualizer of the output, but that is just candy on top.</p>
<p>Basically it works like this:</p>
<ol>
<li>It goes through your code line by line, character by character and builds up overlapping hashes of the content.</li>
<li>Based on your tokenizer, it will ignore certain parts of the code (like whitespace) and so the hashes will be able to handle your 2 tabs vs my 3 spaces and shows that two sections of code are &#8216;the same&#8217;. The tokenizer I am using is the &#8216;anyTokenizer&#8217;, not optimized for CF at all.</li>
<li>Based on a threshold of how big a token range the hashes should cover, it builds a report of all the code you give it and outputs it in a structured format.</li>
</ol>
<p>Now presenting, all of the code duplication between the following ColdFusion projects, run with a token threshold of 200:</p>
<ul>
<li>ColdBricks</li>
<li>Coldbox</li>
<li>ModelGlue</li>
<li>coldmock</li>
<li>mura</li>
<li>MangoBlog</li>
<li>coldspring</li>
<li>mxunit</li>
<li>machii</li>
<li>farcry</li>
<li>fusebox5</li>
</ul>
<p>Well&#8230; I&#8217;m not going to put them all here. Its a large set.</p>
<p>Here are a few samples:</p>
<p>Farcry and mura both use cfformprotect. Cool.</p>
<p>51,515: &lt;file line=&#8221;288&#8243; path=&#8221;/home/jfrank/temp/codeprojects/farcry/core/webtop/cffp/cfformprotect/cffpVerify.cfc&#8221;/&gt;<br />
51,516: &lt;file line=&#8221;287&#8243; path=&#8221;/home/jfrank/temp/codeprojects/mura-5.2.2709/www/requirements/cfformprotect/cffpVerify.cfc&#8221;/&gt;</p>
<p>BlogCFC and MangoBlog both share xmlrpc bits. Nice.</p>
<p>53,956: &lt;file line=&#8221;141&#8243; path=&#8221;/home/jfrank/temp/codeprojects/BlogCFC5/client/xmlrpc/xmlrpc.cfc&#8221;/&gt;<br />
53,957: &lt;file line=&#8221;122&#8243; path=&#8221;/home/jfrank/temp/codeprojects/MangoBlog_1.5/api/xmlrpc.cfc&#8221;/&gt;</p>
<p>The <a href="http://s3.joshuafrankamp.com.s3.amazonaws.com/duplication/cpd.xml">full results</a> are not quite valid xml, because of encrypted cfms. They also contain a lot of boilerplate licenses as you can imagine. It would take a minor amount of cleanup of this output to make it parseable, and removing the licenses would make it much more compact. Also some of the duplication shown may be intentional due to code generation/plugin dependency domains.</p>
<p>Want to run it yourself?</p>
<p>Get the current <a href="http://sourceforge.net/projects/pmd/files/pmd/4.2.5/">PMD jar</a> and grab my <a href="http://s3.joshuafrankamp.com.s3.amazonaws.com/duplication/libs/cpd-cfm.jar">cfm-cpd.jar</a> and <a href="http://s3.joshuafrankamp.com.s3.amazonaws.com/duplication/build.xml">this build file</a> if you&#8217;d like to run it with ant.</p>
<p>Point Ant at a lib directory with those two jars, and run the build against your own code. Don&#8217;t forget the <a href="http://wiki.hudson-ci.org/display/HUDSON/DRY+Plugin">Dry Plugin</a> if you run Hudson!</p>
<p>(Note, the cfm-cpd jar contains a couple overlapping classes with PMD, and relies on the fact that jars are loaded alphabetically and so it will win. This is lame, but so is PMD for making me hard code things in the ant task!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/keeping-dry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nginx Rocks at Proxying</title>
		<link>http://www.joshuafrankamp.com/blog/nginx-rocks-at-proxying/</link>
		<comments>http://www.joshuafrankamp.com/blog/nginx-rocks-at-proxying/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 08:13:38 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=178</guid>
		<description><![CDATA[I was pushing out the magnolia-railo-demo and was looking at the site performance. It was amazing by itself, sending back magnolia-railo built pages in 100ms including wire time from Portland to Dallas raw from Tomcat. On this box I have one IP though and I wanted to use a subdomain for the demo which means [...]]]></description>
			<content:encoded><![CDATA[<p>I was pushing out the <a href="http://magnolia-railo-demo.joshuafrankamp.com/">magnolia-railo-demo</a> and was looking at the site performance. It was amazing by itself, sending back <a href="http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/">magnolia-railo</a> built pages in 100ms including wire time from Portland to Dallas raw from Tomcat. On this box I have one IP though and I wanted to use a subdomain for the demo which means proxying vhosts.</p>
<p>When I proxied it through Apache&#8217;s httpd it took about twice as long for the page to load! (roughly 130-150ms for the base page) It seemed totally ridiculous&#8230; Now in all fairness I&#8217;m no Apache expert, but I decided to drop in nginx as a proxy on the front end and its cost as a proxy is nearly unnoticeable. I wouldn&#8217;t be able to tell it apart from hitting tomcat directly as far as speed is concerned.</p>
<p>I&#8217;ll have to give this a closer look for my other projects&#8230;</p>
<p>One slightly tricky thing is that if you need Apache&#8217;s ProxyPreserveHost in Nginx you need to use proxy_set_header Host like this:</p>
<pre>location / {
   root   /usr/share/nginx/html;
   index  index.html index.htm;
   proxy_set_header Host $host;
   proxy_pass http://127.0.0.1:80;
}</pre>
<p>Sometimes I wonder what it will be like when apache&#8217;s gone. I will probably find myself cding into /etc/httpd/logs and cat access_log over and over&#8230; just to remember old times.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/nginx-rocks-at-proxying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magnolia and Railo Part 2 Redux</title>
		<link>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-redux/</link>
		<comments>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-redux/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 23:52:47 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[magnolia]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=173</guid>
		<description><![CDATA[Here is the example app live from Magnolia and Railo Part 2. I fixed something in the config that was blocking import as well&#8230; so if anyone tried it let me know.
 http://magnolia-railo-demo.joshuafrankamp.com/
If anyone is interested in logging in, let me know and I will give you some credentials to log in and poke around.
For [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the example app live from <a href="http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/">Magnolia and Railo Part 2</a>. I fixed something in the config that was blocking import as well&#8230; so if anyone tried it let me know.</p>
<p><a href="http://magnolia-railo-demo.joshuafrankamp.com/"> http://magnolia-railo-demo.joshuafrankamp.com/</a></p>
<p>If anyone is interested in logging in, let me know and I will give you some credentials to log in and poke around.</p>
<p>For some reason, this is performing crazy fast right now. On the order of 100 ms, across the country network lag included, on an extremely underpowered rackspace cloud machine (256 megs of ram, running mysql, php, httpd, ngnix and tomcat for this app).</p>
<p>Turn on your firebug or chrome inspector and compare it to your CMS&#8230;</p>
<p>I defy any other pure Railo/CFML CMS from topping that for a single uncached hit with three custom cf paragraphs&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magnolia and Railo Part 2: Templating and Paragraphs</title>
		<link>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/</link>
		<comments>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 05:50:57 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[magnolia]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=79</guid>
		<description><![CDATA[This is part two in a three part series on how to make Magnolia CMS and Railo work together beautifully.
If you missed part one you&#8217;ll need to have read it and done all steps to get anything out of this.
Step One: Wipe out your repositories folder
We&#8217;re starting over with content, so at this point I am [...]]]></description>
			<content:encoded><![CDATA[<p>This is part two in a three part series on how to make Magnolia CMS and Railo work together beautifully.</p>
<p>If you missed part one you&#8217;ll need to have <a href="http://www.joshuafrankamp.com/blog/magnolia-and-railo-together-at-last/">read it</a> and done all steps to get anything out of this.</p>
<h3>Step One: Wipe out your repositories folder</h3>
<p>We&#8217;re starting over with content, so at this point I am assuming you dont have anything in your website tree that is not replaceable. If you have something you want to keep, export it first. This is /repositories in the webroot by default, and is the location that magnolia has stored its derby database. Delete it.</p>
<h3>Step Two: Get the magnolia-railo-sample files</h3>
<p>Export some sample files and configuration with subversion.</p>
<pre>svn export https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/ tempWebroot</pre>
<h3>Step Three: Merge the sample files</h3>
<p>Copy the contents of tempWebRoot into your webroot, this will overwrite the two files we wrote last time, and add many more.</p>
<h3>Step Four: Start up your container</h3>
<p>Bootstrapping of the app will occur. While it does, lets go over some of the files that I have prepared for you in this sample.</p>
<ol>
<li>Adding a template renderer
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.template-renderers.cfm.xml">config.modules.templating.template-renderers.cfm.xml</a></li>
<li>This is required to bind the cfm type to a backing class. We will use the JSP renderer, because it is a dispatch model that is native to Railo since it is a web app.</li>
</ol>
</li>
<li>Creating a template definition node, and backing cfm
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.templates.sampleTemplate.xml">config.modules.templating.templates.sampleTemplate.xml</a></li>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/template.cfm">template.cfm</a> with some <a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/assets/">assets/</a> that it needs to render properly</li>
<li>This is a specific template instance, that in a normal magnolia application would represent one of many template choices. For this example, we will create a simple template.</li>
</ol>
</li>
<li>Creating a cf include paragraph definition, dialog, and backing cfm
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.paragraphs.cf.xml">config.modules.templating.paragraphs.cf.xml</a></li>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.paragraphs.cf.xml"></a><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.dialogs.cf.xml">config.modules.templating.dialogs.cf.xml</a></li>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/cfinclude.cfm">cfinclude.cfm</a></li>
</ol>
</li>
<li>Creating an example content style &#8220;Whats New&#8221; paragraph, dialog, and backing cfm
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.paragraphs.whatsNew.xml">config.modules.templating.paragraphs.whatsNew.xml</a></li>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.dialogs.whatsNew.xml">config.modules.templating.dialogs.whatsNew.xml</a></li>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/whatsnew.cfm">whatsnew.cfm</a></li>
</ol>
</li>
<li>Creating a page dialog, this will be an editor for page level properties
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/config.modules.templating.dialogs.page-properties.xml">config.modules.templating.dialogs.page-properties.xml</a></li>
</ol>
</li>
<li>Example Page
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/WEB-INF/bootstrap/common/website.index.xml">website.index.xml</a></li>
<li>This page uses the sampleTemplate, and pulls in the example paragraph types in paragraph instances that show them off.  It also allows access to the page properties dialog.</li>
</ol>
</li>
<li>Magnolia Tag Libraries
<ol>
<li><a href="https://www.joshuafrankamp.com/svn/incubator/magnolia-railo-sample/trunk/META-INF/cms-taglib.tld">cms-taglib.tld</a></li>
<li>These are typically in the magnolia jars, but we need them out where CF can get ahold of them.</li>
</ol>
</li>
</ol>
<h3>Step Five: Hit /index</h3>
<p>Magnolia will render the node at the path /index. Since this node is configured in the magnolia administrator to use the simpleTemplate template, it will include the definition of that template to render the page. The templatePath for simpleTemplate is /template.cfm which is a traditional CFML file on disk. At this point the standard Railo request lifecycle will start, including Application.cf(c|m). Then the file will execute, with one signifigant difference. The magnolia context has been set up, and some request scope variables have already been set for easy access to magnolia state information about the page.</p>
<p>A few notes about parts of the example template.cfm</p>
<ul>
<li> The tag libraries give simple access to magnolia controls and data structures. These allow you to render magnolia chrome inline in CFML.Example:
<pre style="height: 3em;">&lt;cfimport taglib="/tags/cms" prefix="cmsmod" /&gt;
&lt;cfimport taglib="/META-INF/cms-taglib.tld" prefix="cms" /&gt;</pre>
</li>
<li> There are three ways to read information from the content repository. The tag library, request scope context objects, and instantiation of singleton magnolia api objects. They all get the information from the same underlying jcr, but with varying levels of complexity and power.Example:
<pre style="height: 3em;">&lt;cms:setNode var="page" /&gt;...
&lt;title&gt;#page['title']#&lt;/title&gt;</pre>
<p>This pulls the properties from the current content node into a Java Map (struct) whose keys and values give you access to the properties. You can also get at the same information through request['state'] which the reader could dump out and traverse to find all kinds of wonderful things in the <a href="http://dev.magnolia-cms.com/ref/4.2.3/magnolia-core/apidocs/info/magnolia/cms/core/AggregationState.html">api</a></li>
<li> Paragraphs are at the heart of everything in Magnolia. They are the single reason for having templates, is the content you want to put on them. By default, Magnolia dispatches the requests for paragraphs to paragraph handlers which in turn for Java technologies, dispatch them as includes through the web app container. This is the point of failure for a technology like Railo, because each request in Railo assumes that it is the beginning and end of that request. It tries to read multi part data on the inbound request, it tries to set headers and response sizes on the outbound response. That is problematic for paragraphs and a big sticking point in the integration between Railo and Magnolia, and it is also not a problem anymore!<br />
Fortunately, Railo includes its own custom tag concept, and it is simple to implement around the problem. Replacing container includes with  calls in a reimplementation of  (contrary to its name, this is the tag responsible for including <em>paragraphs</em>, not templates). Look for &lt;cmsmod: includeTemplate /&gt; custom tag calls, in a different namespace. That is the custom implementation of the &lt;cms:includeTemplate /&gt; that would have required going outside the current Railo request.Example:</p>
<pre>&lt;div id="center"&gt;
	&lt;cms:contentNodeIterator contentNodeCollectionName="main"&gt;
		&lt;cmsmod:includeTemplate /&gt;
	&lt;/cms:contentNodeIterator&gt;
	&lt;cms:newBar contentNodeCollectionName="main" paragraph="cf,whatsNew" contentnodename="mgnlNew"/&gt;
	&lt;hr /&gt;
&lt;/div&gt;</pre>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Magnolia and Railo, Together at Last</title>
		<link>http://www.joshuafrankamp.com/blog/magnolia-and-railo-together-at-last/</link>
		<comments>http://www.joshuafrankamp.com/blog/magnolia-and-railo-together-at-last/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 21:19:12 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[magnolia]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=55</guid>
		<description><![CDATA[Railo and Magnolia CMS are finally together. It&#8217;s been a bit of a bumpy road, what with issues arising immediately when they first met. A casual observer might think the relationship was doomed. But a funny thing happened over the course of the last year, Railo changed for the better and for that matter so [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.getrailo.com/">Railo</a> and <a href="http://www.magnolia-cms.com/">Magnolia CMS</a> are finally together. It&#8217;s been a bit of a bumpy road, what with <a href="http://jira.jboss.org/jira/browse/RAILO-284">issues</a> <a href="http://jira.jboss.org/jira/browse/RAILO-139">arising</a><a href="http://jira.jboss.org/jira/browse/RAILO-282"> immediately</a> when they first met. A casual observer might think the relationship was doomed. But a funny thing happened over the course of the last year, Railo changed for the better and for that matter so did Magnolia. I&#8217;m proud to say they&#8217;ve even <a href="http://www.magnolia-cms.com/home/customers/case-studies/jboss.html">moved in</a> to the same bulding <a href="http://www.jboss.org/railo/">at JBoss</a> (in a matter of speaking). From what I hear the landlord thinks the world of both of them but they have still led separate lives.</p>
<p>Until now.</p>
<p>This will be the first in a series of magnolia-railo merged app tutorials. Part one will walk through the merging of the two web apps into one. <a href="http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/">Part two</a> shows how to enable Railo templating and explore the interaction between Magnolia and Railo. Part three is about the dark side, potential problems and workarounds.</p>
<p>Before we dive in, I will address the question &#8220;why should these two technologies be merged?&#8221; It is simple really. Magnolia is a superior CMS to anything offered in the CFML world, and has amazing interoperability with other technologies. Railo on the other hand, blows the pants off any of the native templating options available in Magnolia and its rapid and powerful tag based language easily unlocks the power of Magnolia&#8217;s <a href="http://jackrabbit.apache.org/">Jackrabbit JCR</a>. In short, they were made for each other.</p>
<p>Lets put these two together:</p>
<ol>
<li>Download the latest railo custom all os war, extract to /merge-target. I&#8217;ll refer to this directory as the location of our new merged app, however you can name it what you wish.</li>
<li>Delete these files from /merge-target/WEB-INF/lib These files overlap with magnolia&#8217;s jars.
<ol>
<li>apache-jakarta-commons-codec.jar</li>
<li>apache-jakarta-commons-collections.jar</li>
<li>apache-jakarta-commons-fileupload.jar</li>
<li>apache-jakarta-commons-httpclient.jar</li>
<li>apache-jakarta-commons-io.jar</li>
<li>apache-jakarta-commons-lang.jar</li>
<li>apache-jakarta-oro.jar</li>
<li>apache-lucene.jar</li>
<li>backport-util-concurrent.jar</li>
<li>concurrent.jar</li>
<li>PDFBox.jar</li>
</ol>
</li>
<li>Download the latest railo patch (currently 3.1.2.006.rc). Put it in /merge-target/WEB-INF/lib/railo-server/patches/</li>
<li>Download Magnolia Community Edition war extract to /magnolia-temp</li>
<li>Copy /magnolia-temp/WEB-INF/lib/* to /merge-target/WEB-INF/lib/* There should be no file name conflicts.</li>
<li>Copy /magnolia-temp/WEB-INF/config to /merge-target/WEB-INF/config</li>
<li>Merge web.xmls. Use Magnolia&#8217;s xml header with namespaces! It doesn&#8217;t like anything else, because it reads it in at runtime. Here is the one I created:
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"&gt;
  &lt;description&gt;Magnolia&lt;/description&gt;
  &lt;display-name&gt;magnolia&lt;/display-name&gt;

  &lt;distributable/&gt;
  &lt;filter&gt;
    &lt;display-name&gt;Magnolia global filters&lt;/display-name&gt;
    &lt;filter-name&gt;magnoliaFilterChain&lt;/filter-name&gt;
    &lt;filter-class&gt;info.magnolia.cms.filters.MgnlMainFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;magnoliaFilterChain&lt;/filter-name&gt;
    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
    &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
    &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  &lt;listener&gt;
    &lt;listener-class&gt;info.magnolia.cms.servlets.MgnlServletContextListener&lt;/listener-class&gt;
  &lt;/listener&gt;

	&lt;servlet&gt;
		&lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
		&lt;description&gt;CFML runtime Engine&lt;/description&gt;
		&lt;servlet-class&gt;railo.loader.servlet.CFMLServlet&lt;/servlet-class&gt;
		&lt;init-param&gt;
	      &lt;param-name&gt;configuration&lt;/param-name&gt;
	      &lt;param-value&gt;/WEB-INF/railo/&lt;/param-value&gt;
	      &lt;description&gt;Configuraton directory&lt;/description&gt;
	    &lt;/init-param&gt;
		&lt;!-- init-param&gt;
	      &lt;param-name&gt;railo-server-root&lt;/param-name&gt;
	      &lt;param-value&gt;.&lt;/param-value&gt;
	      &lt;description&gt;directory where railo root directory is stored&lt;/description&gt;
	    &lt;/init-param --&gt;
		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
	&lt;/servlet&gt;
	&lt;servlet&gt;
		&lt;servlet-name&gt;AMFServlet&lt;/servlet-name&gt;
		&lt;description&gt;AMF Servlet for flash remoting&lt;/description&gt;
		&lt;servlet-class&gt;railo.loader.servlet.AMFServlet&lt;/servlet-class&gt;
		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
	&lt;/servlet&gt;
	&lt;servlet&gt;
		&lt;servlet-name&gt;FileServlet&lt;/servlet-name&gt;
		&lt;description&gt;File Servlet for simple files&lt;/description&gt;
		&lt;servlet-class&gt;railo.loader.servlet.FileServlet&lt;/servlet-class&gt;
		&lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
	&lt;/servlet&gt;	 

	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;*.cfm&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;*.cfml&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;*.cfc&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;AMFServlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;/flashservices/gateway/*&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;FileServlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;/&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt; 

&lt;welcome-file-list&gt;
	  &lt;welcome-file&gt;index.cfm&lt;/welcome-file&gt;
	&lt;welcome-file&gt;index.cfml&lt;/welcome-file&gt;
&lt;/welcome-file-list&gt;

&lt;/web-app&gt;</pre>
</li>
<li>Create file /merge-target/WEB-INF/bootstrap/common/config.server.filters.bypasses.railo.xml
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;sv:node sv:name="railo" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;sv:property sv:name="jcr:primaryType" sv:type="Name"&gt;
    &lt;sv:value&gt;mgnl:contentNode&lt;/sv:value&gt;
  &lt;/sv:property&gt;
  &lt;sv:property sv:name="jcr:uuid" sv:type="String"&gt;
    &lt;sv:value&gt;11577b1a-3123-4cae-80a9-96c1cd5c27ad&lt;/sv:value&gt;
  &lt;/sv:property&gt;
  &lt;sv:property sv:name="class" sv:type="String"&gt;
    &lt;sv:value&gt;info.magnolia.voting.voters.URIStartsWithVoter&lt;/sv:value&gt;
  &lt;/sv:property&gt;
  &lt;sv:property sv:name="pattern" sv:type="String"&gt;
    &lt;sv:value&gt;/railo-context&lt;/sv:value&gt;
  &lt;/sv:property&gt;
  &lt;sv:node sv:name="MetaData"&gt;
    &lt;sv:property sv:name="jcr:primaryType" sv:type="Name"&gt;
      &lt;sv:value&gt;mgnl:metaData&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:activated" sv:type="Boolean"&gt;
      &lt;sv:value&gt;false&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:activatorid" sv:type="String"&gt;
      &lt;sv:value&gt;superuser&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:authorid" sv:type="String"&gt;
      &lt;sv:value&gt;superuser&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:creationdate" sv:type="Date"&gt;
      &lt;sv:value&gt;2007-04-25T18:23:31.784+02:00&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:lastaction" sv:type="Date"&gt;
      &lt;sv:value&gt;2007-05-02T17:00:15.025+02:00&lt;/sv:value&gt;
    &lt;/sv:property&gt;
    &lt;sv:property sv:name="mgnl:lastmodified" sv:type="Date"&gt;
      &lt;sv:value&gt;2010-01-14T15:46:52.318-08:00&lt;/sv:value&gt;
    &lt;/sv:property&gt;
  &lt;/sv:node&gt;
&lt;/sv:node&gt;</pre>
</li>
<li>Set magnolia.update.auto=true in /WEB-INF/config/default/magnolia.properties</li>
<li>Start your container such as tomcat.</li>
<li>Go to /.magnolia, login superuser/superuser</li>
<li>Navigate to Configuration. server-&gt;filters-&gt;bypasses. You will see the railo node appears, in the configuration bypasses. If you inspect it you will see it is a uriStartsWithVoter that is configured with /railo-context. This node gives you bypassing of magnolia filters for any url starting with /railo-context.</li>
<li>Because of this you can hit /railo-context/admin/index.cfm and setup railo.</li>
</ol>
<p>The bypass rule is required because Magnolia controls the url space with its chain of filters. You can right click on it and copy it to make another arbitrary bypass that is applied immediately. The filters are configurable and this gives you flexibility in fronting CFML apps with arbitrary urls configurable at runtime. At this point you can build anything you want using Magnolia&#8217;s <a href="http://documentation.magnolia-cms.com/templating-guide.html">built in templating</a>. The bypasses allow you to run standalone CFML apps in the same JVM, under specified url paths (/myapp/*).</p>
<p>That is it for part one. The <a href="http://www.joshuafrankamp.com/blog/magnolia-and-railo-part-2-templating-and-paragraphs/">next article</a> highlights how your templates and paragraphs can be built in standard CFML, and the interaction between Magnolia and Railo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/magnolia-and-railo-together-at-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>util vs utils</title>
		<link>http://www.joshuafrankamp.com/blog/util-vs-utils/</link>
		<comments>http://www.joshuafrankamp.com/blog/util-vs-utils/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 23:09:34 +0000</pubDate>
		<dc:creator>jfrank</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.joshuafrankamp.com/blog/?p=42</guid>
		<description><![CDATA[Dear open source software community,
Utilities are an important part of programming packages. It is commonly held that a utility class be one with static methods; the association that they may hold may be as simple as the type they operate on. 
A utility for manipulating strings may be called StringUtil or StringUtils. There is no consensus on this in [...]]]></description>
			<content:encoded><![CDATA[<p>Dear open source software community,</p>
<p>Utilities are an important part of programming packages. It is commonly held that a utility class be one with static methods; the association that they may hold may be as simple as the type they operate on. </p>
<p>A utility for manipulating strings may be called StringUtil or StringUtils. There is no consensus on this in the community.</p>
<p>If you hold that each method in the class IS a utility, you would probably assume the class should be named StringUtils. (like <a href="http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/util/ToStringUtils.html">apache lucene,</a> <a href="http://commons.apache.org/lang/apidocs/org/apache/commons/lang/StringUtils.html">apache commons</a>, <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/util/StringUtils.html">spring</a>)</p>
<p>If you hold that the class itself is the utility, bound together by its common association. Each method is simply that, a method in the utility that operates on strings, you would probably assume the class should be named StringUtil. (like <a href="http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/util/ArrayUtil.html">apache lucene</a>, <a href="http://poi.apache.org/apidocs/org/apache/poi/util/StringUtil.html">apache po</a>i or <a href="http://www.mortbay.org/jetty/jetty-6/apidocs/org/mortbay/util/StringUtil.html">jetty</a>)</p>
<p>Thats right, in lucene they can&#8217;t even decide within the same project&#8230;</p>
<p>They have packages named util and utils, and utilities name SUBJECTutil and SUBJECTutils.</p>
<p>Kind of like my codebase at work&#8230; As soon as you decide.. can you let me know?</p>
<p>- Joshua</p>
<p>Update: At my work developer poll &#8221;util&#8221; has it. Three to one with one abstaining.</p>
<p> </p>
<p><img class=" alignnone" title="Util vs Utils" src="http://chart.apis.google.com/chart?cht=p3&amp;chd=t:3,1,1&amp;chs=350x100&amp;chl=Util|Utils|Withheld%20Answer" alt="Util 3 Utils 1 Abstain 1" width="350" height="100" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshuafrankamp.com/blog/util-vs-utils/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

