====== Data Model / Key Concepts ====== ===== Core Classes ===== Most of VuFind®'s functionality is built around two important families of classes. ==== Search Classes ==== VuFind® is all about search, and a lot of the work of searching is similar no matter what data you are searching through. For this reason, VuFind® contains classes that deal with common search tasks: gathering user preferences (query, facets, etc.), dealing with paging, etc. Every search performed by VuFind® involves three key classes: * The search options class, which loads static options from configuration files. This determines what types of searches are legal. * The search parameters class, which represents the settings for the current search -- query, page size, facet list, etc. This class has routines for processing user input, or all parameters can be set individually by code. A search options object is used for validation. * The search results class, which actually performs searches with the help of a search parameters object and turns them into an array of record drivers (described below). Base classes are provided that implement common functionality for all three of these areas. To search different data sources (Solr index, WorldCat API, etc., etc.), subclasses with implementation-specific details for interacting with various low-level [[development:architecture:search_service|search services]] are provided. === Record Loader === While the search classes are used for retrieving sets of records based on search criteria, when retrieving one or more known records using their unique identifiers, a stand-alone \VuFind\Record\Loader class is used, which interfaces with the same [[development:architecture:search_service|search services]] as the search classes. ==== Record Drivers ==== Regardless of where it comes from, every record in VuFind® is represented by a [[development:plugins:record_drivers|record driver object]]. Like the search objects, all record drivers inherit from a common base class that implements basic record-related behavior (saving to favorites, adding tags, etc.). However, subclasses have a great deal of flexibility in how they represent records. Each record driver gets its own set of templates for rendering within the VuFind® interface, so displays can be completely customized. However, by implementing a [[development:architecture:record_driver_method_master_list|standard set of get methods]] for retrieving common sorts of data elements (title, author, subject, etc.) it is possible to share templates between similar record drivers for less complex code and a more consistent user experience.