non-intrusive MVVM which allows designer-friendly independent html template
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
grunt add license related information May 20, 2015
src fix bug that getItem always return the last item of array. May 27, 2016
test fix bug that getItem always return the last item of array. May 27, 2016
.gitignore add example of polymer component usage Jun 2, 2015
NOTICE fix May 27, 2016

Asta4js is a MVVM framework which allows independent html template and separate rendering/binding logic to independent js file from html template.


  • pure html template and separated binding

    There is a simple html template which contains a text input and a preview text label.

    <div>2w bingind<input name="name"></div>
    <div>1w binging:<span id="name-preview"></span></div>

    Then we can bind the two DOM elements with the javascript model as following:

        $ = {};
        $scope.snippet("body").bind($, {
               Aj.form(), //bind the $ to input[name=name] in 2-way
               "#name-preview" //bind the $ to #name-preview in 1-way

    A complete sample of todoApp shows how we can make things amazing.

  • web component support

    Asta4js supports web component as well, thus we can develope our application on component base as the same as what react or polymer does.

    Even that Asta4js can make use of polymer's components by treating them as standard web component. The mozilla brick can be integrated as well. The details can be found at our wiki page Web Component Developing

Plenty examples can be found at

User guide is at Asta4js wiki

Why Asta4js

We have been practicing separating rendering/binding logic from the front-end template files for years, and we believe that separated rendering/binding is the best way to release the productivity of developers and designers both since they can completely work independently.

We had created a server side framework Asta4D to achieve our goal years ago,nowadays we believe it is the time to create one for client side programming, thus we created Asta4js.


run all test

grunt test

run certain test on chrome

grunt wtestc -file test/e2e/virtual_path_in_array_test.js

dev build

grunt dev

dev watch

grunt watch

status and road map

Currently, Asta4js is still in alpha developing, which means it still lacks of some important functionalities, but it can be considered as stable for existing functions because we are using it in our service developing.

Todo things:

  • build
    • it seems that karma is not a good option for common unit test purpose.(waiting)
    • CI support(better with sauce)(waiting)
    • source format and jshint(waiting)
  • core
    • remove dependency of JQuery, use document.querySelector instead(waiting)
    • add test for multiple select(waiting)
    • add support for option group of select(waiting)
    • performance enhancement, especially for array binding which current implementation is inefficient(waiting)
    • api enhancement for better development friendliness.(in progress)
  • example
    • reimplement the todoApp example to follow the todoMVC's guide line and submit it to todoMVC.(waiting)
  • spa
    • to confirm what else we need for a single page application?(being considered)

Any issue report or contribution/PR is appreciated, especially for the waiting items in above todo things. You can also open issues for discussion.