Siren

Features

  • Actions show available behaviors an entity exposes.
  • Siren also has a concept of "class." The class attribute may contain multiple descriptors of the current representation. I've avoided calling these "type descriptors." They act more like "mixin descriptors" (i.e., if an entity is of a certain class, it may have properties, actions, sub-entities, or links associated with it). When layering a UI on top of Siren, I've also used the class attribute to act as a view router (e.g., When a representation comes back with an "error" class, route to the error view or when a representation contains a "home" class, route to the home view... or some combination... When a representation has both the "home" and "error" classes, display the error alongside the home view.)

Comparisons

Siren vs Hydra

  • "Before Hydra, Siren was perceived as being the most complex JSON-based hypermedia format. And now, I think, Hydra has taken over that label."

References


Backlinks