Jump to content

Main Domain for CMS, subdomain for application?


Entice
 Share

Recommended Posts

Hi.

I'm trying to figure out what might be the best approach when using PW for your CMS, but needing access custom tables. I know you can query your custom tables, so that's not my question here. What I'm trying to figure out is if I should separate an application from PW.

Out of the box, the application I will be using has its' own tables and the app is built towards using those tables, so I don't want to rewrite the app to use PW, seems too much work.

I do however want to use PW for the CMS and frontend where my users can add/update rows in those custom tables. Now the app itself can be connected from various devices on a handful of ports, so I'm expecting a high volume of requests to the app to a point where I'm seriously considering a dedicated server for this project.

Would it be beneficial to create a whole subdomain just for the app and use PW to query the db? Or should I keep the 2 in the same db? Pros/Cons would be great here.

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

So I've been working on a special class for the app interacting with the app's db tables.  I've went and added 2 tables onto here.

  1. pwusers - This is where I store just the id of PW users (since the app has its' own users table as well)
  2. users_pwusers - A relationship table connecting pwusers to the existing users table of the app.

The idea is when a new user is created in PW, I would simply:

  1. Add that id to the pwusers table
  2. Create the user in the users table in the app
  3. Add the 2 ids into the relationship field.

From there, I have a way to retrieve information from the app associated with the user created in PW.

I believe this is the focal point between the app and PW. Setting up this way will allow me to keep the the front end and the app separate in case I ever want to move the app to somewhere like AWS or Rackspace and utilize their database services for high volume.

My only concern that's in the back of my mind is synced backups and restores.

It's still in early development phase so there's still a lot of room for pivotal changes if anyone has a better approach.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...