Skip to content
/ asta4js Public
forked from astamuse/asta4js

non-intrusive MVVM which allows designer-friendly independent html template

License

Notifications You must be signed in to change notification settings

yufish/asta4js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Overview

  • 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:

      Aj.init(function($scope){
        $scope.data = {};
        $scope.snippet("body").bind($scope.data, {
            name:[
               Aj.form(), //bind the $scope.data.name to input[name=name] in 2-way
               "#name-preview" //bind the $scope.data.name 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

All examples can be found at http://astamuse.github.io/asta4js

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.

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)
  • binding
    • add test for multiple select(waiting)
    • add support for option group of select(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.

About

non-intrusive MVVM which allows designer-friendly independent html template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.0%
  • HTML 2.8%
  • CSS 0.2%