Strategic advice for classical music venue website.
I'm starting on a new project renewing a music festival website. On balance I decided that it could do with being dynamic to facilitate updates. However, while the schema for the festival is not too bad, I'm a little uncertain about the querying strategy for displaying the festivals on a page.
General info on the schema:
Festival table: id(INT), name (VARCHAR), description (VARCHAR), start(DATE)
Day table: id(INT), festival_id(INT), day(INT)
performance table: id(INT), composition_id(INT), day_id(INT), order(INT)
artist_lkup table: id(INT), name, bio, composer (BOOL), performer (BOOL)
instrument_lkup: id(INT), name(CHAR)
performance_artist_fact table: performance_id, artist_id
composition_lkup table: id(INT), name(CHAR), description(VARCHAR), composer_artist_id(INT)
arrangement_lkup table: id(INT), composition_id(INT), composer_artist_id(INT)
arrangement table: id(INT), description(VARCHAR), composition_id(INT), arranger_artist_id(INT), original_arrangement (BOOL)
In the future, there will be a requirement to look up artist and composer biographies, but the immediate problem is using this data and displaying it as a festival programme with the daily programs and the performers etc. I've created this schema myself, so if you have any observations on improvements then they'll be very welcome.
In the past, I've done simpler PHP/MySQL projects, but I can already see that this has the potential to get pretty gutty. Would people recommend a framework (if so which) for this or to build my own classes? I have actually been toying with the idea of using Ruby for this project. You can assume that any learning I need to do will be useful in the future so that's not a barrier.
There's a lot of questions here I know. Your feedback is greatly appreciated.
- I don't see a need for two separate arrangement tables.
- I'm guessing you'll want an artist-to-instrument relation table?
- As far as querying strategy, that depends on what exactly you want to do, but by using LEFT/INNER JOINs you ought to be able to grab all the info for one festival with one or maybe two queries.
Second arrangement table was put there by mistake, you're right there's no need. On reflection, joins would be a nice simple way of doing it. Do you think there's any time to be saved here by adopting a framework rather than building my own classes?
Originally Posted by NogDog
In the short term, a framework may not gain you time, as it will involve a learning curve for you to get up to speed with it. However, depending on your skills, how quickly you take to it, and I suppose which framework you select, it might not be that much of a hurdle; and hopefully it would result in more robust and more easily maintained code than you would get with the same amount of effort. Probably the biggest benefit would then come with the next project you work on using that same framework.
Thanks for your reply. I'm sure that this won't be my last project. It just leaves the question which framework to go for. I'm starting almost completely from scratch so opinions on frameworks, be it any of the PHP frameworks or maybe Rails (I've written in PHP and Ruby in the past). I've been unable to draw conclusions from what I've read on the net so any input and discussion is welcome.
Opinions gratefully received.
If you've worked with Rails before, you probably have a good head start on working with the various PHP MVC frameworks. The only one I've worked with is CodeIgniter, and have found it relatively easy and useful, with quite good documentation. The only other one I looked at closely was CakePHP, and just couldn't get into it. However, I suspect with my experience since I last looked at it, it probably would be much easier for me to pick it up now.
From what I've read from others, Zend Framework probably gives the most powerful set of tools and flexibility, but at the cost of requiring a bit more work from the developer to deal with some lower-level things that the other popular frameworks handle more by default (at the cost of making it more difficult if you don't want to do it their way).
I think these CodeIgniter video tutorials give a good idea of the basic power of using a framework: http://codeigniter.com/tutorials/.
Thank you very much for the pointer NogDog. I watched those tutorials on codeigniter and I think I've seen enough to convince me that it's a goer. The structural concepts seem quite similar. Think I'll give this a go.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)