One day the ultimate web framework will be - ruby itself
Indeed, it is, IMHO. At least, that's what our (Starling Software's)
fairly minimal (compared to Rails) QWeb framework feels like to me.
I am about to start a project which will involve creating several web
sites. These will be completely different web sites but for the same
company and using the same database.
I can already forsee that I want to share many (but not all) of the
models between the web sites as well as sharing some of the
controllers.
I am not sure how the views situation will work itself out yet but to
start with I would like to set a "master" template that every web site
uses and override individual sections and content using partials.
I'm thinking you might be much better off just building your app(s)
from scratch, and letting the framework you need fall out of it. (I
understand that this is how Rails was built in the first place.) I've
found, in my admittedly limited experience with Rails, that if you need
exactly what Rails does, it works fine; as soon as you have a different
model, you'll spend more time battling Rails than doing any real work.
Rails is just one way of looking at the world, and quite influenced by
the PHP/ASP style of web applications. For many apps, it hurts more than
it helps.
Ideally it would be a kind of a hierarchy where I had a /websites
directory with each rails app living underneath it. If I called for a
model it would look in /websites/myapp/app/models and then look up
/websites/shared/models if it could not find it. Same with
controllers, views etc.
What about taking a "state the differences" approach, instead? Rather
than saying, "I want something slightly different than X, so I'll
replace it with a completely separate Y that's very similar to X," I
find it much nicer to say, "It's an X, but with just these changes."
Some of the differences you could just pull up to be implicit. For your
login code, for example, you could just automatically pull out the site
name (The HTTP "Host" header) and use that as part of the information
you use to find the appropriate row in the login table.
cjs