views:

827

answers:

3

Prologue: I know about gems.

I use Drupal at work. In case you don't know, Drupal is modules. There is a framework and a core framework, but when you build a site in Drupal, installing and configuring modules is most of the work.

So what, being new to Rails, I have a pet project and I am trying to build a login/user system. I've read the question about it here on Stack Overflow.

The procedure is

  1. install gems
  2. write code

If you make 20 websites in a year and 18 have the same login system, what can you do to minimize step 2?

Is there community support or activity I'm not aware of around this? Is this configuration over convention?

+5  A: 

Rails has "plugins", which let you modularize pretty well. In fact, when you use a gem with your app, you often have a stub plugin to load the code from the gem. Take a look at the book!

Then, take the whole thing a step further to use Rails Engines, which let you plug in whole app chunks without a whole lot of extra overhead.

Note that the standard solutions for authentication are, in fact, plugins.

Jim Puls
+1 Absolutely! You can also add gem are not entitled to be rails specific, since they are essentially Ruby libraries. If one wants something purely Rails specific, plug-in is the nicer way.
Swanand
+2  A: 

Having done development in Drupal (4, 5 & 6) and Rails, I'll share some observations:

  1. Drupal != Rails While both are technically frameworks, Rails is much less opinionated than Drupal. With Drupal, you get pages and UI out of the box. With Rails much more of that is up to you.

  2. Rails has multiple ways to assist in bootstrapping / code reuse, including gems, rails plugins and now application templates

  3. There are also some plugins that will give you more of a 'leg up' than others - e.g. ActiveScaffold, which gives you fully-featured admin areas.

Being less opinionated ultimately gives you greater flexibility and power. You can use completely different authentication plugins - say AuthLogic vs RESTful Auth - and choose the one that suits you best.

I still use and recommend Drupal for fast development of sites where Drupal + out-of-the-box modules (with minimal theming) are close to the requirements. For custom applications, the power of Rails + the joy of Ruby mean that its plugin architecture is just the right combination: light and powerful.

mylescarrick
A: 

As Jim said, plugins are what you are seeking. As for being able to quickly find plugins that can be helpful, check out my Rails plugin directory.

Benjamin Curtis