Skip to content

The Routing System

The software is designed to be url driven; that is, valid urls will automatically load appropriate module data, filters, collections, and items.

Routing is done in the front end by Vue Router.

The process starts with the Vue Router middleware handleRouteChange() and follows these steps:

  • planTransition() a simple state machine that observes the "from" and "to" handle objects and determines the validity of the transition and, if valid, determines the actions needed to complete it and their order (e.g. load trio, load collection)

  • prepareForNewRoute() run the list of required actions received from planTransition(). Those typically include

    • parsing and validation of url parameters
    • sending request(s) to the server
    • waiting for response(s)
    • error handling and re-routing or
    • modifying and saving response data locally into appropiate stores