Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Marseille hackfest 2016

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

Workshop Notes

React - Kyle

Kyle demonstrated Bug 17297 as an example of using React within Koha.

The discussion involved 3 main components:

1 - A build tool

Koha should use a modern build tool. Our discussion involved Webpack and Gulp. Kyle suggests starting with Webpack, as it does what we need with less configuration. If at some point we find we need to do something Webpack cannot handle, it will be trivial to switch to Gulp and have Gulp run the Webpack within itself using gulp-webpack.

Owen has volunteered to work on switching to webpack for our current build process, which is limited to compiling LESS to CSS at the moment.

2 - REST API

The use of React is strongly tied with the advancement of the REST API. They are somewhat dependent on each other. The REST API allows us to wrote Ajax React widgets while the React widgets will encourage the advancement of the REST API.

3 - React Itself

Kyle demonstrated the basics of creating and using a widget with React. The response was generally positive with no negative feedback. The discussion ended with a focus on when and where to use React in Koha. Paul suggested we make a list of the top 10 places we would like to implement React widgets in Koha.

Suggestions for Widgets

Topics for further discussion

  • Accessibility - how accessible are pages build with React?

REST API - Tomás

Current state

Patches on Bug 17428 : REST API : CRUD endpoint for cities (no business logic)

What do we want ? Make things easier for developers so REST API grows this year. Make automated skeleton generation

Mojolicious framework for controller. With Swagger for the end point.

Introduces try/catch blocks for use of exceptions.

Note that REST::V1 uses the minified swagger json file.

How to

Add to paths.json

city.json

REST methods.

The controller module is explicitly secifyed with x-mojo-controller. operationId is used to specify the method of the control to call.

The permissions needed are specified in x-koha-authorization.

definitions file

Tests

HttpRequester to test REST calls. Note that you need to add the CGISESSID cookie you will find in Firefox or Chrome.

Also Chrome module PostMan.

Yeoman for generating (kind of templates).

Discussion

Maybe not minifing the swagger json

SwaggerUI

Less business code on the API controllers, move exceptions in Koha::Objects. Example VirtualShelf. throws Koha::Exceptions. See Koha::Exceptions::Object.

Continue moving from C4:: to Koha:: namespace.

Use the API in OPAC instead of "svc". Little by little.

ElasticSearch

Presentation by Nick.

ElasticSearch presentation

  • Switching from Zebra to Elastic needs changing a syspref
  • Results are expected to be the same as Zebra's
  • Jonathan added a mapping definition page, pretty cool one. There's a mappings YAML file that is only used for populating the DB on install. Then all goes to the DB.
  • Reindexing provides a nice output if required, which is great for debugging.
  • Adding new facets is really simple (wiki pointer needed)
  • Mappings for UNIMARC authorities need work (Fridolin volunteered to work on that, along with a librarian <<PASTE NAME>>).

LOD/RDF in Koha

  • 100 hours sponsored by Stockholm University Library (SUB) and the National Library of Sweden
  • Much smaller scope than the Oslo Public Library project
    • The goal is not to replace MARC (yet)
    • The goal is to enhance Koha with semantic data, to get people interested in it
    • Minimum viable product
    • Experimental feature
  • Will use data from Libris, the Swedish national catalogue
  • Libris can export both MARC and RDF, so MARC2RDF will not be a part of the project
    • But Chris Cormack has a proof of concept for this
  • MARC and RDF will be harvested via OAI-PMH
  • MARC data will be added to Koha, RDF to a triplestore (Fuseki?)
  • Use the data in the triplestore to enhance browsing (search is not touched, for now)
  • Interface in Koha to build
    • SPARQL queries to retrieve data from the triplestore
    • Templates to display the data
  • Interface in Koha to
    • Connect to external sources (Wikidata, Musicbrainz et al)
    • Enrich the data in the triplestore with local knowledge