Skip to content

kgrgreer/foam3

Repository files navigation

FOAM3

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.

Feature Oriented Active Modeller

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.

Development

Dependencies

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.

Building

Build and run Java webserver

./build.sh -Jdemo

./build.sh

common build options:

  • -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.

Creating and running an example Application

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

Remote deployment

To build and deploy to a remote linux instance

  1. build: ./build.sh -ck[Jpom...]
  2. deploy: ./build.sh -TStandard,RemoteInstall,Java --user:foam user-id:3636 --remote-hostname:hostname
  3. visit: http://hostname:8080

Style Guide

All code should follow the style guide.

Testing

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

Documentation

Videos

Guides

Cheatsheets

Tutorials

Demos

Live Demos

Launch FOAM

CORE

To run CORE, the FOAM Java Application Server, run: ./build.sh -Jdemo then connect to http://localhost:8080

Example FOAM Projects

Design Patterns

The following course is not directly about FOAM, but covers material essential for understanding FOAM's design:

Introduction to Design Patterns

Videos: Part 1, Part2, Part 3

About

FOAM: Feature-Oriented Active Modeller, Version 3 (unstable)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 41

Languages