Code4Lib 2014: Day 2 Afternoon

Afternoon presentations on Day 2 afternoon of Code4Lib 2014.

Bulding for others (and ourselves): the Avalon Media System Michael B. Klein and Julie Rudder

Avalon allows you to injest and provide access to video and audio.

Community Feedback is Important!

Added LTI (Learning Tools Interoperability)

Sorry, you’ll have to look at (hopefully posted) notes/slides. Someone was getting me to help them with something and I didn’t get the write notes.

Sustaining your Open Source project through Training – Bess Sadler (and Mark Bussey)

Training is about sustainability and also vital to our mission as libraries.

Allows new people to join the community, regardless of whether it’s open source. It’s a starting place for developers, but also need it for other people e.g. data managers

Training for Teams

e.g. Hydra Camp taught by data curation experts
* crucial for new users, but also sustaining because need regular skills updating
* skills upgrading frequently outside of work hours

Women doing Open Source Development

Tech services women frequently have the kind of right mindset, but do not have the time to upgrade their skills outside of work.

> We’ve got a pipeline problem
RailsBridge is one example. Great learning tool, intentionally mimicked when doing Hydra tutorial.

We started the code4lib in order to learn and teach each other. We provide structured workshops, but the more important part is the collaborative community we’ve developed where we are free to ask questions and admit that we don’t know something.

Behold Fedora 4: The Incredible Shrinking Repository! – Esmé Cowles


UCSD doesn’t use Fedora. Has own DAMS repository with partial clone of Fedora 3 API.

It’s the plumbing in our system. Need to open the pipes to see that things are doing well. Everyone to contribute, not just coders.

A reusable application to enable self deposit of complex objects into a digital preservation environment – Jill Sexton, Mike Daines, and Greg Jansen

“The Forms App”

The Problem

Often use web forms to initiate user content submissions, but rarely suites the needs of what we’re actually trying to ingest.

We can do better by making it more specific and multiple objects.

Collecting multipart works as much as 20 pieces including images, videos, audio, PDF documents.

Each piece need description. Need creators to upload and describe their own work.

The collection owner should help design submission form, but balance customization and practical application.


App and lets non-programmers develop web forms and map lain text labels to MODS elements. App presents custom forms to users.

All students successfully submitted their theses each included with supporting files, all with metadata.

How it Works

Student/Collection Owners deposit into App –SWORD–> Ingest Service

Turn user input into SIP. Form definition tells what fields want to display. Form fields are linked with metadata. The package is serialized.

Metadata Templates depending on the task (e.g. add author).


Breakout Sessions

[group of owls looking up]

Organic Free-Range API Development – Making Web Services That You Will Actually Want to Consume – Steve Meyer and Karen Coombs

We build a lot of APIs. Talking about APIs as HTTP requests somewhere.

Let people innovate from your own data, but APIs used to mask dirty laundry.

Your clients will judge you on well you model your data.

Standards should be used for when community can easily understand what you’re doing. Standard is made to work with every ILS.

> data is the API

Actually describing REST. HTTP describes everything that you need.

A full data management space over HTTP can be done much like a SQL database.

You can use any old HTTP client library. All that’s left with is, what message are you passing back and worth?

> What are you trying to say?

Need a usable implementation of a standard or original API.

Data Modelling: Decomposing a catalogue into its parts. Want to show a proper model instead of showing an internal view.

Authentication & Security: Need to decide how much to allow through API. You want to use different API keys depending on what information to provide e.g. mobile app, staff client

Know your limits, so start small and grow API over time.

Towards Pasta Code Nirvana: Using JavaScript MVC to Fill Your Programming Ravioli – Bret Davidson

Slides and list of frameworks

Spaghetti code = loosely formatted, difficult to maintain, little organization; difficult to share, understand, etc.

Encapsulated layers of code = can also emerge as anti-pattern. Might be made of spaghetti.

Idealize in idea of ravioli = nice modules that we can stuff full of whatever filling we want. Just be sure not to take it too far.

Module, Reusable, Testable = ideal

> JS is everywhere, fast(er), the lingua franca.

What is JS MV*? MVC – MVP – MVVM

Can change things programmatically.

  • Abstract DOM interaction
  • encourages code reuse
  • etc.

When to avoid?
* need to support no-JS users
* app is document driven (Blog)
* older devices/browsers


Angular: Advantages
* community
* loose coupling (between HTML and JS)
* cognitive load is greatly reduced

> Help to solve problems so we can provide good services to our users.

PhantomJS+Selenium: Easy Automated Testing of AJAX-y UIs – Martin Haye and Mark Redar

JavaScript validation – how do I know the red boxes actually show up because it’s never sent to server?

SeleniumHQ to get started, set it in record mode. Can export as Ruby or Python IDE script. Can drive test instances from script.

When testing, make it fail first.

Running it in the Cloud

Setting up Selenium server is a big pain.

Sauce Labs provides cross-browser testing and Sauce tunnel to allow a connection to your machine even if your code is localhost.

Code and resources

Queue Programming – how using job queues can make the Library coding world a better place – Birkin James Diana

*abstract – layers
** broker
** producer
** consumer/worker
* concrete: RQ
** add work to queue
** start workers

Long running jobs can also be done by CRON, but blend of responsiveness and scalability.

Easy to make a queue, provide references, and will do it even if you have the queue set up somewhere else.

Queue allow to get workers. Specify queue to watch simply using references, and can specify where logging to.

Using python-rq on top of redis. Redis-py

RQ dashboard lists all the queue and view all the jobs in a queue including which ones has failed.

Use types:
* Solrizer – don’t need to touch Fedora objects
* streaming objects
* gallery ingestion
* worker daemons
* parallel-processing
* better failure-handling

* task focus
* fall forward
* tracking
** redis hash
** no worries about race/overwrite
* trigger-happy

That’s the end of day 2!

Author: Cynthia

Technologist, Librarian, Metadata and Technical Services expert, Educator, Mentor, Web Developer, UXer, Accessibility Advocate, Documentarian

Leave a Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: