This has been on my mind too Duane. Originally I had put engines in a
seperate /vendor/engines directory, but when I learned about
script/plugin I decided that engines and plugins where similar enough
that the advantages of having an automatic installer/manager were
greater than the clarity obtained by keeping them in seperate
directories.
In order to try and clear up the difference between a Component, a
Plugin and an Engine, I''ve pasted the contents of an earlier post to
the Engines wiki - I''m sure what I''ve written could be made
clearly
though, and so hopefully others can help tidy it up and make the
distinction crystal.
When to use Engines:
http://rails-engines.rubyforge.org/wiki/wiki.pl?WhenToUseAnEngine
We''ll have to see what happens over time with script/install - I get
the feeling that when Rails 1.0 is signed off SVN and RubyGems will
both be valid means for distributing and using Plugins. SVN is perfect
for Engines, but including an Engine as a Gem is a bit more
complicated. It also has disadvantages in that it''s extremely useful
as a developer to be able to inspect Engine code, so you can figure
out what you might like to override - I suspect no amount of good RDoc
will make change that either.
Another issue w.r.t. namespaces is the insertion of Engines into
modules - by this I mean putting Engine controllers and helpers into
their own namespaces, such as LoginEngine::UserController, or
whatever. It seems like a very good idea to move towards this, and
then letting the developer use Routes to map the controllers into
whatever URL location is suitable for their application (we can
probably make this quite simple to configure with a bit of
behind-the-scenes RailsEngines tomfoolery).
As a final note, if anyone *is* working on an Engine, it would be
great if you could let me know so I can help manage any issues within
the Engines plugin itself. I''m very very keen to get this
"right"
whilst minimising the amount of interventions the Engines plugin has
to make with the Rails core. Oh, and also write something about it on
the wiki - you never know, there might be people out there willing to
help....
http://rails-engines.rubyforge.org/wiki/wiki.pl?EnginesInDevelopment
Cheers
James
On 11/4/05, Duane Johnson
<duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> With the advent of James Adam''s engines, and the forthcoming
deluge
> of engines that will be made available, I wonder if we should begin
> to think about placing them in their own folder within the vendor
> folder?
>
> As I see it, a Rails plugin is a very specific concept that should be
> kept pure: a plugin modifies the Rails base to add or modify
> functionality.
>
> An engine, on the other hand, is a complete stack of functionality
> that goes beyond the Rails base. They are literally mini-
> applications with ready-to-go overloading. I would like to see
> engines get their own folder / namespace so that we separate these
> ideas for our own benefit now and avoid confusion for newcomers later.
>
> Pros: simplicity, separate concepts, avoid confusion
> Cons: lose the script/plugins feature temporarily (it could be
> modified, or maybe even a script/install could take its place...
> script/install plugin [whatever], vs. script/install engine [whatever])
>
> Any thoughts?
>
> Duane Johnson
> (canadaduane)
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>