[pLog-svn] Branch plog-1.1-ben - callgraph 1.1-ben

Benjamin Krause ork at orkland.de
Tue Apr 5 08:47:40 GMT 2005


Oscar Renalias wrote:

> I'm getting more and more convinced that php is not suitable for this
> kind of heavily OOP-(over?)designed PHP apps. It runs ok but we keep
> bumping into all this sort of issues that don't really leave a good
> taste in your mouth... You try to design a nice API to make your
> development easier and it turns out that spaghetti code will always
> run much faster than your architecture. I mean, is really PHP/Zend
> encouraging proper development techniques? Can't they really decrease
> the penalty/overhead resulting from creating classes, calling parent
> constructors and in general, making method calls? I really don't get
> it.

Its interpreted .. that's the main problem.. using the zend optimizer 
might help.. but then again, using java is the only good decision :)
i guess it depends on the target group again.. most of the people you're 
targeting at don't know how to setup and admin a tomcat. most of the 
low-cost webhoster offer apache, not tomcat.
actually its quite easy to deploy a .war file, but time is not right 
yet.. :(

> On the other hand, let's see what we can do to fix it. Reorganizing
> the includes is a first good step (though I would pay for an improved
> "new" operator that loads classes dynamically based on something like
> a CLASSPATH) and probably we'll have to find a few more tricks like
> this. Also, how about giving up our nice hierarchy where everything
> inherits from Object? We could remove that inheritance requirement and
> only extend if really necessary. (only in cases like Action, or View,
> etc) I am sure it would help.

i'm not sure if removing the object inheritance will speed up the code, 
but we might try :)

as far as i've seen it, not executing the code slows everything but 
loading and syntax checking. we might go for a dynamic classloader, not 
sure how to implement something like that ..
i've seen your code to dynamically load classes in PluginManager.. but i 
don't if we can extend this to a level where we can load all classes 
dynamically.. beside the speed issue, require_once() is damn fast :)

but its a good thing to think about every aspect of the product, maybe 
we can figure something out..

and afterall, its just speed.. as long as noone is complaining about 
pLog being to slow we might not do to much refactoring ..

I'll continue my work in plog-1.1-ben and wait for your comments..

Ben





More information about the pLog-svn mailing list