At the time I was working on PHP (early 2002-4ish ?) version 4 I believe and it had minimal support for objects back then so the book I had brought and was reading did not even include it in there. I did not really know was OOP was anyway so it didn't matter, I was happy to learn PHP just as it was a procedural language as it was designed as. At the same time I was learning HTML and javaScript as well since I barely knew what web standards/ document types was and what a DOM was. Ah and there was also CSS as well so I had to drop using tables for layouts and learn that as well. All in all it was a slow progress and I would say PHP was my first programming language that I really understand when trying to learn how to program. The syntax was loose enough to allow you to learn and make mistakes as you went along.
The Problem:
My little project is not so little anymore as I add in more and more features. I've only barely completed the applications/registration section and its taken me so long. Why? because I've tried to integrate Ajax so that I get flashy user controls that enable my users to do what they need. Its going to be a nightmare to modify and update things. I'm looking through the code because I had to update certain parts and it was a pain. Yes I did split up my code into many sections but I think the combination of logic and presentation code that you create in a procedural style PHP file.
I'm not trying to say you can't do it that why its just when it comes to larger projects it can be hard to maintain and build. I also found out that my requirements change or I got some aspect of the requirements wrong initially so I will need to make changes there. You may say its my fault initially for not getting the requirements right in the first place but you can never do. Why? because requirements change and you don't have the foresight to see all possible requirements with lack of experience. If you spend all the time initially trying to track down all the requirements you may never get started developing. You have to try and get things right the first time and allow room for changes to be made if necessary or at least make it so its much easier to change.
The Solution:
Well my idea of the best way to do it so far is using a PHP Framework that supports an MVC architecture. There are a few out there but tutorials are either incomplete or too vague for you to learn much. Back about a year ago when I experimented with the Zend and its MVC I had little idea of what it was but after working with it in Java and using MVC to build our application this previous semester I can see why it helps.
The only problem is there's so many broken tutorials out there and my current state of xampp server is dodgy so I dont know if the problem is on my end or not. Documentation is vague. Oh wait I did get a demo of the latest 1.70 that came with it working. Well it works out of the box anyway. Well that is what I will be doing trying to relearn PHP in an OOP and MVC context. I think that's the best way to go if your going to be making large PHP bases sites or applications. If anyone is interested in picking up zend and trying to learn as well we can share what we learn. The community is small atm so it would be nice to learn from others at your level.
My friends whos a newbie to PHP is building a CMS for WOW lol. I don't know if he will be able to do it. I tried to warn him about the problems with trying to separate presentation and logic and how messy it can get to maintain but he thinks functions will handle that. I'm not sure how it will exactly since if you don't use MVC you still bundle all the code in one file.


