[nycphp-talk] PHP IDE, Hudson, Netbeans
Paul A Houle
paul at devonianfarm.com
Mon Feb 8 14:33:46 EST 2010
Edward Potter wrote:
> this has absolutely nothing to do with this thread or php, BUT i have
> used EVERY IDE in existence. It probably cost Apple 1/2 billion
> dollars to get Xcode out the door. Worth a free DL just to see what
> the future will look like. It's just about perfect.
>
I think the meaning of "IDE for PHP" is very different from what an
"IDE for Java" or an "IDE for C#" is. Personally I love Eclipse/Java
and find Visual Studio is a great environment for work in C#. In a
statically typed language, it's possible for an IDE to do a LOT of
inference about types and provide many useful features, such as the
ability to track down all of the places where a function is used and
change its name reliably.
In particular, I feel that Eclipse does a great job of pushing back
against Java's verbosity: it makes Java a tolerable language to work in.
You just can't do so much in PHP, because you don't know what the
type of each variable is. You could certainly build something that
makes a guess when it can, but it's not going to be as complete as an
IDE for a static language.
To make matters worse, my big project heavily uses
metaprogramming, for instance, if you write
$x=$object->some_property()
there's a magic method that looks for
$object->get_some_property() and $object->_get_some_property()
If it's _get_some_property(), the property is memoized. The system
revolves around an "object model" where there is a hierarchy of
persistent types:
so_type_object -> so_type_entity -> so_type_picture ->
so_type_picture_of_topic
and then there are instances of these objects, so
so_type_picture ===> so_instance_of_picture
and then there are "controller" objects that define the web user
interface; controllers themselves are decomposed into inheritable
sub-controller objects that means that I can add some feature to, say,
so_type_entity (like tags or comments) and have the web UI become
available for all of the subtypes... but still be able to disable or
modify features; now, I use
$method_name=compute_method_name();
$object->$method_name
all the time. On top of that, there is a "value type" hierarchy that
(roughly) lets me create new types for SQL columns, and sometimes these
types are getting boxed and unboxed.
Behaviors here are driven by naming conventions; it would be nice to
have an "IDE" that is programmable with my naming conventions so it can
help me navigate through a pretty big system. If I'm going to do
anything in this department, it's going to build on top of my
autoloading system, which already maintains a map of which classes are
in which file, and is probably going to also add a profiling capability
so I can preload commonly used classes in a way that that opcode caches
can understand.
More information about the talk
mailing list