|
|
# Introduction
|
|
|
## Purpose
|
|
|
Catalinker is the main tool for creating and maintaining bibliographic catalogue data. It is a single-page app running in the browser, storing data mainly to RDF triple store, but also in Koha.
|
|
|
## History
|
|
|
Catalinker started as a simple dynamic one page app that could render all input fields relevant to a particular resource type. i.e Work, Publication or Person derived from the evolving ontology, but needs for a more structured workflow demanded a solution that could handle more than one resource at a time, variations of resource types and complex object structures. Catalinker therefore has two faces; the main one and an old version, kept around mostly for testing purposes.
|
|
|
## Extensibility
|
|
|
Catlinker is designed to be as flexible as possible in terms of supported ontology and workflow.
|
|
|
|
|
|
# Architecture
|
|
|
The application consists of a Node.js back end serving a javascript/Ractive.js front end.
|
|
|
## Node backend
|
|
|
The node.js back end serves static files; html, javascript, images etc, in addition to serving the main configuration, caching and proxying to services container.
|
|
|
### Browserify bundling
|
|
|
All node mudules and the main javascript source files are bundled with browserify on demand. Therefore, there is noe build stage necessary other than npm install.
|
|
|
### Caching
|
|
|
The node back end enforces aggressive caching, to minimize loading time.
|
|
|
### Proxying service calls
|
|
|
All actual data processing; POST, PATCH etc are forwarded to the services container. GETs are cached, but invalidated by POSTsand PATCHes to same resources.
|
|
|
## Application structure
|
|
|
|
|
|
### Ractive.js
|
|
|
Catalinker uses Ractive.js web framework, developed by the Guardian newspaper. Its main purpose is two-way binding between input fields and javascript object structures, suitable for rendering a complex user interface backed by an application state.
|
|
|
### main.js
|
|
|
Most of the functionality in Catalinker is in main.js. main.has grown from the old catalinker mentioned earlier to a quite large chunk of javascript code. Some parts and functions are more complex than others, and cater for more than one concern. No doubt should the file be divided into smaller modules and perhaps utilise ractives component support, but because of the incremental nature of the development process followed, and perhaps lazinesss, it has not come to this yet. However, most functions are kept small and with descriptive names, and the structure is the same as from the beginning, only with more features added.
|
|
|
### workflow_config.js
|
|
|
### State model
|
|
|
### Partials
|
... | ... | |