Build fully featured high performance apps in less time using FOAM.
- Application Speed
- Application Size
- Developer Efficiency
"Fast apps Fast"
FOAM3 is the active version of FOAM.
The FOAM1 website still contains many useful demos and videos (but some links may be broken).
Ask questions and get help on the FOAM Discussion Group.
FOAM is a modeling tool and class based object system. To use FOAM, you create a model of your class by describing the properties, methods, event topics, listeners, and dependencies of your class. FOAM takes this model and generates a usable JavaScript class along with several companion features such as database support and network marshaling.
While FOAM is written in JavaScript, it can be used to generate code for any language or platform, including Android Java and iOS Swift.
FOAM has no runtime dependencies, but uses a number of third party tools for unit tests, code coverage, and linting. You can install all required tools by doing the following.
-
Install nodejs.
-
Run
npm install
in the root of the FOAM repository, where package.json is found.
NOTE: default configuration is setup for Java 21
If using a version less than 21, change the java: 21
property in the root pom.js.
If deploying with -u or remotely, update the garbage collection configuration in tools/deploy/etc/shrc.local
.
./build.sh [options]
- -h - help - show all options
- -c - clean
- -d - debug mode allowing connection by a remote debugger
- -j - delete runtime journals
- -Jpom1,pom2,...,pomN - where pomN,... are found relative to the deployment folder.
- -u - build and deploy from a single Java jar file
- visit: https://localhost:8443
To build and deploy to a remote linux instance
- build:
./build.sh -uck[Jpom...]
- deploy:
foam3/tools/bin/install.sh hostname
- visit: https://hostname:8443
All code should follow the style guide.
To run all Java tests from the command-line, run:
./build.sh -ct
To run individual tests from the command-line, run:
./build.sh -cTtestName1,testName2,...testNameN
- Short Intro
- Medium Intro
- Long Intro
- Reactive Programming in FOAM
- UNIX and Google
- Olympic Medals Demo
- Turtle Graphics
- FOAM1 Demo Catalog
- FOAM by Example
To run NANOS, the FOAM Java Application Server, run:
./build.sh -Jdemo
then connect to http://localhost:8080
An Example FOAM Project which shows how to consume/use FOAM from an external repository.
The following course is not directly about FOAM, but covers material essential for fully understanding FOAM's design: