This is great news that we might see some of this for Rails 3.0. For
our project (BrowserCMS) the concept of mountable apps would make it
much easier to support modular extensions as packagable gems. At
current, we have our own code for loading Model/Controller/Views from
gems in a way similar to engines, and something non-standard for
dealing with routes. I would ideally like to be able to ditch all of
that in favor of the 'correct' Rails solution if it meets our needs.
If Engines will support all those isssues, that's great.

A couple of thoughts:

Ordering of Routes
==================
The one issue I'm currently least clear on (and need to investigate
more) is the ordering of routes from gems. Ideally, it would be nice
if there were a way to allow gems to define when their routes are
loaded relative to the project as well as other gems. For example, in
BrowserCMS, the core gem needs to be absolutely last in order to serve
as the 'catch all' route. Other extension gems routes would ideally be
loaded before the browsercms gem, but after the project specific
routes. I.e. if my project is using three gems:

gem 'browsercms'
gem 'bcms_module_a'
gem 'bcms_module_b'

It would great if the 'browsercms' gem could specific it would be
absolutely last, and the other two could specify 'before :browsercms'
in their configuration. That reduces the burden on developers who just
want to use gems and not need to worry about route ordering.

However, I can also think of situations where two gems might have
'conflicting' routes that might require a project specific override to
make sure that (for example) gem_a routes are loaded before gem_b's
routes.

Static Assets
=============
Of the four items you mentioned, I would also add a fifth to consider:

5. Static Assets - These are files like javascript, stylesheets and
even html files. Some extensions, specifically those that add a
WYSIWYG editor like CKEditor (http://ckeditor.com/) to a project,
require a lot of asset files which don't necessarily conform to Rails
conventions. There needs to be some way to make those files available
as assets in the public directory.

There are several possible solutions I can think of:
A. Copy the static files from the gems into the public directory of
the project, which can allow the web server to handle serving them.
(BrowserCMS does this).
B. Have the plugin/gem serve the static assets from the gem through
rails. (There are some plugins that do this whose names I can't
remember).
C. Do something fancy with symlinks (if the OS supports them).

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to