[snip] > > Otherwise, I'm curious as to why you're using a large switch, not that > it's bad inherently IMHO, but there may be a better overall approach. > > /jw I don't know why *he* wants to do it, but one useful example is the MVC model (google "MVC phppatterns" if you're unfamiliar with the term). For a given action he can include the class definitions he will need to perform that action. Jay, are you using PHP5? Because if you are then I thought of something else. You can put each class into its own file and define your own __autoload() function to include a file "just in time". The main downside to this is if you use someone else's code and they have also defined their own __autoload() function then you get an error! :( [/snip] We have not moved to 5 yet, but sounds closer to what I am looking for. We will probably upgrade to 5 after we get two of our highest priority projects are launched. All of our projects are intranet applications for office use, so sometimes efficiency questions are really moot as we use multi-processor servers to deliver most of the goods. Occasionaly we will expose a web interface to the public, but not typically. Remember, I am old school. My first programming venture was in the 70's with FORTRAN, so all of you young bucks view programming differently than I do. I have a tendency to view things more from a C or C++ POV in terms of construction at this stage. That is why the above mentioned MVC model is comfortable to me. We have kind of been doing top-down methodology for a few years with PHP, but projects are becoming more complex as the corporate culture is coming around to my way of understanding data and the manipulation of the data (normalization was not in their vocabulary prior to my arrival several years ago, imagine starting a large data driven company without a programmer/database admin .... *shudder*). Therefore the MVC is somewhat more fitting, but it can have a downside where code maintainability comes into play. Josh, I am interested in what you mean by "but there may be a better overall approach." I appreciate all of ya'll's insight on this and for setting me straight on the includes/requires band wagon. I made some incorrect assumptions (and didn't run the simple tests I could have run myself, as a couple of you have pointed out) and I will now have to eat some crow in front of my more youthful programmers. My saving grace? They didn't prove me wrong with these very simple tests either! (I know you're reading this....I can hear you chuckling you SRB's...first one to say something buys lunch) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php