1 / 16

VuFind 2.0 an introduction

VuFind 2.0 an introduction. Demian Katz VuFind Developer demian.katz@villanova.edu. Overview. Why VuFind 2.0? PHP 5.3 concepts Zend Framework 2 concepts VuFind 2.0 concepts What’s next?. Why VuFind 2.0?. Move to a standard framework Clean up code flow/organization

eman
Download Presentation

VuFind 2.0 an introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VuFind 2.0an introduction Demian Katz VuFind Developer demian.katz@villanova.edu

  2. Overview • Why VuFind 2.0? • PHP 5.3 concepts • Zend Framework 2 concepts • VuFind 2.0 concepts • What’s next?

  3. Why VuFind 2.0? • Move to a standard framework • Clean up code flow/organization • Improve extensibility • Take advantage of PHP improvements • Move away from outdated technologies (PEAR, Smarty, Subversion, etc.) • Bundle all dependencies

  4. PHP 5.3: Namespaces • Namespaces prevent collisions; VuFind 1.x suffered from at least one (SolrUtils). • Key: Learn to love the backslash • namespace VuFind\Config; • use VuFind\Config\Reader as ConfigReader;

  5. PHP 5.3: Closures • A useful tool for functional programming. • The old, procedural way to transform an array: $newArray = array(); foreach ($oldArray as $key => $value) { $newArray[$key] = doStuffTo($value); } $oldArray = $newArray;

  6. PHP 5.3: Closures • The new, functional way to transform an array: $callback = function($i) { return doStuffTo($i); } $array = array_map($callback, $array);

  7. Dependency Injection • A simple concept that is often handled in complex ways (“DI containers”). • When one class depends on another, use constructors or setters to “inject” dependencies. • Replaces use of statics/globals. • Makes code more modular and relationships more explicit. • Often makes testing easier.

  8. Zend Framework 2 Concepts • Module system • Event system • Routing system • Controller classes • Service managers • Database abstraction layer • PHP-based template rendering • Watch the webinars! • http://www.zend.com/en/resources/webinars/framework

  9. VuFind 2.0: Data Model • Search classes produce record driver objects. • Every record is represented by a record driver regardless of source. • VuFind uses “duck typing” to extract appropriate data from record drivers.

  10. VuFind 2.0: Controllers • Old way: one class per action in web/services • New way: one class per controller • Advantage: easier to visualize flow • Advantage: easier to inherit related functionality (AbstractRecord, AbstractSearch)

  11. VuFind 2.0: Templates • Old way: Smarty templates • {$myVariable|escape:html} • {if $this}that{/if} • Custom functionality through Smarty plugins • New way: PHP templates • <?$this->escapeHtml($myVariable);?> • <? if ($this): ?>that<?endif; ?> • Custom functionality through view helpers

  12. VuFind 2.0: Themes • Two officially supported themes: • blueprint: “standard” theme using jQuery and Blueprint CSS library. • jquerymobile: “mobile” theme using jQueryMobile library. • Old YUI/iWebKit-based themes (classic/default/mobile) will not be included.

  13. VuFind 2.0: Extension Points • Local configuration directory • One VuFind install, many configurations • Theme system • More powerful inheritance • Plugin system • Based on ZF2 service locator system • Module system • Override almost anything without touching core code

  14. VuFind 2.0: Install Process • Install dependencies (PHP/Apache/Java/MySQL) • Download and unpack VuFind • php install.php • Link generated Apache configuration • http://localhost/vufind/Install (or http://localhost/vufind/Upgrade)

  15. VuFind 2.0: Source Control and Continuous Integration • Git instead of Subversion • Fork to your heart’s content • Jenkins for continuous integration • Runs tests, checks style, builds API docs • Sends alerts to vufind-admins mailing list • Automatically triggered by Git commits • PHPUnit for testing • Please help us improve test coverage!

  16. What’s Next? • More architectural cleanup • Better Solr connector, better abstract search model, better-defined HTTP/cache/logging services (David Maus) • More intelligent AJAX handling • New features • Better consortial support (ILS multi-driver) • Hierarchical collections • Multi-column search (i.e. Solr/Summon) • Web search

More Related