Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts

Friday, July 11, 2008

JRuby- The Element of Surprise

JRuby...I used to think, "meh, who needs Java? I'll stick with the c implementation." Then I started working on a project investing millions of dollars in infrastructure to run Java web applications. Sadly, I initially agreed with the assessment that it was a bit of a hack to run the Ruby on the JVM. Thus I soldiered on, avoiding JSF and EJB, but getting sucked into many of the other indignities of the Java world.  The opportunity arose to build a quick prototype for a different system. The desire to go the Rails route proved successful with a quick delivery and excellent customer feedback- but how would we ever deploy it? How would the proprietary Sun Single Sign On service work? Could it possibly connect to Access Manager- a feat that had taken weeks of development time in Java? A couple of emails with Arun Gupta and Nick Sieger led me to some of the truly impressive work that has been going on. Warbler builds a war file out of your Rails app using jruby-rack. Drop your .jar libraries in the rails lib dir. Muck with your web.xml so you can make it use a filter. Drop the .war file on your server. Done. A little method called servlet_request is now magically available to you. Call servlet_request.getUserPrincipal : it's populated. It's not magic- it's JRuby!
  

It's really suprising how much faster things seem to get done. Now, I know that's sort of silly. People can work fast in any technology that they are good at. In fact, I think the source of most of the disagreement in technology and product selection (which is a plague in the Java world, the GIS world, the database world, etc.) is that people want to use what they are best at because it allows them to shine. I ultimately only care about the end result. I don't mind switching to some technology I know nothing about. It is harder for me to provide value, but I love nothing more than learning new things and evaluating them. 

Anyway, that's why JRuby is even more awesome. Let them write Java. The JVM is a environment where we can all get aong.

Tuesday, April 03, 2007

Ruby Community

I don't know who "Dan" is, but I like the way he rolls.

"I have no idea what the "Ruby Community" is. How do you define
membership in this community?"

No, no, the "Java Community" has a defined static membership, but the
"Ruby Community" is more dynamic. As long as you respond to the right
messages, you're just assumed to be a member.

Saturday, January 13, 2007

Refactoring Ruby

Jay Fields and friends are rewriting/porting Martin Fowler and friends' Refactoring: Improving the Design of Existing Code book to Ruby. I guess since the IDEs aren't there yet, we might as well get going on the manual process! Good show to Jay et. al. They've made a dent in the first section, hope they keep it up.

I still keep a copy of Refactoring on my desk. It's one of about 20 books I still need to keep around on my desktop. The content is somewhat timeless, and (was) not readily available on the internet. Still, the Jav-oid nature of the text makes it a little less relevant to my current world of Ruby. It also serves as a badge of good programming knowledge.

I've been selling off a lot of my other books on Amazon. Someone bought the Sun Certified J2EE Architect guide from 2002 for $16. Someone else bought Rod Johnson's old Expert J2EE development, the early edition, before he finished Spring, for $15. No takers on Tapestry yet at $10. Many books have a used value below a $1. I am debating what to do with them as it's not worth my time to sell them. The chances I need a Turbo Assembler reference have dropped about as low as they can, no library would want it, still, it was a good book in it's day, and it is sad that it is no longer relevant to anyone's life. I also think "professional Java Web Services" is probably not worth the shelf space. Well, maybe it will be recycled into a better book someday.

Friday, September 15, 2006

GE timeline...

Yes, this update is very cool. Three lines of code added to my little Ruby application with XML builder to support it:

xml.TimeStamp do
  xml.when(event_date.strftime('%Y-%m-%d'))
end


gets added to every xml.Placemark do

makes:

<TimeStamp>
  <when>2006-08-28</when>
</TimeStamp>

Which gives you a pretty floating toolbar...
that animates your map view. This was in the old enterprise client, but a little buggy and nowhere near as pretty. In a word...wow!