psynor Posted July 11, 2012 Share Posted July 11, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/ Share on other sites More sharing options...
requinix Posted July 11, 2012 Share Posted July 11, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360836 Share on other sites More sharing options...
psynor Posted July 11, 2012 Author Share Posted July 11, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360915 Share on other sites More sharing options...
requinix Posted July 11, 2012 Share Posted July 11, 2012 But the sites all do different things. You can share a framework but you'll have to write custom code somewhere. Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360926 Share on other sites More sharing options...
psynor Posted July 11, 2012 Author Share Posted July 11, 2012 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 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! Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360935 Share on other sites More sharing options...
requinix Posted July 12, 2012 Share Posted July 12, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360959 Share on other sites More sharing options...
psynor Posted July 12, 2012 Author Share Posted July 12, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/265524-structure-for-multi-purpose-platform/#findComment-1360962 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.