Switch branches/tags
Nothing to show
Find file History
jdubray [SAM-SAMPLES] Added a vanilla-es6 stateful component sample that demo…
…nstrates how we can fold the local state of component into the model to achieve a functional HTML view
Latest commit 5a51711 Mar 7, 2018
Permalink
..
Failed to load latest commit information.
config
dbs
html
plugins
README.md
data.js
log4.js
package.json
server-model.js

README.md

SAM ES6 Boilerplate Project

SAM is a new reactive functional pattern which greatly simplifies the architecture of front-ends (native or Web).

This project provides a basic SAM structure (actions, model, state, view) and a componentized theme. The theme comes with three familiar sections (header, page, footer) and can be used to implement HTML5 themes.

The project uses Google traceur to automatically transpile E6 to ES5, an node.js as a Web server. The initial value of the model can be imported from a file (./component/model.data.js) or served from node.js (as a dynamically built javascript file).

The index.html code uses JQuery, but this is optional.

Files

 |
 |--/sam              the basic SAM structure
 |--/components       the application / site components
 |--/plugins          back-end plugins
 |--server-model.js   node as a Web server (can host APIs as well)
 |--data.js           Initial value of the model, when served from node

Install

npm install
node server-model.js

Open http://localhost:5425/html