Hi Xavier,
Sorry for the late response. Last 2 days I went out of the city... Actually, I did developed this script for http://www.simplydrop.co.uk/. Purpose: systematically It will grab updated available device details like price, condition from a CSV file which placed in a third party drive location. As far as OOP concept is concerned: As you know, There are number of ways to implement our technique/ideology on the flow of the script which is based out of the scenario. When I started develop this script, my intention was OOPs with Singleton pattern for a unknown scenario. :D But Partially I achieved what I was intended. File Size: 512 Reason behind is: testing purpose.. In the real time scenario the parameter (512) will be replaced with filesize(). Moreover, nowadays most of the PHP applications build using a Framework or CMS (Drupal, Wordpress). I'm using Yii and Symfony which is based of MVC (OOPs). So for a PHP programmer, doing code in OOPs concept is in his day to day life. But the way we implementing the structure will be differ. Please let me know your thoughts. Thanks! Regards, S.Madhavan On Tue, Nov 16, 2010 at 10:39 PM, Xavier Antoviaque <[email protected]>wrote: > On Tue, 2010-11-16 at 10:55 +0530, Madhavan S wrote: > > Recently, I have created a PHP script for an automation process (CRON) > > followed by the OOPs concept which I attached with this mail. Please > > find and take a look. > > Thanks for the sample code Madhavan! I've had a quick look at it, and it > raised a few questions. Hope you won't mind! : ) > > - How often do you develop using OO, compared to procedural programming? > How would you rate your understanding of OO programming? > > - Could you provide some context on the application on which this code > was used? What problem were you trying to solve when you wrote that > code? > > - Why did you choose this structure for your classes? Can you elaborate > a bit? > > - In fileSystemHandler->getFlatFile(), how do you handle the case where > there is no file in FLAT_FILE_DIR? Also, why do you only read 512 bytes > in this file, in fileSystemHandler->readData()? > > - If the connexion to the db in farSidesGateway->__construct() fails, > why don't you stop the execution of the script? > > - What would you change to your code if these objects were used in a > program that also connects independently to a mysql database? > > - Why did you chose to put things such as $this->cd_asn_reference_number > directly on the DBSystemHandler class, instead of creating a specific > class to describe services ? > > - Why didn't you include comments on your code? > > - What would you want to improve or change to this sample code? > > - Are there any areas where you would like to improve your skills? > > Thanks! > > Xavier. > > _______________________________________________ > Farsides mailing list - [email protected] > > Wiki: http://farsides.com/ > List: http://farsides.com/ml/ > Forum: http://farsides.com/forum/ > Ideas: http://farsides.com/ideas/ > Chat: http://farsides.com/chat/ >
_______________________________________________ Farsides mailing list - [email protected] Wiki: http://farsides.com/ List: http://farsides.com/ml/ Forum: http://farsides.com/forum/ Ideas: http://farsides.com/ideas/ Chat: http://farsides.com/chat/

