Forum: Ruby on Rails RE: Large-scale application

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
60e38de043848f82392062088f191213?d=identicon&s=25 Hogan, Brian P. (Guest)
on 2006-01-03 19:50
(Received via mailing list)
Well, multiple-apps would be one way, but these are our issues:

1. We'd like to use the same theme for all apps (so we leverage Layouts)
2. We'd like to share session (I guess there's a way to do this...
Anyone have a simple example I could borrow?)
3. Even though these apps might appear separate, they are quite
intertwined.... A student record is used in accounting, financial aid,
grade submission, grade checking, advising, and hundreds of things that
I can't even tell you about because we're still getting all of this
together.

I might add that this is a migration from 30+ years of COBOL.

Thanks much!
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2006-01-03 20:47
(Received via mailing list)
> 1. We'd like to use the same theme for all apps (so we leverage Layouts)
> 2. We'd like to share session (I guess there's a way to do this...
> Anyone have a simple example I could borrow?)
> 3. Even though these apps might appear separate, they are quite
> intertwined.... A student record is used in accounting, financial aid,
> grade submission, grade checking, advising, and hundreds of things that
> I can't even tell you about because we're still getting all of this
> together.

I just have an extra line in database.yml called 'typo' and added this
to environment.rb:

CGI::Session::ActiveRecordStore::Session.establish_connection
ActiveRecord::Base.configurations['typo']

Of course, this example is using the Active Record Session Store.  I'm
connecting this app to a typo database to share the session and users
tables.

If the apps are on different subdomains or paths, use the session
options to unify them.

http://rails.rubyonrails.com/classes/ActionControl...
http://wiki.rubyonrails.com/rails/pages/HowtoChang...
--
rick
http://techno-weenie.net
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-01-04 10:20
(Received via mailing list)
Hogan, Brian P. wrote:
>
> I might add that this is a migration from 30+ years of COBOL.

I've just been thinking over what your parameters are, and had an idea
that I don't believe I've seen suggested elsewhere.

 From what you're saying, aspects of the business model (using the term
loosely, here) will be common across all applications, as will certain
aspects of the views.

Presumably the database will also be shared, and I'm assuming that
you're going to want a consistent single version of Rails across all
parts.

I'm also assuming (rather, hoping :-)) that you're using a unix-like OS.
What you could do is have all of the common parts hosted in a single
application, and mount the various shared parts of it into each separate
application that needs it, either over network mounts (which would make
it simpler to add in application modules as you need them), or by
symlinking them into place if they're all going to be on the same
machine.

This means that (for example) you could have all your core models in
app/models/core/, any shared controllers (login, for example) in
app/controllers/core/, and any shared view components in
app/views/core/.  The same could apply for helpers and the lib/
directory, if necessary.  Any application-specific models, views and
controllers could sit outside these mount points.

This is all off the top of my head, but I can't see anything obviously
wrong with it.  Anyone else have any comments?
This topic is locked and can not be replied to.