
We had meeting in Copenhagen Ruby Brigade the other night with a theme of “Present something interesting from this year’s RailsConf Europe”. Three had found the time to prepare a presentation, and I was one of them. I gave a summary of the Juggernaut presentation, not only because it was interesting and entertaining (the original presentation, not my summary!), but because it really made me feel like start coding an application using Juggernaut right away. Juggernaut is a small server and a Rails plugin that allows the web server to push information in real time to clients using an open Flash socket. The syntax for pushing data (typically javascript or JSON) to client is very similar to RJS, e.g.:
render :juggernaut do |page|
page.insert_html :top, 'chat_data', "#{h(params[:chat])}"
end
When a client wants to broadcast to other clients, it simply fires an ordinary AJAX request to a controller, which in turn passes the message on through Juggernaut. The presenters showed a running example where the audience could place their home towns on a Google Map, which updated in real time as people used it. There is something fundamentally fun about coding real time interaction between multiple clients, at least that’s how I feel. Perhaps it goes back to my time as a developer on a large-scale European chat site, but ironically I worked on everything but the real time communication during that time.
Be proud of your legacy code. Extract concerns. Make exceptions from DRY. David Heinemeier Hansson’s keynote at RailsConf Europe 2008 was titled “Living with legacy software”, and centered around the notion of how to deal with your own old code. The articles summarizes the talk.
Rails has been around for 5 years now, and that’s an eternity in software, David said. People who are moving to Rails, see the platform as a salvation for their legacy applications, and as an excuse not to have to think anymore. That’s wrong, David pointed out with a big read slide.
People use the term legacy as though it is a well-defined attribute of code base, but it is really an personal opinion. “PHP is legacy! Java is legacy! – well, that one may be right”, David said jokingly, but really legacy is about your own evolvement of your taste, your knowledge and your personal preferences. Most people who wrote legacy code, thought the code was great when they wrote it. Later people’s perspective change, and even though the code hasn’t changed, it is suddenly considered legacy.
I haven’t blogged much over the summer, but I have a fair number of excuses:
Excuses aside, I think my latest contribution the the Radiant documentation base turned out quite good. It describes how to create a custom page type in Radiant in an extension, adding page tags, custom fields and other good stuff.
Check it out in the Radiant wiki.
(I’m headed for RailsConf Europe in the beginning of September, and I hope a lot of articles will come out of that as usual – hope to see you there!)
Hello, I'm Casper Fabricius. I have developed for the web for 10 years, and have been enjoying Ruby on Rails for the past 5.
My experience covers communities, shopping solutions, multi-language sites, heavy back-end lifting and a wide selection of more traditional websites. I like to integrate Ruby with Java and .NET through JRuby and IronRuby when it makes sense. I am passionate about test- and behavior-driven development, but at the same time I am pragmatic and believe in getting things done.
I live in Copenhagen, Denmark, where I work for a fantastic company: Podio. I do not currently take on freelance assignments.