May 10, 200917 yr Hi, I Plan to develop a site from scratch in PHP with a good back-end to control the site. Although there are many powerful CMS's out there, I plan to do this just to increase my PHP knowledge. I would like to ask how it would be best to do this. I plan to get all my ideas on paper first such as - - The DB tables and fields. - The functionality of the site - etc. How would you recommend I should structure my code? I have never used OOP though... All advice will be much appreciated. Thanks.
May 12, 200917 yr What exactly are you trying to do? There are plenty of CMS solutions out there which are open source and so you can modify to your own needs, thus saving you time and money (depending on your situation) - I don't get why some people want to reinvent the wheel.
May 12, 200917 yr Write out on a piece of paper what exactly you'd like your site to do. Read through and highlight any important nouns and verbs - these will be the main things that you code, and can divide into objects and methods. Once you've identified what your website does, model the database in Microsoft Access and create all the relationships etc. This is just a model that you can easily refer to when creating the same thing in MySQL. I only do this as I prefer Access to Viseo, and I found a much higher success rate when the database design has been done beforehand. Then start coding your website. If you're building a large website, then you may want to consider using a PHP Framework such as Symfony, Zend or CakePHP. These things make it easier to do simple things, and if you work through a few of their tutorials first then you'll find it easier to familiarise yourself with OOP in PHP. The best way is to practice, and never consider your first version to be the final version. With several sites I built, during development I found ways in which I could do certain things better. After completing one project, I sometimes think I can do a previous one better. It's all one big learning experience, and so don't think there's only one way to do something, or that you're doing it wrong because your code doesn't look like textbook examples.
Create an account or sign in to comment