Hi Chris,
  As you know I'm a proponent of the Engines construct.  Right now I'm
feeling like this may be the thing that drives me hardest toward Merb (where
the Slices are first class citizens).  Engines are pretty powerful and give
you a lot of flexibility.  However they are often broken on edge rails (Core
team makes no effort to remain compatible) so that is something to watch out
for.  As far as DB seperation goes, it depends what you are trying to
accomplish.  Are you looking to share data with multiple apps?  If so, then
a web service may be the best way to do that.  For instance if you have an
Accounts app, your Wiki app and your Forum app could share accounts via REST
and ActiveResource.  Otherwise you can set the table on a per model basis
with ActiveRecord to share the table.  If you do that you really will want
to use either a plugin or an engine.

  I've always felt that having plugins seperate from gems was a mistake.
The sentament at large is starting to grow to support me on that.  Either
way works, though both plugins and engines (which are build on top of
plugins) have more power to hook into Rails internals and you get more of
the loading "for free".

  Lastly when it comes to naming conflicts, I generally don't run into them
often.  Mostly because I'm using engines or slices I've created.  Rails does
have working support for namespacing though, and that would aliviate your
problem.

Cheers,
Rob

On Tue, Sep 2, 2008 at 2:44 PM, Chris Griffin <[EMAIL PROTECTED]> wrote:

>
> I notice that there are some plugins and gems that try to offer a
> particular vertical service. An example would be a shopping cart. What
> I would like to do is take some code I've written and make it into a
> module. I use the word module because I don't want to confuse it with
> plugin or gem though it may end up being one of those. I would like
> this module to be able to be added to an already built rails app such
> that the base URL could be set so that it doesn't conflict with urls
> the site is already using. I also would like to be able to add more
> than one module like Legos adding functionality to a site. So given
> that criteria what do you believe is the best approach? I see the
> engines plugin that claims to do that but so far my experience with
> that hasn't been good. At least not with the plugins I've tried. So it
> may not be engines fault.
>
> PS Also how do you hand the database problem? Do you run more than one
> DB? Do you prefix the table names?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
sdruby@googlegroups.com
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to