APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

EJS Modeling

Overview   -   EJS Overview   -   Installing EJS   -   Running Models   -   Packaging   -   References   -   Find Models

EJS Overview

EJS Overview Image

Ejs makes it easy to create a user interface by dragging view elements from an extensive collection.

Easy Java Simulations (EJS) is a Java program that enables both programmers and novices to quickly and easily prototype, test, and distribute packages of Java simulations. It can be downloaded from the Ejs website and installed (unzipped) into a directory of their choice. Executing the EjsConsole.jar file in the installation directory creates an Ejs workspace.

Ejs is well suited for education because it is simple to use and combines authoring with powerful modeling tools. Its dynamic and highly interactive user interface greatly reduces the amount of programming required to implement an idea. Even experienced programmers find Ejs is useful, because it is faster and easier to:

  • Develop a prototype of an application in order to test an idea or algorithm.
  • Create user interfaces without programming.
  • Create models whose structure and algorithms non-programmers can inspect and understand.
  • Encourage students or colleagues (who may be new to Java) to create their own simulations.
  • Quickly prepare simulations to be distributed as applets or as stand alone programs.
  • Create a package containing multiple programs and the associated curricular material.

EJS Design Pattern

EJS Overview Image

The EJS ODE editor showing the differential equation for the two-body problem.

Inspired by the successful MVC (Model-View-Control) design pattern, Easy Java Simulations structures simulations in three clearly differentiated, but related parts: the Description, the Model, and the View, and provides specialized editors for each of them. The model's html-based documentation is accessed by selecting Description. The physics is accessed by selecting Model which provides access to the data and the methods (Java code) by which the model can change. A plot is a visual representation of data and is an example of a View. Because it is possible to have multiple views of the same data and because the model and its views are controlled by buttons and other user interface components, EJS provides a graphical drag-and-drop editor for these objects which eliminates much coding.


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book