First contact with Refinery CMS

I am about to finish my first CMS project based on the open source Ruby on Rails based CMS framework Refinery. It has been a pleasure to work with it and I will explain why in this post.

I have some previous experience with the commercial CMS product EPiServer. It is a very polished product packed with features. The problem with it is that it is developed to be attractive for editors and IT Management and not for developers. It looks really nice in demos, but the developer experience is far from perfect. I suspect that other commercial CMS systems have the same problem. Open source products on the other hand, are developed by developers for developers. This is certainly true for Refinery.

One thing I really like about Refinery is that it is designed “the Rails way”, which means that there is not much to learn if you’re already familiar with Rails.

Setup

Starting a new project is really simple. Just follow the simple steps in the guide and you are ready to go. When you start your new application the first time, you will be prompted to create the first user account.

Basic customization

Customizing the frontend is straightforward. There are Rake tasks defined for overriding defaults. The override task simply copies the file from the gem repository to your application directory. To override the default page view, for example, just issue the command:

rake refinery:override view=pages/show

You can override controllers, models and stylesheets in the same way. The override mechanism is not limited to the frontend, the admin interface can also be customized.

Extending Refinery

Extensions in Refinery are based on Rails Engines. A generator is provided that works like the Rails Scaffold generator. This makes it really easy to add your own functionality. This approach also makes it easy to reuse the extensions you build in other projects.

Deployment

Since your Refinery application is just a normal Rails app, you have the same deployment options available as with any Rack-based app. That includes Heroku, which allows you to get your app up and running in minutes. For a demo or test site you can probably use Heroku free of charge.

Conclusion

Refinery is lacking some advanced features available in commercial CMS products. Most notably it has no versioning support and the globalization support is rudimentary. Despite this I can really recommend it if you value its properties:

  • Based on Ruby on Rails
  • Developer friendly
  • Easy to deploy
  • Easy to customize and extend

If you are new to Rails, don’t worry. Very little knowledge of Ruby and Rails is necessary, at least to build a basic web site.