Registry / web-framework / foam-framework

foam-framework

JSON →
library0.5.0jsnpmunverified

FOAM is described as a full-stack reactive MVC metaprogramming framework primarily implemented in JavaScript. Its core value proposition focuses on building high-performance applications with reduced size and increased developer efficiency, allowing for code generation targeting various languages and platforms. The project appears to be an early-stage or abandoned framework, indicated by its low version number (0.5.0), the use of 'nodejs' (rather than 'node') in examples, a dependency on Google Groups for discussions, and the primary distribution method involving direct HTML script inclusion or pre-bundled `foam.js` files. It predates widespread adoption of modern JavaScript module systems like CommonJS or ESM, typically relying on global scope for accessibility. There is no clear release cadence, and the framework's 'no build' claim for demos contrasts with a build tool for optimized deployment, suggesting a workflow that might be incompatible with contemporary front-end development practices. Key differentiators include its metaprogramming capabilities and focus on efficient code generation, though its current relevance is limited given its apparent inactivity.

web-framework
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FOAM is primarily designed for global script inclusion in HTML environments, making the `FOAM` object available on the `window` object. It does not support modern JavaScript module systems like CommonJS or ESM for direct programmatic imports from the npm package.

<!-- Load foam.js into an HTML page --> <script src="path/to/foam.js"></script> <!-- FOAM will then be available globally, e.g., window.FOAM -->

Demonstrates how to use the framework's `foam.js` build tool to generate a bundled application from a specified controller model for deployment.

nodejs tools/foam.js foam.build.BuildApp controller=my.controller.Model targetPath=. // This command runs the FOAM build tool to generate a bundled application. // 'my.controller.Model' should be replaced with the actual path to your application's main controller model. // The 'targetPath' specifies where the output (e.g., foam.js and foam.html) will be placed.
Debug
Known footguns
breakingFOAM is likely incompatible with modern JavaScript syntax (ES2015+) and recent Node.js versions. Its development predates many contemporary language features and runtime advancements, potentially leading to syntax errors or runtime issues.
gotchaThe framework operates by exposing itself globally (e.g., `window.FOAM`) when loaded via script tags. This can lead to global scope pollution and potential conflicts with other libraries or scripts that might use similar global variable names.
gotchaFOAM does not support modern JavaScript module systems (CommonJS, ESM). Attempts to `import` or `require` modules from the `foam-framework` npm package will fail, as it expects direct script inclusion or use of its build tools.
gotchaThe project appears to be abandoned or no longer actively maintained, given its low version number (0.5.0), outdated documentation references (Google Groups), and absence of recent updates. This implies a lack of security patches, bug fixes, or compatibility updates for newer environments.
gotchaThe build process, described using a `nodejs tools/foam.js` command, is not integrated with modern front-end build pipelines (e.g., Webpack, Rollup, Vite). This can complicate integration into contemporary development workflows and dependency management.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
gptbot
4
ahrefsbot
3
script
1
googlebot
1
Resources