JavaScript HTML Scheme Java Racket CSS
Latest commit 92d6311 Oct 15, 2017 @schanzer schanzer v256: make default BGcolor of empty-scene white instead of transparen…
…t, and pad the interactions area with 2px of top space
Failed to load latest commit information.
.settings java1.7 Aug 17, 2017
bin update CM, and compress only the /lib directory. Speeds up building t… May 22, 2017
doc more writing May 1, 2013
externals translating build-console-and-editor to racket; keeping local copy of… Mar 26, 2012
sandbox Moving network proxy over to the sandbox Jul 28, 2010
src push Aug 17, 2017
testing adding color tests Dec 12, 2012
war-src/js v256: make default BGcolor of empty-scene white instead of transparen… Oct 15, 2017
war v256: make default BGcolor of empty-scene white instead of transparen… Oct 15, 2017
.classpath oops, forgot to add objectify to the classpath Aug 11, 2012
.gitignore update README + prepare to upload key/secret Aug 17, 2017
.gitmodules move CM to war-src, codemirror2-contrib to codemirror-contrib, and up… Jan 8, 2017
README update README + prepare to upload key/secret Aug 17, 2017
build-console-and-editor.rkt fix mkdir -p Aug 16, 2017
build.xml Upgrade appengine-sdk to version 1.9.34 Apr 14, 2016
generate-js-runtime.sh abstract new-compiled check for all compilers files, leading to signi… Jan 14, 2017
rebuild-and-upload.sh add reminder to check version in deploy script Jul 16, 2016
testErrors.rkt Minor things Jul 23, 2012
wescheme.properties remove outdated references to amazon Sep 12, 2016


WeScheme is an online programming environment based on DrRacket and
Scheme. Like DrRacket, it provides an interactive evaluator and an
interface for editing and running programs. In contrast to DrRacket,
WeScheme evaluates on the browser with JavaScript. Its main audience
is the Bootstrap curriculum, a middle-school curriculum for teaching
algebra through programming.

This repo contains the source code of the WeScheme server. The
official live server can be found at : http://www.wescheme.org/

The user-level documentation for the project is maintained in:


Build dependencies:

In order to build the server, the following tools are needed:
 - Python 2.X
 - Git
 - Java Development Kit
 - Racket
 - Apache Ant.

All these should be accessible from $PATH. The tools assume a
Unix-like environment to run shell commands, including 'unzip'. See
the section below, if you're building the project on a Windows

Note: Do not use python 3.X: the build tools are only working on python 2.X.

You will also need to make sure that the DEFAULT_ENCODING environment variable
on your system is set to "UTF-8". On some systems, the build will fail if
the appengine.xml settings differ from those of the environment.


Installing WeScheme for local development

1.  First, check out the WeScheme repository from Github.

   $ git clone git://github.com/bootstrapworld/wescheme2012

Don't forget: we're using git submodules, so also make sure to:

   $ git submodule init
   $ git submodule update

to grab the external dependendies as well.  As of this writing, the
external dependency is CodeMirror.

2. You might also need to change wescheme.properties if you are
doing any development on the android packager or compilation server.
You probably don't need to touch this unless you really know what
you're doing.

3.  Run 'build-console-and-editor.rkt'.


The script "build-console-and-editor.rkt" must be executed after any
changes are made to the javascript source files in war-src/js.  The
webapp itself uses files in war, which are built by
build-console-and-editor.  Also, the builder also re-compresses
JavaScript files (such as CodeMirror 2) with the Closure Compiler, so
you must run this every time you change the JavaScript files.


Running WeScheme locally:

After running build-console-and-editor.rkt, use Apache Ant with the
'runserver' target.

   $ ant runserver

This will bring up a locally-running Webserver running off port 8081.


Hacking WeScheme:

The directory structure of WeScheme is a fairly typical Java web app.

Treat war as an output distribution directory.  Do not try to modify
files in there directly.  Rather, the majority of the JavaScript files
can be found in:


which are packaged up via Closure into single JavaScript files, one
per application page.

    console: war/console.jsp, war/js/console-calc.js

        Implements the directory listing of a user's programs.

    openEditor: war/openEditor/index.jsp, war/js/openEditor-calc.js

        Implements main editor window; implements the main WeScheme interface
        (REPL, text editor)

    view: war/view.jsp, war/js/view-calc.js
    run: war/run.jsp

        Implements the viewing and running of programs outside of the
        editing environment.

Building on a Windows Machine

The build tools of this project requires a unix-like environment. The
bash shell that is part of the standard installation of "GIT for
Windows" will do perfectly. Get it here, if you don't have it yet.


To install WeScheme, follow the instructions of the section
"Installing WeScheme for local development" above, but before you
execute the script 'build-console-and-editor.rkt', make sure that a
softlink to your java.exe is defined the current directory. You can
create such a link with the command:

   ln -s "C:\Program Files (x86)\Java\jdk1.7.0_79\bin\java.exe" java

Note that the link must be named "java" and not "java.exe".

The Selenium Test Suite.

We use Selenium (http://seleniumhq.org)

To use the suite:

1. Install firefox
2. Install selenium IDE @ http://seleniumhq.org/download/
3. Open up firefox
4. To open selenium, in firefox go to Tools -> Selenium IDE
5. Visit the openEditor page of the wescheme instance in Firefox.
6. in the IDE, go to File -> Open Test Suite
7. Open "full-suite" in testing/
8. Run with the green arrows in the Selenium IDE

Note that the tests as currently written have not yet been coded
to respect some of the delays introduced by asynchronous JavaScript, so
many of the tests will fail unless the speed of the testing framework is
set to slightly slower than the "Fast" speed.



- Install plugins here: https://developers.google.com/eclipse/docs/install-eclipse-4.6
- If there is an error about DataNucleus, installing http://www.datanucleus.org/products/datanucleus/jdo/guides/eclipse.html might help
- Need to set version to 1.7 if you are using 1.8 (Project > Properties > Java Compiler. Set Compiler compliance level to 1.7).


Upload process:

Bump version in `war/WEB-INF/appengine-web.xml` up. Then, run `rebuild-and-upload.sh`.