Rewrite DerbyJS example in latest version of the framework.

Feedback welcome, but here is an initial attempt at updating the DerbyJS example.