It almost sounds like you've not yet drawn out an object map on a piece of paper to see for youself how everything is inter-connected. I'm sure this is the _perfect_ opportunity for using classes, but at the same time will require some good thought now before you go a head and implement it. Good object design doesn't just happen, it's thought out.
As for instantiation (creating the objects), don't worry about this just yet (Unless you're using some gross amount of memory). Very often, the cost for optimizing your code before it's actually written doesn't help. There are so many unforeseen inefficiencies you will encounter; simply not allocating a class here or there will be the least of your worries. Some advice: Write the code as it makes sense in your mind and on paper. Then worry about how to optimize it. Even Knuth himself said, "Premature optimization is the root of all evil" Best Regards, Erik Osterman http://osterman.com/ -----Original Message----- From: jsWalter [mailto:[EMAIL PROTECTED] Sent: Sunday, September 21, 2003 4:12 PM To: [EMAIL PROTECTED] Subject: [PHP] advise on new class of mine I'm in the process of building my first "real" class. 43 methods, 23 properties, nearly 1000 lines of codes. What I would like to know... Is it better to keep al this in a single file? Or break it up into sub-classes? This does have logical sections, so a breakup would be possible, but then I'm not sure how I would piece it back together. Also... Many properties are not required at object instantiation, but I define them none-the-less. Many are derived from multiple others. It is better to define all properties, many may never be used, or simply define them as they are called? I define them all now, so there is a (ever so) slight hit on cycles for this. If I define them as they are called, then each needs a conditional to process to run each time that GETTER is called. Or is this "6 of one and half-dozen of another"? Now, this gets broken up, many of the properties correspond the different sections. then he properties should be defined as called, because their package would only be loaded when called. Am I talking in circles here? Does anyone have any advise? Thanks Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php