hi... i was reading something on phppatterns website about class design. the reading said that its best to take say a db extraction class that you might want to write and instead of making one super huge class out of it called "db" or whatever it would be called but to turn that "db" class into a bunch of mini classes. so instead of having: class db { //connect functions //error functions //query functions //result functions //so on...} you should make: classes: DbConnect, DbError, DbQuery, DbResult and so on...
was just wondering what the best way to do something like this is... i can see writing different classes for different sections of db use but unless my mind is super limmited right now that isnt really 100% possible or reasonable considering that some of those classes might only have 1 or 2 different functions in it... but then again i guess super small exact easy to figure out classes are the best?? for example class DBQuery would have in it: Insert, Delete, Update, Select, CheckTable, BackupTable, RestoreTable, TableList, DbList and so on... and maybe that could even be broken down to 2 classes in itself: DbQuery and DbInfo... ok time to stop babbling i guess... just trying to figure out how i should start going about this class writing deal and how to split the files/class defines... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php