Coder Social home page Coder Social logo

foam-framework / foam2 Goto Github PK

View Code? Open in Web Editor NEW
73.0 11.0 63.0 47.01 MB

FOAM: Feature-Oriented Active Modeller, Version 2

License: Apache License 2.0

JavaScript 38.57% HTML 55.80% Shell 0.03% CSS 0.11% Java 5.34% Swift 0.10% Makefile 0.04%

foam2's Introduction

FOAM

Build fully featured high performance apps in less time using FOAM.

  • Application Speed
  • Application Size
  • Developer Efficiency

"Fast apps Fast"

http://foamdev.com

Build Status

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

Building Java

cd src; ./gen.sh; cd ../build; cp ../tools/pom.xml .; mvn compile; mvn package

Or you may build and run using

make run

And to clean the project, you may use

make clean

Installing Dependencies

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.

Running Application Controller

The FOAM Application Controller allows you to access components of your foam app by using the browser & displaying it as a GUI. To access, run the following in the parent directory of foam2:

Style Guide

All code should follow the style guide.

Testing

  • npm test runs standard unit tests.

  • npm run testDebug runs the unit tests with a debugger.

  • npm run coverage runs code coverage and creates an html report in /coverage.

For in-browser testing, run your favorite web server at the root of the FOAM repository. In a browser, navigate to http://localhost:8000/test/browser/SpecRunner.html to run the unit tests.

Documentation

Contributing

Before contributing code to FOAM, you must complete the Google Individual Contributor License Agreement.

foam2's People

Contributors

adamvy avatar adamvy-google avatar amymeng5277 avatar blakegreen32 avatar bshepherdson avatar deejes avatar hchoura avatar jacksonic avatar jlhughes avatar katemengjunxia avatar kennyqiyenkan avatar kgrgreer avatar lchanmann avatar marcroopchand avatar mcarcaso avatar mdittmer avatar michaelconnor468 avatar minsunny avatar mykola97 avatar nanopay-arthur avatar nanoscott avatar nauna avatar noodlemoodle avatar olhabn avatar pavneetskapoor avatar penzital avatar tanayparikh avatar xuerongcode avatar xuerongnanopay avatar zahnno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foam2's Issues

foam.u2.ChoiceView does not appear to work with a dao of choices

The select call is incorrect, using Map.create({ f: .... });

It probably needs to be Map.create({ arg1: this.objToChoice, delegate: some_sort_of_sink });

Additionally, the postSet for DAO does not call .onDAOUpdate(), so even if the dao was set it never updates the choices.

EasyDAO Guide

Or just inline with the jsdoc? Either way, to be linked from DAO Guide

JSDoc template: fix title output in guides

Title output in guides is disabled because the title it picks is bad. But the styling of the title inside the guide text has a bad margin (or fixing it breaks the margin in generated class doc pages). Resolve tutorial/guide title output, fix H1 margin styling.

Fix in-browser tests failing due to missing exceptions

5 Browser tests fail due to not throwing an exception on assert. Replace assert() for these tests with a version that throws (already implemented for some other tests):

Function rejects non functions
StringArray setting an array to a number throws an exception
StringArray setting an array to an object throws an exception
Enum tests Basic enum
Enum tests Basic enum

Mock Sinks

Implement Mock sinks for DAO testing, combinations of optional promise returns on put/remove, errors through throw, reject, and flow control

QuickSink

Create a QuickSink with put/remove/error/eof/reset as function properties to allow inline sinks that still extend AbstractSink

Clean up warnings from EasyDAO creation.

EasyDAO passes a lot of parameters to different DAOs that are not actually properties of the targets.

Such as "property" to MDAO and others. Would be nice to scrub this so that EasyDAO creation doesn't pollute the console.

Add virtual Element style/attribute mappings.

To make it easier to bind boolean values without having to know the one-off rules for converting boolean values to specific DOM values. Maybe could also be used to add 'data' support.

Cleared Properties not reflected in UI

Consider the sevenguis CRUD example.
The person detailView shows the values of person .name and .surname.
If I call person.name$.clear(), or person$.clear() the detailView is not updated.
Is this expected behaviour?

If I run:

this.person.name$.clear();
undefined
this.person.name;
undefined

I see that it is clearing the person's name property, but the UI isn't updating, so there must be a bug in the property/UI binding when it comes to 'undefined'. I'll fix.

Create/Port index.html

Port from FOAM1 to allow for dynamic model/class loading and viewing without having to create custom .html files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.