5. Hypothesis 2: Object Oriented Design
• (Complex) Digital Objects
• Unique identifiers
• Key-Metadata + 1 or more data streams
• Metadata schemes invariant over repositories
• Specialized data types + service bindings on
these types
• Fragmented input
• Incomplete
• Metadata, Files, Metadata + Files
• Many schemas
• Simple data types (String, Array, Map) many
native functions on these types
6. Hypothesis 3: The Resource is the Message
Kahn-Wilensky Web
Handle
I search a
paper about
OAI
Repository DC SRU
OAI Service
Repository DC SRU
Provider
OAI
Repository DC SRU
7. Hypothesis 3: The Researcher is the Message
Social Web
DNS
Dr Müller
Google
(DC)
Repository HTML
HTTP
Researcher
Homepage
10. Import
Import from many sources
Atom CSV DBI
JSON
MARC OAI SRU importer
$obj->each({})
$obj->first()
$obj->rest()
$obj->select({})
$obj->any({})
$obj->many({})
12. Store
Schemaless storage
Elastic Solr
Search
JSON
store
Mongo DBI
DB
$obj->add({})
$obj->search()
record.title:“rabbit” and record.author.firstName:“peter”
record.title any “rabbit” and record.author.firstName any “peter”
13. Favorite Epigram
"It is better to have 100 functions operate on one data structure
than to have 10 functions operate on 10 data structures."
Alan J. Perlis
$hash
$hash->{title}->[1]
JSON keys %$hash
exists $hash->{isbn}
$it->count
JSON
JSON $it->each( sub { ... } )
JSON
JSON
JSON $it->any( sub { .. } )
$it->map( sub { ... } )
$it->reduce( sub { ... } )
14. MVC Dancer
app/
|--bin/
|--public/ hello.tt
| |-- images/ <html>
| |-- css/ <body>
| -- javascript/ <h1>[% txt %]</ht>
|--views/ [% FOREACH obj IN res %]
| -- hello.tt <p>[% obj.title %]</p>
--environments/ [% END %]
</body>
</html>
get ‘/hello’ => sub {
my $res = store->bag
->search(query => ...)
->reduce( ... );
template ‘hello’ , { res => $res, txt => “Hello, World!”;
};