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?