Re: class usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, September 29, 2006 1:21 pm, Robert Cummings wrote:
> #3 In PHP
> PHP has no namespaces, use classes to improve your chances of avoiding
> namespace collisions.
>
> And I realize Richard will call this the wrong answer, but when you
> don't have the tools you need, you make use of the ones you do have.

Nope.

Right Answer.

#3 Code Releases
If you are releasing your PHP code to "the world" wrapping it all up
in a WELL-DESIGNED class so that you minimize the risk of namespace
collision is a Good Thing.


It's just that I am more of a "here's my home-brew code you can have"
kind of an Open Source guy than a "here's the code I spent an extra 10
X amount of time making it bullet-proof so you could mindlessly
install and use it" Open Source guy... :-)

Obviously if you want to be the latter kind of OSS guy, you need to
use classes to release your code instead of just slapping an
"ln -s foo.php foo.phps"
into your web tree to let it all hang out.

YMMV

:-)

#3 Caveat
There are *way* too many really badly-architected files out there that
the author thinks are #3, but they aren't.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux