Easy Java Simulations: a software tool to create scientific simulations in Java

https://doi.org/10.1016/S0010-4655(03)00440-5Get rights and content

Abstract

We introduce Easy Java Simulations, Ejs, a tool created by science teachers to help teach and learn science. Ejs allows users to create simulations using their knowledge of the scientific model. The author needs to supply a small amount of code for the model; the tool provides a graphical drag-and-drop interface to build the program. The resulting Ejs generated program is an independent, high quality Java application or applet ready to be published on a Web server. Ejs can serve as an effective teaching and learning tool if used in an appropriate pedagogical setting; for instance, to help students create their own simulations in order to express their conceptions on how a given scientific process works.

The Ejs program and documentation can be freely downloaded from the site http://fem.um.es/Ejs.

Introduction

Simulations are playing an increasingly important role in the way we teach or do science. This is specially true in education, where computers are being used more and more as a way to make lectures more attractive to students and to help achieve a deeper understanding of the subject being taught. However, it cannot be said that computer simulations are used by most teachers. In many cases, this is due to the fact that teachers are reluctant to use a technology they do not fully understand or control. In many others, that they cannot find a product that completely meets their educational needs.

A good solution to both problems is to help teachers create their own simulations. We have found that, by creating a simulation, many teachers get a new perspective of the phenomenon they are trying to explain, which almost always increases their enthusiasm for the use of this technology with their students. An alternative approach, and a very promising one, is to let students create their own simulations, thus engaging in what is called by educational researchers constructive modeling [1]. This has the advantage of getting students to do science in an exploratory and constructive way, achieving many of the recommended best-practices in the classroom [2].

Creating a simulation by oneself requires extra effort. The starting point, and this is the important part, is a full understanding of the phenomenon being simulated. From this, some (sometimes a lot of!) technicalities are needed in order to express the behavior of the phenomenon in computer form.

This paper describes Easy Java Simulations (Ejs for short), a software tool that addresses this problem. Ejs has been specifically designed to teach how to create scientific simulations in Java, in a quick and simple way. Its audience is composed of science students, teachers, and researchers who have a basic knowledge of programming, but who cannot afford the big investment of time needed to create a complete graphical simulation. They may be able to describe an algorithm in terms of a computer language, but still need an extra effort to create a sophisticated, interactive graphical user interface, in the style of simulations and software programs one can find nowadays in the Internet.

With this situation in mind, Ejs helps someone who wants to create a simulation to concentrate most of his/her time in writing and refining the algorithms of the underlying scientific model (which is his/her real expertise) and dedicate the minimum possible amount of time to the programming. And by doing so, they can still obtain an independent, high performance, Internet-aware, final product. The program provides simplified input forms that correspond to the common structure found in most simulations, so that authors need to provide the Java code relevant to the model (for which they have full responsibility) and design the user interface for the simulation, using high-level components. Ejs then generates all the code needed for the complete simulation, compiles it, and creates the extra material needed, such as an html page, to publish the simulation on the Internet.

Another goal of Ejs is to show teachers how to structure a simulation so that it can be correctly converted to a computer program. Ejs provides extensive scaffolding for this purpose.

The choice of Java as development language is justified in terms of its wide acceptance by the scientific community, and the fact that it is supported on several software platforms. This implies that Ejs, and the simulations created using it, can be used as independent programs under different operating systems, or be distributed via the Internet and run within html pages by most popular web browsers. (html stands for the Hyper Text Markup Language.)

Section snippets

Structure of a simulation

Easy Java Simulations helps create discrete computer simulations. A discrete computer simulation, or simply a computer simulation, is a computer program that tries to reproduce, for pedagogical or scientific purposes, a natural phenomenon through the visualization of the different states that it can have. Each of these states is described by a set of variables that change in time due to the iteration of a given algorithm.

Ejs provides a simplified implementation of the Model-Control-View design

Including narrative

In order to encourage authors to provide instructions and explanatory narrative as an integral part of their simulations, Ejs provides a special-purpose interface that helps create a collection of html pages in a WYSIWYG (what you see is what you get) editor. The author can then create as many html pages as (s)he wants (similar to the one shown in Fig. 2) with the necessary information and/or instructions for the students as (s)he finds necessary for the pedagogical objectives of the simulation.

Using the simulation in a pedagogical setting

Simulations created with Ejs can be run in two forms. The first one is running the generated simulation as an applet using any of the most popular Web browsers. Simulations created with Ejs are, once generated, independent of it. A Java applet is a special form of application that is designed to be run within a Web browser. The browser loads a file, called an html page, that includes a special tag (or instruction) which loads the applet. The browser can then run the applet embedded into the

Acknowledgements

I would like to thank Wolfgang Christian for introducing me to the Open Source Physics project, on which Ejs is based. I would also like to thank Fu-Kwun Hwang for continuous and fruitful discussions on the use of Ejs as well as for his contributions to the latest code. Part of this work is supported by Fundación Séneca, the Center for Coordination of Research of the Region of Murcia, Spain.

References (8)

  • F. Esquembre

    Computers in physics education

    Comput. Phys. Comm.

    (2002)
  • J. Nersessian

    Should physicists preach what they practice?

    Sci. Educ.

    (1995)
  • L.M. Lederman, American renaissance in science education, FERMILAB-TM-2051,...
  • M. Euler et al.

    Physics learning and the computer: A review, with a taste of meta-analysis

There are more references available in the full text version of this article.

Cited by (0)

View full text