On Thu, Aug 1, 2013 at 1:37 AM, David Maus <maus@hab.de> wrote:
> I imagine all this is internalized if you're a Zend2 expert, but I
> have to say, after 6 months working on VuFind code (my first
> exposure to Zend), I still am at a loss to know what pieces fit
> where for a full request/response cycle. I am experienced with other
> web frameworks and I get the routing, action finding and
> templates.  What I don't get are the other implicit Zend namespace
> expectations, VuFind's many levels of inheritance and dynamic plugin
> overriding.  
>
> Is it possible to get a thoroughly documented trace of methods
> called in a basic Solr search and the files that provide those
> methods?  (I would love for it to be a diagram, but I would happily
> consume just a list.)

Such a list would be really helpful, indeed. One starting point could
be an execution trace created by XDebug:

http://www.xdebug.org/docs/execution_trace


Thanks for that.  
 
> what resources have helped existing devs bone up on Zend 2 conventions?
> I find the official Zend docs are backwards and lacking (for the
> API) or unhelpfully include every last Zend component (the Reference
> guide).

My rule of thumb: If in doubt, check the source. The documentation is
definetly not the strongest part of the Zend Framework.

Yeah, in this case, the zend Service Manager function actually throwing the exception for me right now is the basic get():
https://github.com/zendframework/zf2/blob/master/library/Zend/ServiceManager/ServiceManager.php#L440

And that basically returns the result of three possible constructors/fetchers:
  • $this->instances[$cName] // cached version, obviously not my case.
  • $this->retrieveFromPeeringManager($name) // probably not it
  • $this->create(array($cName, $name)) // likely it
Actually, I found a redundant conditional in that function already (see my pull req. on github).  

But tracing create(), I still have to understand createFromFactory, createFromInvokable, canCreateFromAbstractFactory, etc. and none of them will actually tell me "Failed opening 'foobar' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')".  You know, like a normal include error would.  So yeah, a trace like xdebug promises would be very useful.

--joe