As of this morning, I have completed the second phase of the record driver refactoring.  The bulk of record displays are now drawn from the Solr index, not the MARC record.  The MARC data is only used to fill in extra details that are not available in the index.  As before, you can see my code and try it out by grabbing this branch of the SVN repository:


Note that if you install this code and use an existing Solr index, all records will be treated as index-only data.  You will have to reindex in order for things to get flagged as MARC records in order to allow the MARC-based processing to kick in.  If you want to check out the differences between using the Index-based or MARC-based record driver, you can always cheat the system by hard-coding "$driver='MarcRecord';" or "$driver='IndexRecord';"  around line 45 of web/RecordDrivers/Factory.php.


I would greatly appreciate any feedback on this new code at this point -- I want to merge it into the trunk as soon as possible to reduce the likelihood of complicated merges with other feature branches, but I don't want to jump the gun if there are problems I haven't discovered in my own testing.  Extra eyes on the code would be great!


Please let me know if you have comments or questions, and thanks for your help!


- Demian


From: Demian Katz
Sent: Thursday, January 21, 2010 3:51 PM
Subject: Record driver refactoring: phase I complete




For the past few days, I've been working on implementing record drivers, as discussed on this wiki page:




I have created a branch here for the changes:




As of this afternoon, the first phase of the work is finished.  All MARC-specific functionality has been moved into the MARC record driver and its related template files.


The next step, which I will begin tomorrow, is to create index-based alternatives to all the MARC pages so that reasonable default functionality exists even when a record driver is unavailable for an entry found in the Solr index.  Some of this is already done, but there are currently a lot of placeholders that need to be filled in with more complete information.


I'd recommend waiting until phase 2 is complete before actually installing this and testing it -- I would prefer to get feedback against the finished product rather than this intermediate version.  However, I figured this progress was worth announcing, since the basic architecture of the record drivers is now in place.  Feel free to take a look and let me know if you have questions or comments.  I'll post another announcement when the second half of the work is done.


- Demian