Fast apps fast

High-level

You write very high-level, declarative models, and FOAM builds many features from them: default views, storage, serialization, Java and Swift classes, and much more.

Compact

Your app and FOAM itself are both modeled, keeping your payload small.

Our Gmail app is 150KB unzipped.

With so little code to write, FOAM is perfect for rapid app development.

Fast

FOAM apps are small and load fast – even on mobile.

FOAM's reactive programming is efficient, and fast enough for animation – even on mobile.

FOAM is an open-source modeling framework developed at Google.

With FOAM, you create a model, and FOAM can support many features based on it:

  • A (Javascript, Java or Swift) class, with diff(), clone(), and more.
  • Serialization to and from JSON, XML and protocol buffers.
  • Storage in many places, from IndexedDB to MongoDB.
  • Query parsers and a query optimizer.
  • Offline-friendly syncing, and many flavours of caching.
  • Customizable detail and summary views for HTML, Android and iOS.

FOAM combines these features with reactive programming, an MVC library, and a suite of view components for each platform. The result is a full-stack framework for building modern, cross-platform apps.

Try FOAM Live

Below is a FOAM model you can edit, and a list of FOAM features you can see live in your browser.

Try uncommenting the 'hometown' property. Or try changing the defaultValue for the gender property to 'F'.

FOAM can generate default views from a model. They can easily be customized, or replaced altogether.
FOAM can make a reasonable guess at a summary for a model - in this case the "name" property is chosen.
Tables in a variety of styles. This one is Material Design and supports column resizing and infinite scrolling.
diff() shows all the different properties between two objects of the same model. Try changing the Person's gender or age!
Any FOAM object can be serialized to JSON. Note that default values (eg. "gender" = "M") are omitted, saving space.
Any FOAM object can be serialized to XML. Note that default values (eg. "gender" = "M") are omitted, saving space.
FOAM can generate Java source code from a model, and includes a Java library for servers and Android.
FOAM can generate Swift source code from a model, and inludes a library for iOS development.
FOAM models data storage with the DAO, or Data Access Object. This single, high-level API works with many different storage backends.
Since the DAO API is small and high-level, it is easy to decorate a basic DAO with extra features.
Here's a list of some of the other features FOAM supports for every model.