|
Posted by Jerry Stuckle on 01/22/08 19:01
colin@nospmanthanks.com wrote:
> In article <S7-dnSyA-K1uaAnanZ2dnUVZ_uGknZ2d@comcast.com>,
> jstucklex@attglobal.net says...
>> But this is all very simplistic. I really recommend you visit the
>> library and check out the books on object oriented programming.
>>
>>
>
> Like I said - I understand classes and object oriented programming - it
> isnt an issue.
>
> This is what I asked:
>
> for example I've just seen a "who is" application thats just 2 files
> and a few dozen lines of very simple code
>
> But the author put the thing into a class. This just seems to complicate
> the code without providing any benefits as far as I can see.
>
> To me this appears to be contra-intuative. I'm looking for reasons why
> people are doing this as a matter of course with PHP
>
> cheers
> Colin
>
>
Well, as Kay said - it encapsulates the functionality, making it easier
to do a "whois" on other pages - either for this site or another.
It also means if you need to change the code, you only need to change it
in one place and it won't affect the rest of your code.
I'm always looking for ways to encapsulate things. I don't do
everything, but I do a lot.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|