Overview of Ejs

Ejs is a way to create Java simulations without needing to know Java.

The two main parts of EJS that we will use are the Model and the View.

  1. The Model - to set up the model properly we need to know some physics, and we need to have some basic computer programming skills. In the model we define the variables we need for the simulation, give these variables appropriate initial values, and then put in the equations that relate the variables and tell how they evolve as time goes by.

  2. The View - this is where we set up what the simulation will look like on the screen. This includes putting in objects and/or graphs that bring the physical model to life, as well as defining the various ways that a user can interact with the simulation. This is all done through a menu system in Ejs, dragging-and-dropping the objects we need into the View window and using text boxes provided by Ejs to define maximum and minimum values and to make the proper connections between the variables defined in the Model and the objects used in the View.

When you run a simulation it usually takes a few seconds for the simulation window(s) to appear on the screen. However, running the simulation also does two more things. It creates a web page with the simulation embedded in it, that you can post on the web, as well as a launcher page that is another way to run the simulation.