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 does have build dependencies:
- git
- npm
- nodejs (version >= 16)
- maven
- java (version >= 11)
Once dependencies are installed, update FOAM's javascript dependencies: From the root of the FOAM repository, execute:
./build.sh --install
sudo chown -R $USER /opt
See INSTALL.md for more detailed installation notes.
./build.sh -Jdemo
- visit: http://localhost:8080
./build.sh
- -h - help, show all options
- -c - clean
- -d - debug mode allowing connection by a remote debugger
- -j - delete runtime journals (use with caution)
- -Jpom1,pom2,...,pomN - where pomN,... are found relative to the deployment folder.
- -a - build and deploy from a single Java jar file.
NOTE: this will create a parent directory above foam3/
./build.sh -T+setup/Project --appName:Example --package:com.foamdev --adminPassword:badpassword
cd ..
./build.sh
- visit: http:/localhost:8080 and login with admin / badpassword
To build and deploy to a remote linux instance
- build:
./build.sh -ck[Jpom...]
- deploy:
./build.sh -TStandard,RemoteInstall,Java --user:foam user-id:3636 --remote-hostname:hostname
- visit: http://hostname:8080
All code should follow the style guide.
To run all Java tests from the command-line, run:
./build.sh --java-tests
To run individual tests from the command-line, run:
./build.sh --java-tests:testName1,testName2,...testNameN
- Short Intro
- Medium Intro
- Long Intro
- Reactive Programming in FOAM
- UNIX and Google
- Olympic Medals Demo
- Turtle Graphics
Launch FOAM
To run CORE, 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.
- Another example FOAM Project building on the above with more models and example data.
The following course is not directly about FOAM, but covers material essential for understanding FOAM's design: