[PEPr] Comment on Networking::Net_CDDB

From: Date: Fri, 10 Feb 2006 19:43:53 +0000
Subject: [PEPr] Comment on Networking::Net_CDDB
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41289@lists.php.net to get a copy of this message
Ian Eure (http://pear.php.net/user/ieure) has commented on the proposal for Networking::Net_CDDB. Comment: Needs lots more work. From a quick run-through: - Needs to follow the PEAR Package Directory Structure: http://pear.php.net/group/docs/20031114-pds.php - Repeated "if (!isset($conn_params['foo']))" should be cleaned up. You could have default settings in a static class var, then merge with options and store in self::$params. - The differing backends seem like an ideal place to use a factory pattern. - The _parseRecord() / Net_CDDB_Disc thing seems silly. Why not have Net_CDDB_Disc parse the record itself? Why not just pass $record instead of each member individually? - CDDB response codes should probably be constants, i.e. NET_CDDB_RESPONSE_FOUND. - submitDisc() could use Net_Socket instead of the raw socket functions. - Unnecessary 'CDDB' prefix on some functions. - Inconsistent naming of functions. submitDisc() vs. CDDBmotd() vs. CDDBstatistics(). Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=320 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#41289) next »