I fully appreciate what the ZF2 framework is intended to accomplish at large (and wherever possible I did not hack core code in VuFind 1 – I extended classes, created my own theme, etc.). The problem I’m finding is that instead of putting 98% of my energy into making the customizations I need, I’m putting all that energy and more into trying to understand how in the world to set up all the necessary directories, files, classes that have to be created by default (which confuses me because isn’t one of the points of a framework to take away the busy work?), and VuFind specific class extensions. I don’t care how ZF2 works; I don’t want to be a ZF2 master. I just want to override existing VuFind functionality and add new functionality. </soapbox> (That was partly to relieve some frustration but also to point out where some VuFind developers will be coming from, especially those of us that can only carve out 3 or 4 hours on a good week to work on VuFind customizations.)


Two things that pop to mind immediately that I need to do are to extend the Symphony driver and modify how title/copy holds are implemented in the catalog currently. I expect that the Symphony driver modification will be straightforward once I can make sense of how I get a ZF 2 module constructed within the VuFind context (for example, ZF 2 shows the Controller directory as being at the custom module’s root but the VuFind core components have it underneath “src”  -- I don’t know if that means it has to go in src).


I don’t have a clue how to go about modifying the title/copy hold logic – that’s where I would start playing with the core code to see what objects come to play. (I haven’t even begun to try to figure out VuFind core.) But again even if I figure that out, I’m baffled as to the extent and structure of stuff I need to set up in a Module to add my modifications. If I could see a working add-on Module (that does anything) to see how the pieces are put together (independent of ZF2 theory), it would go a long way to getting started on making my own customizations. And if I could just make a Module which injected “Hello World” into the home page, I ‘d be feeling way more confident.


I would compare it to when my father was teaching me how to drive (manual, of course). He went through great explanations of how the gears work and how the clutch releases the gear, blah blah blah. That didn’t help one iota in the actuality of driving a stick. In fact, only after I got the hang of driving a stick did the theory behind the practice start to have any meaning. (I would add that it would have been more helpful if he’d driven the car while explaining the actions he was doing, showed how to recover from a near stall, etc.)


Am I making any sense?




From: Demian Katz [mailto:demian.katz@villanova.edu]
Sent: Monday, December 03, 2012 1:04 PM
To: Chanel Wheeler; vufind-tech (vufind-tech@lists.sourceforge.net)
Subject: RE: VuFind 2 module creation


VuFind 1 makes it very easy to just dive in and start editing things, but this sometimes makes merging in future upgrades more difficult.  The purpose of the VuFind 2 add-on module system is to allow you to isolate your customizations from the VuFind core code, which should make long-term maintenance easier.  This adds some up-front overhead in exchange for long-term benefits.  It should also be fairly easy once you know where all the pieces go, though obviously there’s a learning curve to reach that point (and it’s a bumpy learning curve, what with the software still being in active development and things periodically shifting around).


However, keep in mind that all of the VuFind 2 module/local directory stuff is optional.  I certainly recommend using it, but nothing is stopping you from hacking the core code directly, just like you did with VuFind 1.


In the interest of learning the new code and becoming more comfortable, perhaps a useful approach would be to implement some changes directly to get a feel for how things fit together, and then reimplement them in a local module once you are more comfortable with the system.  I suspect that the reason you’re finding this difficult is that you are essentially trying to learn so many independent things at the same time (core VuFind architecture, and the extension system… not to mention all the other things you mention).  I’m happy to help break this down into smaller pieces, especially since any conversations we have now can probably help contribute to future documentation that makes this easier for everyone.


Perhaps if you could provide an example of something specific you are interested in doing with VuFind, I can provide some pointers about how to ease into the code.  If I can find the time, it might even make sense for me to write a detailed blog post with a working example…  but even if I can’t carve that out of my schedule right away, we can start this iteratively.


- Demian


From: Chanel Wheeler [mailto:Chanel.Wheeler@yavapai.us]
Sent: Monday, December 03, 2012 2:47 PM
To: vufind-tech (vufind-tech@lists.sourceforge.net)
Subject: [VuFind-Tech] VuFind 2 module creation


I’m simultaneously trying to absorb object orientation (been functional since the 80s), MVC, ZF2, and VuFind 2. (I hate to say it but VuFind 2 is exponentially more difficult to customize than VuFind 1 was.)  I really need a VuFind 2 Hello World module about now. Are there any VuFind 2 add-on modules out there that I can install to see an applied example?





Chanel Wheeler

Library Network Programmer/Analyst

Yavapai Library Network

1120 Commerce Dr.

Prescott, AZ  86305


Phone: (928) 442-5741


Open a help desk ticket