<?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>No, I am better than that! &#187; ColdFusion</title>
	<atom:link href="http://rickosborne.org/blog/category/programming/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://rickosborne.org/blog</link>
	<description>Striving to subdue the mediocrity.</description>
	<lastBuildDate>Sun, 21 Aug 2011 23:27:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Amazon EC2 + Railo Lockdown</title>
		<link>http://rickosborne.org/blog/2011/01/amazon-ec2-railo-lockdown/</link>
		<comments>http://rickosborne.org/blog/2011/01/amazon-ec2-railo-lockdown/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 03:55:19 +0000</pubDate>
		<dc:creator>Rick Osborne</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://rickosborne.org/blog/?p=1276</guid>
		<description><![CDATA[For my own future reference, here are the steps I used to lock down an Amazon EC2 instance running the Railo image: SSH in as the ubuntu user. It should use your existing Amazon key pair. If it doesn&#8217;t, go read up on how EC2 works. Create a new user account and add the user [...]]]></description>
			<content:encoded><![CDATA[<p>For my own future reference, here are the steps I used to lock down an Amazon EC2 instance running the Railo image:</p>
<ol>
<li>
<p>SSH in as the <kbd>ubuntu</kbd> user.  It should use your existing Amazon key pair.  If it doesn&#8217;t, go read up on how EC2 works.</p>
</li>
<li>
<p>Create a new user account and add the user to the <kbd>admin</kbd> group:</p>
<pre class="sh">sudo adduser fred
sudo adduser fred admin</pre>
</li>
<li>
<p>Copy your SSH key over to the new user:</p>
<pre class="sh">sudo mkdir -p /home/fred/.ssh
sudo cp ~/.ssh/authorized_keys /home/fred/.ssh/
sudo chown -R fred:fred /home/fred/.ssh
sudo chmod -R 0700 /home/fred/.ssh</pre>
</li>
<li>
<p>Add your new user to <kbd>/etc/sudoers</kbd>.</p>
<pre class="sh">export EDITOR=nano &amp;&amp; sudo -E visudo
fred ALL=(ALL) ALL</pre>
</li>
<li>
<p>Logout.  SSH back in as your new user.</p>
</li>
<li>
<p>Remove the Railo admin password and restart Railo:</p>
<pre class="sh">sudo perl -p -i.bak -e 's/password=".+?"/password=""/g' /opt/railo/lib/railo-server/context/railo-server.xml
/etc/init.d/railo_ctl restart</pre>
</li>
<li>
<p>Reset your Railo Server password at <kbd>http://./railo-context/admin/server.cfm</kbd>.  Set up a default password and reset all of the web context passwords.</p>
</li>
<li>
<p>Change the Mango admin password by logging into <kbd>http://./admin</kbd> with <kbd>admin</kbd>/<kbd>railo4all</kbd>.  Create a new user account with your own name while you are in there.</p>
</li>
<li>
<p>Reset your mySQL password (current is <kbd>railo4all</kbd>) and make a new user:</p>
<pre class="sh">mysql -u root -p mysql
update user set password=password('newpassword') where user = 'root';
create user 'railo'@'127.0.0.1' identified by 'newpassword';
grant select, insert, update, delete, alter, index, drop, create on mango.* to 'railo'@'127.0.0.1';
flush privileges;
\q</pre>
<p>If you aren&#8217;t using ORM, your <kbd>grant</kbd> statement can be reduced to the first 4 CRUD operations.</p>
</li>
<li>
<p>Go into your Railo Web Admin at <kbd>http://./railo-context/admin/web.cfm</kbd> and change the Mango datasource to use user <kbd>railo</kbd> and the new password.  Lock down permissions appropriately.</p>
</li>
<li>
<p>Set up Git, and make a repo to cover your web root:</p>
<pre class="sh">sudo apt-get install -y git-core
mkdir -p ~/git/www.git
cd ~/git/www.git
git init --bare
git config core.bare false
git config core.worktree /var/www
git config receive.denycurrentbranch ignore
sudo chown -R fred:fred /var/www
cat > /var/www/.gitignore
    WEB-INF
    ~*
    *~
    settings.xml
git add /var/www
git commit -m 'Created repo'
cat > hooks/post-update
    #!/bin/sh
    GIT_WORK_TREE=/var/www GIT_DIR=/home/fred/git/www.git git checkout -q -f
chmod +x hooks/post-update
</pre>
<p>You should now be able to clone this repo with something like <kbd>fred@host:git/www.git</kbd>.  Committing and pushing to Git checks out the files to your web root, so you never need to transfer anything manually unless it&#8217;s too big to put in Git.</p>
</li>
<li>
<p><a href="http://blog.chrishaubner.com/post.cfm/tomcat-and-railo-ses-urls-first-run">Fix SES URLs in Apache+Tomcat</a>.  You&#8217;ll need to edit <kbd>/etc/apache2/apache2.conf</kbd> to include a <kbd>/*.cfm/*</kbd> rule.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://rickosborne.org/blog/2011/01/amazon-ec2-railo-lockdown/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ColdFusion for Android Development</title>
		<link>http://rickosborne.org/blog/2010/11/coldfusion-for-android-development/</link>
		<comments>http://rickosborne.org/blog/2010/11/coldfusion-for-android-development/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 20:13:41 +0000</pubDate>
		<dc:creator>Rick Osborne</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<guid isPermaLink="false">http://rickosborne.org/blog/?p=1267</guid>
		<description><![CDATA[You know what would be really cool? ColdFusion for Android. Wait. I&#8217;m not talking about ColdFusion the server-side framework. I&#8217;m talking about ColdFusion the language and development platform. I&#8217;m talking about the data-oriented language with primitives for building task-centric applications. I&#8217;m talking about the ColdFusion language that already has a cross-compiler to Java source and [...]]]></description>
			<content:encoded><![CDATA[<p>You know what would be really cool?  <strong>ColdFusion for Android.</strong></p>
<p>Wait.  I&#8217;m <em>not</em> talking about ColdFusion the server-side framework.  I&#8217;m talking about ColdFusion the language and development platform.  I&#8217;m talking about the data-oriented language with primitives for building task-centric applications.</p>
<p>I&#8217;m talking about the ColdFusion language that already has a cross-compiler to Java source and JVM bytecode.</p>
<p class="noindent" align="center"><img src="http://rickosborne.org/blog/wp-content/uploads/2010/11/cf-android2.png" alt="" title="ColdFusion + Android = Love" width="500" height="340" class="aligncenter size-full" /></p>
<p>If you look at Android development, it&#8217;s not all that different compared to CF development with an MVC framework like Framework/1.  Each Android task equates to a FW1 View, and has similar enter and leave Controller validation.  Android apps are backed by SQLite storage, and generally use the same Model-style access to their database.  Apps can start Service components that can function as asynchronous threads, or as persistent Application-level objects.</p>
<p>I&#8217;m <em>not</em> advocating porting the CF runtime to Android, nor client-server style development where the app UI is just a wrapper around WebKit<sup>1</sup>.  I&#8217;m saying you take the CFML tags and CFScript language and cross-compile them to Java source and/or JVM bytecode.  You write apps like this:</p>
<pre class="coldfusion ; gutter: false;">&lt;cfwindow id="hello"&gt;
    &lt;cfform action="#nextthing"&gt;
        &lt;cfinput type="text" required="true" id="loginEmail" message="#localize.emailRequired#" label="#localize.emailLabel#"&gt;
        &lt;cfinput type="submit" id="loginSubmit" label="#localize.next#"&gt;
    &lt;/cfform&gt;
&lt;/cfwindow&gt;</pre>
<p>And poof, presto-magic, Eclipse compiles this into a native APK using native widgets and puts it on your Android.  There are already a ton of CF tags for UI that are fairly render-agnostic.  I&#8217;m not saying it would be a perfect fit, nor that every tag would be useful, but it&#8217;s a heckuva start.</p>
<p>Adobe has already made it pretty clear that they think Flash is the future for Android development.  Some smart person who wants to make a ton of money should build a few proofs-of-concept and go to the smart guys at Railo with a business plan.  If they turn you down, go through the presentation and replace Java/Android with .NET/WP7 and go talk to NewAtlanta.  Once your pile of money is big enough, you shovel it into building an Objective C cross-compiler and start targeting iPhone.</p>
<p>ColdFusion is so <strike>money</strike> mobile and it doesn&#8217;t even know it!</p>
<hr/>
<p>Footnotes:</p>
<ol>
<li>
<p>You&#8217;ve already got Appcelerator Titanium, PhoneGap, and other competitors in that space.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://rickosborne.org/blog/2010/11/coldfusion-for-android-development/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Poll: Teaching Procedural ColdFusion</title>
		<link>http://rickosborne.org/blog/2010/10/poll-teaching-procedural-coldfusion/</link>
		<comments>http://rickosborne.org/blog/2010/10/poll-teaching-procedural-coldfusion/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 18:06:04 +0000</pubDate>
		<dc:creator>Rick Osborne</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://rickosborne.org/blog/?p=1245</guid>
		<description><![CDATA[There is a poll at the bottom of this post, but it requires some background. I&#8217;ve been teaching ColdFusion as part of a BS degree for a bit more than a year now. It&#8217;s been going well. The ColdFusion course follows courses in HTML, CSS, ActionScript, Flex, JavaScript, jQuery, PHP, and SQL. I start with [...]]]></description>
			<content:encoded><![CDATA[<p>There is a poll at the bottom of this post, but it requires some background. </p>
<p>I&#8217;ve been teaching ColdFusion as part of a BS degree for a bit more than a year now. It&#8217;s been going well. The ColdFusion course follows courses in HTML, CSS, ActionScript, Flex, JavaScript, jQuery, PHP, and SQL. I start with procedural CF, refactor that into a simple MVC pattern with UDFs, refactor that again into full OO with components, and refactor that a final time to use ORM and FW/1. The students get to see CF at multiple levels of complexity, and they get practice with taking older code and upgrading it to newer coding techniques.</p>
<p>But I have recently come to question the utility of starting with pure procedural CF. Is it still relevant?</p>
<p>The students get to my class with a heavy OO background from their ActionScript, Flex, and JavaScript courses. The PHP course serves as their introduction to server-side coding, and is purely procedural. So do I really need to revisit procedural server-side code (such as <kbd>cfmodule</kbd>)?  Is the business need for entry-level CF coders to be able to code at all complexity levels, or would stronger OO and framework skills be better received?</p>
<p>You can&#8217;t have it both ways&mdash;there is a finite amount of class time.</p>
<div>
	<div class='democracy'>
		<strong class="poll-question">For an entry-level ColdFusion developer, which skillset would you prefer to hire?</strong>
		<div class='dem-results'>
		<form action='http://rickosborne.org/blog/wp-content/plugins/democracy/democracy.php' onsubmit='return dem_Vote(this)'>
		<ul>
			<li>
					<input type='radio' id='dem-choice-169' value='169' name='dem_poll_41' />
					<label for='dem-choice-169'>Low-End: much better with procedural (cfinclude/cfmodule), some OO/framework general knowledge</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-170' value='170' name='dem_poll_41' />
					<label for='dem-choice-170'>Balanced: decent at procedural, OO, and frameworks, with no particular emphasis on any one</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-171' value='171' name='dem_poll_41' />
					<label for='dem-choice-171'>High-End: skilled with OO/frameworks, but less familiar with older (procedural) coding techniques such as cfmodule</label>
			</li>
		</ul>
			<input type='hidden' name='dem_poll_id' value='41' />
			<input type='hidden' name='dem_action' value='vote' />
			<input type='submit' class='dem-vote-button' value='Vote' />
			<a href='/blog/category/programming/coldfusion/feed/?dem_action=view&amp;dem_poll_id=41' onclick='return dem_getVotes("http://rickosborne.org/blog/wp-content/plugins/democracy/democracy.php?dem_action=view&amp;dem_poll_id=41", this)' rel='nofollow' class='dem-vote-link'>View Results</a>
		</form>
		</div>
	</div></div>
<div>
	<div class='democracy'>
		<strong class="poll-question">Do you think it necessary for entry-level developers to learn older, procedural skills such as cfmodule?</strong>
		<div class='dem-results'>
		<form action='http://rickosborne.org/blog/wp-content/plugins/democracy/democracy.php' onsubmit='return dem_Vote(this)'>
		<ul>
			<li>
					<input type='radio' id='dem-choice-172' value='172' name='dem_poll_42' />
					<label for='dem-choice-172'>Absolutely not, they should only learn modern coding techniques</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-173' value='173' name='dem_poll_42' />
					<label for='dem-choice-173'>Probably not, or don't spend too much time on it</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-174' value='174' name='dem_poll_42' />
					<label for='dem-choice-174'>Ambivalent, or don't care</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-175' value='175' name='dem_poll_42' />
					<label for='dem-choice-175'>Probably should, but don't spend too much time on it</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-176' value='176' name='dem_poll_42' />
					<label for='dem-choice-176'>Definitely should, it's essential to know where CF started</label>
			</li>
		</ul>
			<input type='hidden' name='dem_poll_id' value='42' />
			<input type='hidden' name='dem_action' value='vote' />
			<input type='submit' class='dem-vote-button' value='Vote' />
			<a href='/blog/category/programming/coldfusion/feed/?dem_action=view&amp;dem_poll_id=42' onclick='return dem_getVotes("http://rickosborne.org/blog/wp-content/plugins/democracy/democracy.php?dem_action=view&amp;dem_poll_id=42", this)' rel='nofollow' class='dem-vote-link'>View Results</a>
		</form>
		</div>
	</div></div>
]]></content:encoded>
			<wfw:commentRss>http://rickosborne.org/blog/2010/10/poll-teaching-procedural-coldfusion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

