Giter VIP home page Giter VIP logo

abstract.js's Introduction

Abstract.js

Abstract.js is a new and amazing framework for fast web development. It's the world's first Logic Oriented Program Framework(As I know). Using Abstract.js you can construct a readable, tidy project.

  • **Abstract Models & Core Concept:**Here the Models don't refer to the M of MVC, but drawn from the model concept in Mathematic. Abstract.js rethought construction of the web page and found the common and abstract actions in web development.
    We extract two base models which can describe all the web development. So it's rendering model and relationship model in Abstract.js.
    The relationship model is based on a simple state machine and using for describing the relationship between the rendering models. While the rendring model is using for rendering modules of the web page.
    But it's not enough just with the two base models, Abstract.js also offers the connction methods between the models to make it more convenient building the web world.
  • **Virtual DOM and Event Propagation:**Models refer to the Real Dom. Models construct Virtual DOM Tree with parent&child relationship and event propagation.
  • **Logical Abstracted:**Abstract Models are like ribs of the page. Many logical programmings are encapsulated, So you build your page fast.

##Doc Doc

##examples simple render model

var nav = new RenderModel({
    el: '.nav',
    data: {
        navList: [
            {name: '简介', cn: '_intro'},
            {name: '应用', cn: '_applacation'},
            {name: '文档', cn: '_doc'}
        ]
    },
    tmpl: "<li soda-repeat='item in navList' onclick='switchNav(\"{{item.cn}}\")' class='{{item.cn}}'>{{item.name}}</li>",
    events: function(){
        window.switchNav = function(name){
            Model.trigger("." + name);
        };
    }
});

nav.rock();

page model

var intro = new RenderModel({
    el: '.intro',
    tmpl: 'Model.js'
});

var nav = new RenderModel({
    el: '.nav',
    data: {
        navList: [
            {name: '简介', cn: '_intro'},
            {name: '应用', cn: '_applacation'},
            {name: '文档', cn: '_doc'}
        ]
    },
    tmpl: "<li soda-repeat='item in navList' onclick='switchNav(\"{{item.cn}}\")' class='{{item.cn}}'>{{item.name}}</li>",
    events: function(){
        window.switchNav = function(name){
            Model.trigger("." + name);
        };
    }
});

var page = new PageModel();
page.add(intro);
page.add(nav);
page.rock();

observe events

var intro = new RenderModel({
    el: '.intro',
    tmpl: 'Model.js'
});

intro.addEventListener("completed", function(e){
     // do something
});

###Learn Abstract.js(comming soon)

abstract.js's People

Contributors

honghu91 avatar dorsywang avatar

Stargazers

 avatar  avatar DK Dhilip avatar lenzhao avatar Ruibin avatar  avatar Song Huang avatar paranoidjk avatar 向怡 avatar brick avatar rico avatar xiguaxigua avatar gt-leibin avatar Mars Lei avatar Wei Wu avatar jenner avatar sindorei avatar Renliang.Pan avatar springlee avatar Melo avatar Charles Song avatar Athon avatar 0x5459 avatar Xujing Yang avatar Leslie avatar  avatar  avatar  avatar  avatar Jonathan Zhang avatar  avatar  avatar zyg avatar  avatar Jack avatar 番茄炒蛋 avatar Joffey avatar 陈运江 avatar MuChen avatar Rex Lee avatar 黄承开 avatar mcattx avatar  avatar fengyuqing avatar  avatar

Watchers

James Cloos avatar Jack avatar sindorei avatar  avatar

abstract.js's Issues

如何让complete不执行两次?

远程请求数据的时候complete会执行两次,第二次执行的时候选项卡样式没有了,数据也出不来。
还有一个问题,文档里说的switchTo(selector)这个方法,源码里并没有。也没法调用?!!

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.