I’ve got this idea and/or
Here’s my problem: Say I’ve got a rails app that does a bunch of stuff.
Now I want to create an admin section to maintain users and do special
secret & secure stuff. This function is part of my rails app: it would
make use of the same models, helpers etc, but I want to treat it
Also, when I release my rails app, I don’t want the admin section to be
included. The admin section would only be released to an internal
server, for added security.
I don’t think that a plug-in or gem is an appropriate solution, since
I’m not making a change to the language or the rails framework: this is
purely within the application scope. And, really, I’d like to
development the admin functionality the same way I would develop the
rest of the app - with a rails file structure, and ‘feel’.
What I’d really like to do is have a seperate app, and link the two.
Maybe some mechanism where two seperate rails apps can share their model
space, but could be treated as seperate entities (maybe having different
git repos and release mechanisms). I hape that’s a clear explanation.
Another example where this sort of thing micht be useful: Say you got
some web site created with rails. You want to have a blog on your site
and integrate some useful blog function with other pages in your site.
You decide that Typo is an awesome blogging app, but what do you do
next? How can you create a page that has some of your app, plus some
blogging features from typo?
Typo is a distinct rails app, so the only thing I can think of is
‘merging’ your two apps into one super-app, but then everything gets
really messy and your whole source code control goes down the toilet.
How marvellous it would be if you could add a line to your app config
that said ‘include_app /…/…/typo’ and you could access the models and
controllers of a completely independant rails app within your app. Kinda
like making entire rails apps ‘pluggable’.
Is there already a standard approach for solving the sort of problem I’m
describing? Or have I thought of something totally new and awesome?