<?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>Morris &#34;Mojo&#34; Jones &#187; JRuby</title>
	<atom:link href="http://mojo.whiteoaks.com/tag/jruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://mojo.whiteoaks.com</link>
	<description>Code Monkey, Astronomer, Photographer, Bridge Player</description>
	<lastBuildDate>Mon, 31 Oct 2011 01:03:48 +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>&#8220;Intro to JRuby&#8221; Neal Ford</title>
		<link>http://mojo.whiteoaks.com/2009/03/18/intro-to-jruby-neal-ford/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/18/intro-to-jruby-neal-ford/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 22:24:17 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=36</guid>
		<description><![CDATA[<p>Notes from TheServerSide Java Symposium, March 2009</p>
<p>Why Ruby? He talks about the known good language features, but the biggest reason is Rails. Ruby is actually an older language than Java.</p>
<p>JRuby 1.1 incorporates a just-in-time (JIT) compiler, and in many tests is faster than the Matz Reference Implementation.</p>
<p>In answer to a question, JRuby would exclude some gems [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from TheServerSide Java Symposium, March 2009</em></p>
<p>Why Ruby? He talks about the known good language features, but the biggest reason is Rails. Ruby is actually an older language than Java.</p>
<p>JRuby 1.1 incorporates a just-in-time (JIT) compiler, and in many tests is faster than the Matz Reference Implementation.</p>
<p>In answer to a question, JRuby would exclude some gems that incorporate native extensions, but many gems are beginning to include Java native extensions.</p>
<p>JRuby can incorporate and use Java classes in four different ways, and the implementation lets you use Ruby-native syntax for accessors.</p>
<table border="0">
<tbody>
<tr>
<th>Java</th>
<th>Ruby</th>
</tr>
<tr>
<td>emp.getName();</td>
<td>emp.name</td>
</tr>
<tr>
<td>emp.setName(&#8220;Homer&#8221;);</td>
<td>emp.name = &#8220;Homer&#8221;</td>
</tr>
<tr>
<td>emp.isManager()</td>
<td>emp.manager?</td>
</tr>
</tbody>
</table>
<p>Camel case Java names can be called with underscores, i.e. url.to_external_form vs. url.toExternalForm().</p>
<p>He then gave examples of language features, including closures, open classes, shadow meta-class, modules a.k.a. mixins.</p>
<p>Because of the dynamic nature, tests are not optional in Ruby projects. Being interpreted, tests need to find runtime errrors.</p>
<p>You can do Swing in Ruby, but it&#8217;s a little weird. Fun to be able to reopen classes and modify behavior. There&#8217;s an open-source framework, swiby = jruby + swing.</p>
<p>Very interesting use case: using JRuby to run Java tests. Making mock objects in Ruby is right in the language&#8217;s sweet spot, whereas mocks in Java require all kinds of perverted twists to make Java do what it doesn&#8217;t want to do, and create types.</p>
<p>I guess Ruby is beautiful if you&#8217;re deep into meta-programming, partly because it makes it easy. It doesn&#8217;t take a lot of code to do what you want to do.</p>
<p>He states that while JRuby is at least as fast as native Ruby, JRuby is profoundly slower than Java, in exchange for faster development time.</p>
<p><a href="http://javasymposium.techtarget.com/html/images/NFord_Intro_JRuby.pdf" target="_blank">Link to the presentation here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/18/intro-to-jruby-neal-ford/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

