Okie doke, here goes:
A plugin is an encapsulated bit of logic, probably (but certainly not
limited to) including modules to enhance ActiveRecord objects, or
An ‘engine’ is a plugin which also can include views, full
controllers, model objects, schema and migration data - almost
anything you might want to put in a normal Rails application. You
can’t include things like views and migrations in normal rails plugins
and have them ‘just work’
The actual ‘Engines’ plugin is the plugin which enhances your normal
Rails application such that the extra views/controllers/migrations/etc
in your plugins get intelligently mixed in to your application - i.e.
it contains the code that makes things ‘just work’.
The LoginEngine/UserEngine/WikiEngine/WhateverEngine are examples of
plugins which takes advantage of the features provided by the Engines
plugin… therefore we (I) call them ‘engines’.
I’m aware of this kind of confusion where one might believe that
Engines == LoginEngine, and that if you’re using Engines at all then
you MUST be using the LoginEngine, which is only as true as saying
that the Generators == SHLG.
‘Engines’ are a way of sharing code. The ‘LoginEngine’ is an example -
an ‘instance’ if you like OO parlance. If you have a chunk of code in
the form of controllers/models/views that you find yourself reusing in
multiple projects, you might consider turning them into an
‘engine’-style plugin in the same manner you might think about making
them into a generator (I would argue that engines (and in fact all
plugins) are much easier to build and maintain than generators,
So, to recap, you’ve got:
- normal plugins… then
- the Engines plugin, which is a normal plugin that uses the
regular plugin mechanism to enhance Rails so you can then use and
develop your own
- ‘Engines’, i.e. the LoginEngine or WikiEngine, which are just like
plugins except they can provide views, etc, AND they depend on the
‘Engines plugin’ to blend their ‘advanced’ features into your
Does that make more sense?