Switch from XSL to JavaScript approach for Admin UI

Description

http://opencast.3480289.n2.nabble.com/Switch-from-XSL-to-JavaScript-approach-for-templates-proposal-td5551084.html#a5551084

1. Rendering large amounts of data seems to be of poor performance
regarding speed
2. Developers reported having a hard time using XSL

An alternative seems to be a JavaScript based template engine like the
Trimpath Template Engine (JST) [1].

Regarding point of criticism 1. : I conducted a little experiment in which
the same dataset (of variable size) was rendered using our current
approach the JQuery.xslt plugin and the JST library [2]. The outcome was
that JST was nearly twice as fast as XSL.
Regarding point of criticism 2. : With JST the developer can use use
JavaScript expressions to generate the values filled into the template in
a way analogous to who things work in PHP. This should for the most people
be more convenient to use than XSLs resolution like mechanism.
Also the possibility to uses JS inside the templates offers more
flexibility when rendering the data. Easy example: endpoint returns
timestamp, but we want to have the value of Date.toLocaleString() shown in
the UI.

What has to be done in order to switch to JST:

  • On Client side the JST js library must be included and the XSL templates
    have to be rewritten as JST templates.

  • On Server side every endpoint that should be used together with JST must
    provied the data in JSON format. JST is not able to deal with XML.

Status

Assignee

Micah Sutton

Reporter

A

Criticality

None

Tags (folksonomy)

Components

Fix versions

Configure