----- Original Message ----- From: "Robert Cummings" <robert@xxxxxxxxxxxxx> To: "Satyam" <Satyam@xxxxxxxxxxxxx> Cc: "Deckard" <ml@xxxxxxxxxxx>; <php-general@xxxxxxxxxxxxx> Sent: Thursday, October 05, 2006 2:16 AM Subject: Re: Help on objects > On Thu, 2006-10-05 at 07:04 +0200, Satyam wrote: > > I've seen you already had a good answer on the errors in the code so I won't > > go on that. As for OOP, the one design error you have is that you are > > asking for an action, not an object. You want to make SQL inserts, that is > > your purpose, and that is an action, which is solved by a statement, not by > > an object. There is no doer. Objects are what even your English teacher > > would call objects while describing a sentence. You are asking for a verb, > > you don't have a subject, you don't have an object. Of course you can wrap > > an action in a class, but that is bad design. Classes will usually have > > names representing nouns, methods will be verbs, properties adjectives, more > > or less, that's OOP for English teachers. > > Properties are very often nouns in addition to adjectives. For instance > a linked list class will undoubtedly have noun objects referring to the > current link, the next link, etc. > > Cheers, > Rob. > -- > .------------------------------------------------------------. > | InterJinn Application Framework - http://www.interjinn.com | > :------------------------------------------------------------: > | An application and templating framework for PHP. Boasting | > | a powerful, scalable system for accessing system services | > | such as forms, properties, sessions, and caches. InterJinn | > | also provides an extremely flexible architecture for | > | creating re-usable components quickly and easily. | > `------------------------------------------------------------' > > -- > 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