Skip to content

Libraries used by Valkyrie

hackmastera edited this page Feb 28, 2018 · 5 revisions

Draper

Draper is a decorator library. Draper decorators wrap models in a class to add presentation logic in an encapsulated way.

Valkyrie resources include Draper::Decoratable, which gives them a decorate method.

Dry::Types, Dry::Struct

These are utility libraries from the dry-rb community. They underlie Valyrie's property typing functionality.

Dry::Types powers Valkyrie's data mapping functionality by defining storage-agnostic types which can be cast to storage-specific types on a per-adapter basis.

Dry::Struct provides the ability to associate types to attributes; it is the superclass for Valkyrie::Resource and Valkyrie::StorageAdapter::File.

Reform

Reform underlies Valkyrie's change sets, providing storage-agnostic validations and change tracking.

RDF

Ruby-rdf allows Valkyrie to read / write data from / to semantic web backends (e.g. fedora).