GithubHelp home page GithubHelp logo

asta4js's Introduction

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

Plenty 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.

development

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.

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.