Better Living Through Resourceful Plugins
Location: Saal Maritim B Audience level: Intermediate
Rails makes it spectacularly easy to develop an application that does everything – as long as you’re happy with rolling everything yourself. For those of us who like to take advantage of the efforts of the community, however, when it comes to common functionality (say, blogging), Rails makes things a little harder. As it turns out, it’s a challenge to integrate two or more Rails applications, as those of us who’ve tried to bolt a Mephisto or Radiant installation onto a custom project have discovered. It seems like you’re faced with two options: proceed without the benefit of third-party development by building even more custom functionality, or making do with a half-hearted (at best) integration between two distinct applications.
We’ve faced this issue, too, and we’ve found a solution that works. Resourceful plugins (so named because they provide you with fully-realized resources) allow you to create and distribute reusable functionality that easily ties into your custom application, while still allowing you to profit from continued development on the plugin itself. These plugins integrate with your project through one or two well-defined points, and allow extensive customization once they’re installed. What’s even more impressive is that you can then upgrade the plugins when new releases come out, and your customizations are preserved.
In this tutorial, we’ll show you how to use some of the resourceful plugins we’ve been working on (for CMS, blogging, and other functionality). We’ll also show you how to customize them for your particular applications, and how to upgrade them painlessly. Finally, we’ll show you how to build such plugins on your own, making it even easier to develop the next killer Rails app.
Ben Scofield is a senior developer at Viget Labs, where he builds Rails applications for Web 2.0 startups. He’s been using Ruby and Rails for over three years, and is active in the community, speaking at Railsconf, Rails to Italy, and Rubyconf in 2007. In his copious free time, he spends time with his family (recently increased), works on personal projects, and does his best to keep up with the latest developments in Rails.