PHP anthology, OOP and classes - which way do you design?
Hi -
I'm just trying to teach myself PHP via Kevin Yanks and Harry Fuecks books here, and I'm trying to get my head round the Class and OOP based approach. (I'm not a natural programmer so apologies if this seems terribly basic!)
I've spent a fair amount of time going through the Access Control chapter and code, and I have a real problem with understanding the order in which a programmer would put together scripts like this.
The chapter first takes us through the development of the classes and functions to be used (sessions, authentication), and then develops the scripts for making use of those objects.
Is that how most of you develop an application? How do you know what classes and functions you're going to need before you start writing the script that uses them? I can more or less follow the code that Harry has written, but I don't think I have the kind of brain that would enable me to start on a project and have a clear enough vision of what is required to enable me to start with all the classes and functions.
Is there something I'm missing - should the design already have taken place at this stage with some sort of analysis technique?
Why isn't MVC pushed more in web programming?
Even in the OOP PHP articles that I see here I find PHP mixed in with HTML. Why isn't MVC pushed more in web programming? I'm reading a good book on UML and ecommerce. I'm also reading a book on UML and OOP thought process. I'm not a big UML guy, but from my recent reading/learning it sure helps through the thought process. Maybe I'm just starting a rant here, but I can't stand it when I find a huge PHP project that I want to tweak and there are echos in classes. :mad: