Archive for Ruby

July NovaRUG Meeting

Tonight was the monthly NovaRUG meeting and Brian Sletten presented on DRb while I presented on RJS. My presentation and code is available here. I think it went over pretty well and I made several new contacts after the meeting which is always nice.

Brian’s presentation is available here – so I don’t need to provide the usual coverage that I do. He gave a very engaging and amusing talk that everyone enjoyed. One interesting note, not covered in his slides but played following his presentation, is that a Japanese band called The Blue Hearts wrote a song called “Rinda, Rinda� – though it appears to have no relation to the Rinda tuplespace library as the song was first released in 1987.

June NovaRUG Meeting

Tonight at NovaRUG we had two presenters: Tom Copeland and Xandy Johnson. Tom spoke about extending Ruby with C extensions and Xandy spoke about Rake.

Read the rest of this entry »

A Look at Rails Engines

A few months ago I heard about the ’controversy’ surrounding Rails Engines and meant to check them out, though work/life intervened and I never got around to it until now. So last week I setup a RubyForge project (thanks Rich and Tom!) called BlogEngine to learn the ins and outs of creating a Rails Engine.

At first blush, Rails Engines seem to be plugins on steroids, incredibly powerful but somewhat dangerous. For those who haven’t yet visited the Rails Engines website:

Engines are a way of dropping in whole chunks of functionality into your existing application without affecting any of your existing code. Engines are like a slice of an application from top (views/helpers) to bottom (models) which can be dropped into an existing application and appear as if they always existed in the normal /app directory. Developers can selectively override parts of Engines as they need to handle their application (such as changing the user/home view to display a silly name, without affecting the rest of the Engine). Engines can be as lightweight as the simplest plugin, or as full-featured as your your (sic) imagination can conceive.

James Adam has done an excellent job documenting the Rails Engine plugin and the Wiki with how to create your own Rails Engines. That said, while I found the development of my BlogEngine to be relatively painless (as it was developed like any other Rails apps), once it was converted to a Rails Engine it was difficult to integrate into another project and get the interaction with the LoginEngine working smoothly.

The Rails Engines plugin does make it dead simple to add a lot of functionality into your application with very little work. But due to the wholesale inclusion of models, views and controllers it does take a bit of work to get the engine tweaked to your liking (at least so that it integrates into your existing Rails app nicely).

Read the rest of this entry »

May NovaRUG Meeting

Tonight Rich Kilmer presented his Alph Ruby to Flash bridge. I had checked out Alph before (version 0.0.3 from 2004) but was unable to get it working. Rich said that he’d place an updated copy up on RubyForge soon.

Read the rest of this entry »

Ajax Spy in Rails

I was playing around with Digg this morning and noticed Digg Spy. At first I thought it was really cool and wondered how they did that. Then I realized it’s just a bit of Ajax and, as anyone who’s read Pragmatic Ajax knows, Ajax is easy! So read on for how I implemented an Ajax spy in Rails and to download the code.

Read the rest of this entry »

I’m in Rails Recipes!

Chad Fowler has graciously accepted one of my recipes for inclusion in his new book, Rails Recipes! It’s recipe #65, “Easy HTML Whitelists�, in the latest beta version of the book. If you haven’t already pre-ordered your copy, I suggest you click over to the Pragmatic Programmers website and do so now. The other 69 recipes are just as good (if not better).