Re: Debugging classes

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

 



On Tue, January 22, 2008 12:06 pm, TG wrote:
> One thing that keeps smacking me in the face, though, is reverse
> engineering
> in order to make proper changes to projects created by others using
> classes.

OOP requires a great deal more high-level documentation, to tell what
classes do what and how the hierarchy interacts, at least for anything
other than trivial "example" apps.

No docs == a lot of work to figure it out.

Good class names helps, somewhat, but even the best-named class may
have some pretty serious differences from what you expect, just based
on the name...

> In particular, I've been doing a lot of Joomla work and I end up doing
> a
> global "find in files" trying to trace things back to see where
> they're
> assigned, etc.

grep is your friend. :-)

> In particular 2, "$this".  I know it's a keyword meaing "the active
> object"..
> I'm cool with that, but sometimes I need to make changes to how things
> are
> handled, or what data is included.  I can do a print_r and see what
> type of
> object it is, look up the class definition, etc, but it still seems
> like a
> pretty cumbersome way of doing things.

You may want to check out Zend IDE, Komodo, etc and see if they can
help you in run-time to work out what's what.

I don't do OOP, and don't use such high-falutin' tools, but I assume
they'd have SOME kind of inspection features to help you do the lookup
and find the definition...

At least, that would be one of the first features I'd put into an IDE,
if I used OOP in PHP and if I used IDEs in the first place...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/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