|
Posted by elyob on 03/20/06 21:01
"Dikkie Dik" <nospam@nospam.org> wrote in message
news:7e0ec$441c18e3$57d40752$12446@news.versatel.nl...
>> I've always been a procedual coder, and am looking to get into OO asap.
>> Any hints and tips appreciated, I've not totally got my head around it
>> yet.
>
> Let me end with one word of advice. Object oriented thinking and designing
> does not come in one day. Start with program parts you can "feel" that
> they should be an object, and define classes for them. Having a PHP page
> with still much procedural code and also some calls to objects is much
> better then to just put a class keyword around a lot of procedural code.
> Do not be afraid that your design is not optimal. It probably isn't. And
> if it is now, it will not stay that way, as the outside world of it
> changes and objects too have to adapt. A less than optimal design is not
> bad, because you learn from it, and because it forms the basis of a better
> design.
>
> Good luck.
Thanks for the advice. Some useful ideas in there. Now I guess I need to
just get my head around the physical language.
So, if I was building a cart from scratch I'd think ....
session handler
opendatabase
displaycart
addtocart
displayshop
Then I'd need to start building it. Is this stage 1? Is this how you'd think
it out?
[Back to original message]
|