Skip to content

Libraries used by Valkyrie

hackmastera edited this page Feb 28, 2018 · 5 revisions

DRAFT; awaiting code review

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 [http://dry-rb.org/](dry-rb community). They underlie Valyrie's property typing functionality.

http://dry-rb.org/gems/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.

http://dry-rb.org/gems/dry-struct/ provides the ability to associate types to attributes; it is the superclass for Valkyrie::Resource and Valkyrie::StorageAdapter::File.

Reform

http://trailblazer.to/gems/reform/ underlies Valyrie's change sets, providing storage-agnostic validations and change tracking.

RDF

https://github.com/ruby-rdf/rdf allows Valkyrie to read / write data from / to semantic web backends (e.g. fedora).