<?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>Eric the Gray &#187; Ruby on Rails</title>
	<atom:link href="http://dovetailcomputing.com/blog/category/programming/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://dovetailcomputing.com/blog</link>
	<description>A graybeard talks about teaching and developing.</description>
	<lastBuildDate>Fri, 11 Apr 2008 21:03:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Can Java Be Saved? Part Four</title>
		<link>http://dovetailcomputing.com/blog/2006/11/24/can-java-be-saved-part-four/</link>
		<comments>http://dovetailcomputing.com/blog/2006/11/24/can-java-be-saved-part-four/#comments</comments>
		<pubDate>Sat, 25 Nov 2006 02:19:10 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://dovetailcomputing.com/blog/2006/11/24/can-java-be-saved-part-four/</guid>
		<description><![CDATA[Part Four&#8212;My philosophy going forward. I have finally thought about this enough, at least for now. I have decided that I&#8217;m going to create a framework for use in my classes and for any personal java programming I might do in the future. I know, I know, the world really doesn&#8217;t need yet another framework. [...]]]></description>
			<content:encoded><![CDATA[<h2>Part Four&#8212;My philosophy going forward.</h2>
<p>I have finally thought about this enough, at least for now. I have decided that I&#8217;m going to create a framework for use in my classes and for any personal java programming I might do in the future. I know, I know, the world really doesn&#8217;t need yet another framework. But, this one is a bit different, I promise.</p>
<p><span id="more-20"></span></p>
<p>The first step toward creating my framework is to establish a philosophy to guide me along this journey. I have looked at almost every java framework out there and I think that this is sometimes missing. The authors are usually very good programmers and have deep experience. This leads them to create what they like and what appeals to them. I think this is great for all the other people out there on their level. But, there is a crisis in the java world and its name is complexity. </p>
<h3>The Philosophy</h3>
<p>So, here is my philosophy. I want to make a framework that is <strong>easy to teach</strong>. Notice that I didn&#8217;t say easy to learn? That&#8217;s what everyone says. I am the one who has tried to do the teaching with things that are supposed to be easy to learn. Well, they might be easy to learn if you are a seasoned pro, or an up-and-coming computer superstar. While I&#8217;m sure that some of my students are going to be superstars, most of them are quite new to web programming. They have never heard of an HTTP request and couldn&#8217;t really tell you the difference between a GET and a POST. I have come to the conclusion that there isn&#8217;t anything out there for them. </p>
<p>How am I going to do this? I am going to start by keeping in mind that my students are looking at me to teach them the basics. That every shop in my area uses a different approach so I can&#8217;t teach it all. That if they learn the basics of web programming well enough they should be able to learn any new whiz-bang framework that comes along. I am going to get them ready to learn the next Struts, JSF, Spring, Stripes, etc., that comes along. And there is one thing we can guarantee in the IT world, that tomorrow will bring something new. I am going to get them ready for that, not for what is here today.</p>
<h3>The Basic Idea</h3>
<p>The most frustrating part of trying to teach using java is that it takes too long to create the basic structure of every concept. We have to get Ant setup and a full web application source and build structure. We have to learn how to create servlets and how to add them to the web.xml file. We need to learn how to create JSP pages and where to put them. We spend days just getting a .war file ready to deploy. We have to then make sure that we have Tomcat setup correctly for deployment. All of this has the philosophy of, &#8220;EVERYTHING TAKES TOO DAMN LONG!&#8221; </p>
<p>Phew, I&#8217;m glad I got that out of my system.</p>
<p>Now, on to my idea. I am going to create a <strong>structure building framework</strong>. Some of my ideas come from Ruby on Rails, but maybe not what you think. I am not going to attempt to recreate Rails in java; that is a mistake. Instead I&#8217;m going to take a hint from the part of Rails that helps you generate all the structure of your application. This is going to be a command-line tool that helps you create all the directories and files while you code. I have been looking for a good word that will be my command. I have decided on a working command name for the framework. I might change it but for now the command will be &#8220;simple.&#8221; Here is an example of how it might be used:</p>
<p><code>$ simple new action com.bigco.controllers.store.MyFabulousAction</code></p>
<p>This would check that all the directories are in the right place. Then it would create a new Servlet, and add configuration and mapping to the web.xml file. </p>
<p>This is just a taste of what I&#8217;m working on. So far I have lots of ideas and lots to do, but I have chosen one technology. I am going to write my framework in Ruby.</p>
<p>That&#8217;s all for now, take care.</p>
]]></content:encoded>
			<wfw:commentRss>http://dovetailcomputing.com/blog/2006/11/24/can-java-be-saved-part-four/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Can Java Be Saved? Part Three</title>
		<link>http://dovetailcomputing.com/blog/2006/10/14/can-java-be-saved-part-three/</link>
		<comments>http://dovetailcomputing.com/blog/2006/10/14/can-java-be-saved-part-three/#comments</comments>
		<pubDate>Sun, 15 Oct 2006 00:58:00 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://dovetailcomputing.com/blog/2006/10/14/can-java-be-saved-part-three/</guid>
		<description><![CDATA[Part Three&#8212;What&#8217;s driving me? Part of what is driving my quest is how frustrated I have become with trying to create java web applications. My job that takes up most of my time is being a teacher. That doesn&#8217;t leave me much time to create private side projects. Whenever I have a great idea for [...]]]></description>
			<content:encoded><![CDATA[<h2>Part Three&#8212;What&#8217;s driving me?</h2>
<p>Part of what is driving my quest is how frustrated I have become with trying to create java web applications. My job that takes up most of my time is being a teacher. That doesn&#8217;t leave me much time to create private side projects. Whenever I have a great idea for a project that will enhance my teaching experience or just sounds fun I just dread the idea of doing it in java. For years I have wondered if I was the only one. Then my colleague who is the .NET expert in my department mentioned that he was doing a side project in PHP. I thought it was very telling that neither of us wanted to code for fun in our area of expertise. That made me start the search for more coding joy.</p>
<p><span id="more-19"></span></p>
<p>It was the summer of 2005 and I was at the big JavaOne conference in San Francisco. It was my annual trip to see what was new in the world of java. I was noticing that the conference seemed even more corporate than normal. I also noticed that people were talking in the halls and rest areas about something called Ruby on Rails. At first I was a bit curious. After several days of hearing about this I decided that if developers at a java conference were talking about an alternative technology then I had better check it out.</p>
<p>After I got home I started learning Rails. The light came on and I now believe that Ruby on Rails the best way to code web applications by a very large margin. The speed and joy involved in the process has changed my career. I even now have a course on Rails that is completely full.</p>
<p>But, that is not what this series is about. I still have to teach java and I will probably still get consulting calls for it. What is driving me to write this series is the result of my learning that there can be joy in coding web apps! This is very cool! My quest is to see if I can create a java-based web application environment that feels better. I don&#8217;t have to duplicate Rails in java like some are trying. I only need to feel productive and feel a sense of joy when coding. I want to feel light on my feet again instead of feeling like I&#8217;m wearing lead shoes. </p>
<p>Wish me well, I&#8217;m going in.</p>
]]></content:encoded>
			<wfw:commentRss>http://dovetailcomputing.com/blog/2006/10/14/can-java-be-saved-part-three/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using jEdit for Ruby on Rails Development</title>
		<link>http://dovetailcomputing.com/blog/2006/09/18/using-jedit-for-ruby-on-rails/</link>
		<comments>http://dovetailcomputing.com/blog/2006/09/18/using-jedit-for-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 18 Sep 2006 00:41:24 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://dovetailcomputing.com/blog/?p=8</guid>
		<description><![CDATA[I really like TextMate on my Mac Book Pro. And, I really like using TextMate for Ruby on Rails, it&#8217;s just such a good fit. However, most of my students are using Linux or Windows. After getting asked many, many times for a recommendation for something like TextMate I have written up this article for [...]]]></description>
			<content:encoded><![CDATA[<p>I really like <a href="http://macromates.com">TextMate</a> on my Mac Book Pro. And, I really like using TextMate for Ruby on Rails, it&#8217;s just such a good fit. However, most of my students are using Linux or Windows. After getting asked many, many times for a recommendation for something like TextMate I have written up this article for using my old favorite editor <a href="http://jedit.org">jEdit</a></p>
<p><span id="more-8"></span></p>
<h2>jEdit Install</h2>
<p>First, you have to download and install jEdit for your operating system. I&#8217;m using version 4.3pre9 for these instructions. Then install the usual collection of plugins that make jEdit really usable. Here is a good list to get you going:</p>
<ul>
<li>BufferList</li>
<li>BufferTabs</li>
<li>Common Controls</li>
<li>Console</li>
<li>ErrorList</li>
<li>Info Viewer</li>
<li>jDiff</li>
<li>JTidy</li>
<li>MacroManager</li>
<li>TextTools</li>
<li>Whitespace</li>
<li>Xerces</li>
<li>XInsert</li>
<li>XML</li>
</ul>
<ul>
<li>XML Indenter<br />
<h2>Looking Sharp!</h2>
<p>The first step on the journey is to be able to quickly and nicely change the look of the editor. The plugin <strong>Editor Scheme Selector</strong> makes this happen. Install it from the Plugin Manager. Once installed select it from the Plugins menu. It will display a nice list of schemes, try them out! You can also download more from <a href="http://community.jedit.org/?q=filestore/browse/22">here</a> including one suspiciously named &#8220;TextMate-like Editor Scheme&#8221;. </p>
<h2>UPDATE: RecentBufferSwitcher</h2>
<p>On of the nice features of TextMate is the &#8220;Go To File&#8230;&#8221; command which is mapped to command-t. The feature is a very nice way to navigate around in the files in a project. There is a jEdit plugin named RecentBufferSwitcher that is almost as good. I map it to the same key combination and or to control-t on Lunix and it works well. The plugin can be loaded from the Plugin Manager.</p>
<h2>Ruby</h2>
<p>Now we will focus on editing Ruby in jEdit. With the Plugin Manager install the Ruby Plugin. This plugin&#8217;s &#8220;features include method completion for system types and Rails classes, integrated Ruby docs, syntax error highlighting, auto indent and insert end, structure browser, file structure popup, navigation shortcuts, and progressive selection.&#8221; (From the Ruby Plugin documentation.)</p>
<h2>SideKick</h2>
<p>The Ruby plugin also requires the plugin SideKick. If it doesn&#8217;t not install automatically as a dedendency then install it manually. You also should configure a keystroke shortcut.</p>
<h2>SuperAbbrevs</h2>
<p>Ah, the grand finale. The SuperAbbrevs plugin is what seems to be doing all the magic. This plugin is what performs all the snippet work that people really like about TextMate. As someone who uses both TM and jEdit I will say that TM is better overall and a must have. But, if I need to work on Windows or Linux (God forbid!) I would use this setup and be mostly happy. </p>
<p>I am using the beta version of SuperAbbrevs (v0.21) from <a href="http://community.jedit.org/?q=node/view/2761">here</a> . Once you install it run the menu item &#8220;Plugins->Plugin Options->SuperAbbrevs->Abbreviations&#8221; and press the button &#8220;Import normal abbrevs&#8221;. This is important as there won&#8217;t be any abbreviations until you do this. </p>
<h2>Abbrevs for Rails</h2>
<p>The final step is to download some abbreviations for Rails from <a href="http://synthesis.sbecker.net/articles/2006/03/20/jedit-snippets-for-ruby-on-rails">here</a>. (UPDATE: Here is the zip file <a id="p18" href="http://dovetailcomputing.com/blog/wp-content/uploads/2006/10/jedit_shortcuts_for_ruby_on_rails_v01.zip">jEdit Snippets for Rails</a>.) Unzip the downloaded .zip file and place the files &#8220;rhtml&#8221; and &#8220;ruby&#8221; into your <strong>.jedit/SuperAbbrevs/</strong> directory.</p>
<p>Once you have all this installed then read the documentation for all these plugins from the help window. </p>
]]></content:encoded>
			<wfw:commentRss>http://dovetailcomputing.com/blog/2006/09/18/using-jedit-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
