-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I must say that both techniques *can* lead to hell when debugging.

The idea of adding new methods ontop of existing classes is usually not
safe if not documented well.  The one thing I liked about the
verbose-ness of Java is the fact that I always knew what I was getting
back (and so did the next function I was calling).  

In PHP I think runkit (http://php.net/manual/en/ref.runkit.php) is the
closest resembling these type of functions.  I could be wrong.

- - Jon

- -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Cliff Hirsch
Sent: Monday, January 22, 2007 1:49 PM
To: [email protected]
Subject: [nyphp-talk] Intellectual Monday

I have been digging into JavaScript and jQuery, and am intrigued by
several concepts.
 
1. jQuery uses chaining, whereby every method within jQuery returns the
query object itself.
 
2. JavaScript's prototype method is an interesting concept for adding
methods to existing classes.
 
I wonder how these techniques work in the PHP world. Does anyone use
chaining effectively? Is there a PHP equivalent to the prototype
concept?
 
Cliff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFFtTd899e5DI8C/rsRAr7iAJoCLd8vFe+6BelimHh9qAyeaXJOLwCgrO0H
aKBO5dRU1neQgkNXqnwWB1M=
=Tm7u
-----END PGP SIGNATURE-----
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to