App
App
Curator
Curator
Takes a default response and transforms it over a series of functions.
Finds/Searches/Builds into the response.collection
Validates response.collection
Authorizes response.collection
Creates/Updates/Deletes into the database
Publishes messages to rabbitmq
Decorates response.collection
Etc...
Mapper
Mapper
Maps database row into a ruby object (item)
Adds find/search/create/update/delete to the curator
"lazy_loads" calculate/derived data into the ruby objects loaded up in response.collection
Serializer
Serializer
Converts response into Collection+JSON which includes a base collection and optionally a list of items.
Decorator
Decorator
Object-oriented layer of presentation logic like
date formats
money formats
full name
Authorizer
Authorizer
Determines which items in a collection the current user can read or write.
Builder
Builder
Converts params into a template for creating and updating items.