Question

I have a ton of authentic NetLogo files, prepared for courses and demos and wish to publish them on the web,---at least make them accessible. Instead of saving them manually one-by-one in an applet, I would like to export these NetLogo files in batch (as applets, or otherwise). Would that be possible?

There is a related question which is more specific. The present question is more general and asks for possibly broader solutions, i.e., solutions not necessarily based on Java applets.

Was it helpful?

Solution

Applet option

All the applet saver in NetLogo does is fill in a few things in an HTML template: the name of the model, the size (see my answer to your other question for details on that), and the name of any extra JARs if the model uses any extensions that use additional JARs. You could look at the code for the official applet saver at https://github.com/NetLogo/NetLogo/blob/5.0.x/src/main/org/nlogo/app/AppletSaver.scala , and either do something similar yourself, or actually invoke it yourself from Java (or your favorite JVM language). The unit tests for AppletSaver show some examples of how the code can be invoked outside of the NetLogo GUI: https://github.com/NetLogo/NetLogo/blob/5.0.x/src/test/org/nlogo/app/AppletSaverTests.scala

As an existence proof that rolling your own fully-automated version of this is possible, we did it once ourselves on the NetLogo site for serving applets of the Models Library models, and Reuven Lerner did it himself for the applets on the NetLogo Modeling Commons at http://modelingcommons.org/ .

Non-applet based options

We are working very hard on a JavaScript-and-HTML5 based replacement for the NetLogo applet. It's code-named Tortoise. But it isn't really ready yet (as of April 2014). For further details on this, see https://github.com/NetLogo/NetLogo/wiki/Applets and https://github.com/NetLogo/NetLogo/wiki/Tortoise

I wouldn't recommend sinking too much effort into applets since (as described at the Applets link) they are essentially dead technology. What little life is arguably still left in them is ebbing rapidly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top