Re: Rails app organization question



Jake Janovetz wrote:

Hello--

New to Ruby. New to Rails. New to web app development, quite honestly. I -really- like Rails, though. Forgive me if this is the wrong place for this type of question, and kindly suggest another venue.

comp.lang.ruby.rails

I'm working on a new web app that would allow customers (companies) to have multiple logins which access the same database. The question is how to set up something like this--

1. Have one instance of the app and somehow allow it to use different databases depending on the user's login.

2. Have multiple instances of the app running on virtual servers, similar to how cPanel sets up accounts for multiple hosts -- each host has its own directory, MySQL database, and so on. Then, somehow have one "father" web app administer this higher level of hierarchy.

Any other suggestions?

You don't indicate a compelling reason why there should be more than one database. Simple is better. Simple is faster. You can always build out later. If each customer's needs are similar then one database is sufficient. If not, then you may be talking more of a db hosting service, which would probably require separate databases for each customer, but I doubt you are talking about this. I think you're saying you are trying to sell some kind of web service to multiple (corporate) customers, and each company may have more than one account. If that's the case (depending on the service you are selling), start with just one database.

It sounds like all you need are multiple accounts, which pretty much comes
for free via one of the Rails plugins/generators. Nothing fancy is required if
you're just talking about standard accounts with access controls/roles.


My experience in setting this sort of thing up is limited -- are there any good examples of this setup that I could pull from?

http://www.pragmaticprogrammer.com/titles/rails/

you can also learn an awful lot from just drinking from the firehose,
comp.lang.ruby.rails, for a few days. Will save you tons of time in the long run.

Is this sort of thing relatively painless to do in Rails?

Not painless, just less painful.

For example, it seems that the online store UltraCart does a similar thing -- each company gets a company code "DEMO" and can have multiple users with different access permissions.

Thanks very much for any suggestions!

   Cheers,
   Jake




.



Relevant Pages

  • Detect Database Version prior to opening db
    ... I am working on developing an access db that will be shared among multiple ... Many people that will be using this app have both access 97 and access ... I can get the version of the db on a Form Load event with either ... database, if they have access 97 setup as their default db. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Online diary/Journal program(OT)
    ... Look at Ruby On Rails ... Create a database for the app to use: ... This should work with the latest RoR. ...
    (Ubuntu)
  • Rails app organization question
    ... I -really- like Rails, though. ... I'm working on a new web app that would allow customers to have multiple logins which access the same database. ... Have multiple instances of the app running on virtual servers, similar to how cPanel sets up accounts for multiple hosts -- each host has its own directory, MySQL database, and so on. ...
    (comp.lang.ruby)
  • Rails app organization question
    ... I -really- like Rails, though. ... I'm working on a new web app that would allow customers to have multiple logins which access the same database. ... Have multiple instances of the app running on virtual servers, similar to how cPanel sets up accounts for multiple hosts -- each host has its own directory, MySQL database, and so on. ...
    (comp.lang.ruby)
  • Re: Multiple Application Membership/Profiles in SQLServer?
    ... I would have the database as a Membership only database (you can add ... profile, etc., but no custom tables0. ... If you want to create multiple dbs (one for each app), ...
    (microsoft.public.dotnet.framework.aspnet)