From: wiseguy <wi...@ig...> - 2005-04-07 03:25:56
|
It doesn't make any difference to me how many classes will be written...In fact I'm just a bit concerned that having many classes might be confusing to remember which class to instance or which class has a determined method, even having suggestive names as Firman's idea. Maybe the best here, IMHO, will be having a class to handle sqlite stuff and other to handle its output and stuff as Steve has said. Felipe Lopes Em (23:41:43), Firman Wandayandi escreveu: >On Apr 4, 2005 9:34 PM, Steve Dibb wrote: >> Firman Wandayandi wrote: >> >> > OK, actually I has another idea, that phpsla use more than one >> > classes, I currently not finished drawing the UML yet, maybe some >> > abstract explanation will be make it better. The idea is, to create >> > some classes named: phpSLA, phpSLA_Error, phpSLA_Database, >> > phpSLA_Table, phpSLA_Index, phpSLA_Trigger, phpSLA_View, >> > phpSLA_Function, phpSLA_Result, phpSLA_Importer and phpSLA_Dumper, >> > sorry if I missing some classes, the paper isn't here now. Those >> > classes provide usefull methods, e.g phpSLA_Database::connect(), >> > phpSLA_Database::schema(), phpSLA_Table::structure, >> > phpSLA_Table::schema() an so on. So hold on for working the class, I >> > think this will be better than it :-). Dunno that I'm will be busy or >> > not this week, but I tried to finishing the UML first, and show out. >> > >> > Comments? Suggestions? Any better ideas? >> >> Are those all going to be individual classes? Seems a little >> unnecessary to me to have so many classes for basic functions. Besides, >> you're probably going to be calling most of them on the same pages >> anyway, so I don't see any reason to put them all in different objects >> and them remember which one calls what function. >> >> Admittedly, PEAR's DB is split up a little bit, but it's still pretty >> simple -- DB.php, common.php and then sqlite.php. >> >> I think something similar would help, too. Make an sqlite-only class >> that handles all the queries, and then one for the HTML, output, deisgn >> and layout of the pages. That way, anyone can copy/use our >> soon-to-be-awesome sqlite class without having to adopt our layout >> preferences at the same time. >> > >Nevermind, this is just an idea, i has addopted it from PHP5 sqlite >extension, where are available builtin classes SQLiteDatabase, >SQLiteResult and SQLiteUnbuffered. IMHO If we use separate class for >handling specified function, that more effective, efficient and >reusable, phpSLA_Database is provide specified database function, >phpSLA_Table is provide specified table function so on or we can use >phpSLA_Dumper for dumping database, table, index, trigger, view and >function. PLUS it's more easy to maintain it. > >-- >Firman Wandayandi .:: OrangEnigmA : Never Dreamt Before ::. > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Phpsqliteadmin-devel mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phpsqliteadmin-devel > >---------- |