Jump to content

Recommended Posts

So I've been planning a project for a multi purpose platform. The idea is to use the same platform for several sites which will in turn result in a network. Log in on one site, and you are logged in on all sites in the network (this part i've got sorted out).

 

The sites will focus on different topics like, attractions, entertainment, hotels. So now I'm trying to figure out a database structure that can be used on each platform.

 

Let's take the music site first. It will hold information like:

- Artists

  - Name

  - Genre

  - Contact/Booking info

- Labels

  - Contact info

  - Name

- Releases

  - Title

  - Artist

  - Track list

 

Then the site for hotels will contain info such as

- Name

- Address

- Contact info

 

I've been thinking that I can treat them like items, but I'm stuck on how to build a solid structure so I don't have to build every site from scratch.

 

Any ideas are very much appreciated

Link to comment
https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/
Share on other sites

Generic structures are straightforward but a hassle to use.

 

Why can't you have a dedicated database (database, not server) for each site? It's impractical to make them all use the same data structures when they really don't.

Thanks for the reply :) I probably explained it badly, because I'm going to use 1 database per site (all sites hosted on one dedicated server). But after creating the first site I would like to be able to just install the same platform for a new site without having to rewrite database requests etc

Yeah I'm aware of that I will have to rewrite some code. There's no way to make it 100% one fits all like a CMS. That would create to many restrictions. Also, cms requires extensions to fit different purposes so :P:) But I just thought it was worth a shot and ask if someone had an idea on how to do it :) But like you're saying, there's too much of a difference between the content on the sites.

 

Guess I will just do some framework research, and build a platform on it that is easily maintained when it comes to introducing it to a new structure :)

 

Thanks for replying though :) Much appreciated!

It's possible, fairly straightforward, and cool, but it's generally not a good idea. You lose out on some features by doing it that way and you'd probably end up writing weird-looking code in order to use it. As for extensions, wouldn't you just end up writing one to be used on just one of the sites?

 

A framework is your best bet: you can push out a lot of the menial work to it and extend the functionality with common code that all your sites are going to use (such as the login/registration mechanism), and it leaves you in just the right place where you can write good, solid code for the unique functionality.

Yeah this is how I've decided to do it... Trying out Yii now and the network structure will most likely be something similar to

 

/protected (shared by all sites)

/protected/framework

/protected/app (custom application handling login and other tasks that's the same on all sites)

 

/site1

/site1/app (extension of /protected/app)

/site1/config

/site1/controllers

/site1/models

/site1/views

 

/site2

/site2/app (extension of /protected/app)

/site2/config

/site2/controllers

/site2/models

/site2/views

 

.....

 

At least this is what I'm trying out to see if it will work like expected :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.