===== Lesson 1===== Let me give you an introduction to our problem, a real World problem I will add: * In the UK (England to be precise) there has been a requirement for every Local Council to create and maintain a Children's Service Directory. This will list all of the services that a child or young person could use, and its there to aid children, young people, parents/carers and practitioners (people who are working in a professional manner with Children - Social Worker etc.). * Here is a bit of information about the [[http://www.everychildmatters.gov.uk/deliveringservices/servicedirectories/|Service Directories]], with a link (Word doc) to a [[http://www.everychildmatters.gov.uk/_files/Service%20Directories%20list.doc|list of Service Directories online]]. * I once developed a Service Directory, [[http://prismdata.hullcc.gov.uk/cypd/|My version of a CYPD]]. If your thinking, huh that looks hmmm - "basic", well your right. The combined restrictions of 'Corporate Look and Feel', Disability guidelines, the [[http://phpnuke.org/|phpnuke]] framework and lack of cash/time mean that simple function over form wins out every time. * There are two parts to my Service Directory, the frontend - which you can see on the web, and the backend... which you can't see... :) I kept them separate for a reason, security.. anyways... the backend is built on VB6 and interfaces across the LAN to a MYSQL database. A subset of that database is copied across to a standalone webserver which is what you see. * What I propose to do over the next few months/years ;) is to rewrite this Service Directory with new improved features and then give it away to anyone that wants it. The reasons behind the last statement are a) I am and advocate for GPL and b) I am paid by public so feel I shouldn't demand money for something that could be a benefit to others. * So lets get down to business... {{programming:orginal_cypd.png?150|Orginal CYPD Database Schema }}Here is a copy of the original database schema which shows the relations between the various tables, the use of an intermediate table allows the many-to-many relations. (Made by using [[http://dev.mysql.com/workbench/|workbench-oss]]) * The original version of the Directory was coded back in 2004/5 and was based on phpnuke, it was a quick affair to get someone out of a hole at the time and was always meant to be recoded ASAP. Like most things in life the 'plans of mice' don't always work out and the reworking of the code never happened. * In the mean time I had done a lot of analysis and design of CYPD ver2, this meant lots of discussions with the people who used the Directory, writing of Use CASE diagrams, OOA etc... In the end I was left with a pile of paper with lots of nice pictures on them :o) It was at this point the project was halted as a decision was made to buy some off the shelf software. Fair comment I thought and left it at that. But over the years since I have gone back often to CYPD ver2 and after a little spare time over this Xmas holidays I thought it would be fun to try and code up Ver2 while learning the symfony MVC. * I have been interested in MVC for some time and have followed (from some distance) the growth of some of the frameworks as a means to reduce the effort in coding web based apps. I read quite a bit on the Symfony and liked the ethos of the guys at Sensiolabs. I bought their [[http://www.amazon.co.uk/s/ref=nb_ss_w_h_/202-8820217-7318206?url=search-alias%3Daps&field-keywords=guide+to+symfony&Go.x=0&Go.y=0&Go=Go|book]], read it from cover to cover and decided to have a go.. * I am a little way into the project and thought it would be worth putting it on the web to help others find their way. * Lets get some [[specifications]] recorded so we have something to work to...