RE: Large-scale application


#1

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!


#2
  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/ActionController/Base.html#M000185
http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionOptions

rick
http://techno-weenie.net


#3

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?