marsrover
marsrover

Reputation: 715

Two rails apps with the same database?

Is there any risks/cons with building two different applications that use the same database? Specifically two rails applications.

Why do I want this? I have an REST API (built in rails) to power a mobile app and I also need a web application for administering the database. Due to the security issues with using token based authentication on a web app it seems like a better idea using sessions for the web app.

Upvotes: 3

Views: 1941

Answers (1)

Mike Szyndel
Mike Szyndel

Reputation: 10593

I did work on a group of applications that were sharing the same database. We had a gem used by all the apps which included all the models.

This way we were able to ensure that all business logic in the same in all client apps (validations, scopes, etc).

There was a small overhead of switching between the apps to make changes and then making sure all other apps were up to date (especially if the change had bigger impact) but it did the job.

Upvotes: 4

Related Questions