# A framework for observation and experiment with JavaScript

For my MSc dissertation I wrote a maintainer for data dependencies in JavaScript. Along with this I wrote a translator for EDEN syntax to JavaScript that allows for interacting with the maintainer through EDEN:

    func join {
        para list, joiner;
        auto i, joined;

        if ($# < 2) {
            joiner = " ";
        }

        if (list# > 0) {
          joined = list[1];
          for (i = 2; i <= list#; ++i) {
            joined = joined // joiner // list[i];
          }
          return joined;
        }
    }

    lastModified = "2nd October, 2011";

    names = ["Tim", "Monks"];
    author is join(names);

## Why JavaScript?

- HTML and JavaScript applications are accessible to anyone with a modern browser, so hopefully this can make it easier to demonstrate EM principles to others.
- TkEden and Cadence are potentially more fine tuned to this sort of application, however I think that this system might be more accessible to the students at Warwick from a development point of view. This stems from:
  - The small size of this system code wise.
  - The ease of deployment for JavaScript applications.
  - Rich set of browser APIs for visualisation.

## What's this page meant for

- Collate examples of using JsEden.
- Inspire students to have a go!

## Some examples

- An example with a clock
- An example of using a <canvas> tag for line drawing
- A template for creating pages like this

## Some thoughts on where it's going

A major thing that needs to be done is getting more functionality for creating interesting visualisations/interfaces set up for you. I'm working on this myself from time to time, but would be happy to support a few students who were interested in the platform for whatever reason if they were willing to accept the occasional bug/difficulty! I think that having more of this sort of functionality "out of the box" will be important for making it usable by non-expert programmers.

I think there are a lot of other interesting avenues that I can't be bothered to write about right now.

## Where's the code?

Currently hosted in a big messy git repository, really needs sorting out - e.g. seperating 3rd party libraries. For now you can get a snapshot of this big mess at my gitweb instance. If you have git installed you can run:

`git clone http://trmonks.me.uk/git/js-dependency.git`

## A few other resources

A prototype of what a version of an environment for using EDEN might look like in the browser

The page used for developing the EDEN to JavaScript translator

A page which uses formulas in HTML markup and an underlying model