We love Clojure:
- For its power and simplicity.
- For its amazing community.
- For its ever-growing ecosystem of projects like Prismatic Schema, which lets us use simple, declarative language to validate and transform all kinds of xAPI data in the browser and on the JVM.
xapi-schema provides a schema that describes an xAPI statement conforming with the latest (presently 1.0.3) version of the specification.
Errors can be thrown as exceptions, or returned as plain data that maintains the same shape as the data submitted for validation. The
errors->data function provides additional internationalization and localization of errors using tower.
Elegant validation and error processing, while useful, are just the tip of the iceberg... The Schema library provides facilities for type hinting, function argument validation, and even transformation/coercion of data. Our schemata can be used for any of these.
We made a small demo application to showcase xapi-schema's validation functionality. Try modifying the provided statement or pasting in your own data to see the validations in action. Source for the demo can be found here.
- LRS applications with thorough validation and rich error information
- Activity Provider applications that reliably return valid xAPI data
- Integrations with existing applications that leverage xapi-schema to transform data from any domain into xAPI statements
Now Available on Github
If you haven't tried Clojure before, we can't recommend it highly enough. Here are some good places to get started: