Geek Smithology

September 11, 2006

Enterprise Ruby Pragmatic Studio, Day 1

Filed under: Ruby by Nathan @ 9:46 pm

In a crusade to sniff some of the glue that never sets, I’ve come to Boston for the latest Pragmatic Studio, the one playfully and provocatively named Enterprise Ruby. As I’ve mentioned in the past, there’s meaningful enterprise[1] application development, and then there’s vendor bullshit. Our hosts, Justin Gehtland and Stuart Halloway, are poised to take us on a three day roller coaster ride that (for the love of $DEITY) does not involve Rails.

I got to the room where the studio is being held, plugged in my stuff, and realized I am the lone Dell in a sea of Apples and “PC Laptops that are not Dells“. People instinctively moved away, scared that it might explode at any second. The class got off to the traditional inquiry for a count of hands from folks currently being paid to sling Ruby. I’m fairly certain at least a few folks were plotting the death of the one man who almost apologetically held up his hand.

I decided to partake of the “continental” breakfast. Apparently “continental” is short for “quaffable but unremarkable coffee, cantaloupe, and an array of pastries.” You shouldn’t be allowed to use the c-word to describe your breakfast if there are no croissants. How can I save up enough buttery French heart attack bombs to build a Chinese Throwing Croissant if I can’t even find one?

The session started out usefully, but slowly, introducing us all to the Tiddly Wiki. To be fair, it’s an extremely cool little product – an entire wiki in a single page (a single page with a crazy amount of javascript). That’s where all of the course material is held. I will be using it in the future, it’s that cool.

Next we went onto rake, which was depressing. Depressing like a fox. You know all those times you’ve gotten mad at make, nmake, ant, nant, or because they were missing just one little thing? Well, you can’t get mad at rake, because it’s not text or xml or happy-fun-dsl, but ruby. I remember having to sign a whole boatload (well, it would’ve been a small boatload, but about 14 wouldn’t have made much of an impact, no?) of jars for a java applet and thinking to myself Self, wouldn’t it be nice if we could write a loop here?

Rake was followed by some quality time with flexmock. It reminded me somewhat of Rhino Mocks for .NET (I can’t think of anything remotely similar in Java, but I’ve been away for a half year), but quintessentially Rubenesque. Er, I mean Rubyesque. Check this out:

1
2
mock = flexmock("foo")
mock.should_receive(:bar).and_return("baz").at_least.once

You don’t need to know anything about this to figure that out. That said, C# isn’t too far behind…

1
2
IFoo mock = mockRepository.CreateMock<ifoo>();
Expect.Call(mock.bar()).Return("baz").Repeat.Times(1, int.MaxValue);

Anyway…we put all this into a nice little directory so that we can use it as we go forth (goal is to unit test everything.)

Next was DRb – distributed Ruby. If you’re thinking about CORBA or RMI, you’re on the right path, except it’s Ruby, so it’s easy. Not entirely sure where I’d use this in the real world, but it’s there in the core of Ruby. It’s got some sophisticated methods for creating observers and callbacks, and there are ways to synchronize several machines to do a task, so who knows. During the lab, Justin made the comment We just had an entire room of people, some of who don’t even know Ruby, write a client-server in 10 minutes. Okay, this was pretty cool.

The day ended with an introduction to Rinda. To put this simply, it allows for a distributed Ruby system to share a collection of Tuples. To put it anything other than simply would make your head explode. Well, my head at least. I’m familiar with distribution, and I’m familiar with Tuples, but this was a very interesing look at things. Rinda is based on Linda, a coordination language. Once again, I’m not sure of the immediate implications, but in terms of a toolbox, Ruby seems to have a lot more going on than meets the eye.

I’m still annoyed that Ruby doesn’t have native threads (but they’re coming…), but both DRb and Rinda come with the core Ruby distribution, so there are some impressive tools coming out. All in all, it was a fun day and I’m looking forward to tomorrow.

[1] That’s right, enterprise doesn’t need to be capitalized when Captain Kirk isn’t in the picture.

One Response to “Enterprise Ruby Pragmatic Studio, Day 1”

  1. Ron Thomas says:

    enterprise without the capitol E? I can’t get behind that!

    Actually, I can. I just wanted to references the tune by Shatner.

Leave a Reply

 

Powered by WordPress