可继承的前端开发框架 Intact

MIT
JavaScript 查看源码»
跨平台
2017-09-05
JaveyZ

Intact是一个可继承的前端开发框架

  1. 简单:没有复杂的概念,你仅仅只需要了解HTML,CSS和JavaScript即可

  2. 高效:22KB min+gzip 大小,包含前端编译模块;fork自目前最快的虚拟DOM引擎之一(inferno)构建

  3. 可继承:充分发挥继承的优势,实现组件逻辑和模板的继承扩展, 让你更快速方便地构建复杂的应用

示例:

var Layout = Intact.extend({
    template: '<div>\
        <header>\
            <b:header>Extendable and Reactive Component</b:header>\
        </header>\
        <div>\
            <b:body>\
                <div class="count">{self.get("count")}</div>\
            </b:body>\
        </div>\
    </div>',
    defaults: function() {
        return {count: 0};
    }
});

var Page = Layout.extend({
    template: '<t:parent>\
        <b:body>\
            {parent()}\
            <button class="button"\
                ev-click={self.add.bind(self)}\
            >Click me!</button>\
        </b:body>\
    </t:parent>',
    add: function() {
        this.set('count', this.get('count') + 1);
    }
});

Intact.mount(Page, document.getElementById('app'));
加载中

评论(2)

tkggusraqk
tkggusraqk
没用,复杂度整体上升,本身html就不适合这种方式
Sir_code
Sir_code
可继承组件技术方案是很新颖,看了下文档,很赞。

Intact.js v2.2.0,可继承,强逻辑模板的 MVVM 框架

距离Intact上个版本过去了大半年,这半年里,一直致力于基于Intact的组件库Kpc的开发工作。而在这次开发过程中,一点一点地将Intact打磨成了一个比较理想的版本。同时也接受了大型组件库,以...

05/02 11:40

可继承的前端开发框架 Intact v2.0 发布

Intact是一个充分利用继承思想开发前端页面的框架,秉承了数据驱动来简单高效地更新界面的同时,又充分利用组合和继承来实现代码的复用。 Intact将组件分为两类:可复用组件和不可复用组件。...

2017/09/06 10:59

没有更多内容

加载失败,请刷新页面

没有更多内容

暂无问答

用 curl 测试 tomcat response compressed effects

tomcat conf response content compression off: compression="off" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,t...

2012/03/31 01:38
633
0
关于Activity的onSaveInstanceSate()这个API

####关于onSaveInstanceSate()这个API 参考:https://developer.android.com/reference/android/app/Activity#onSaveInstanceState(android.os.Bundle) protected void onSaveInstanceState (...

09/13 17:24
11
0
Using Redis For Session Storage

A few days back, I was just messing around with [Redis](http://redis.io/) and all of a sudden there was a necessity where I had to externalize the sessions from Apache Tomcat. [...

2016/11/08 10:19
38
0
poj 1504 Adding Reversed Numbers

原题:http://poj.org/problem?id=1504

2017/11/02 09:46
9
0
Hbase/HbaseRest

Hbase/HbaseRest 原文地址:::https://wiki.apache.org/hadoop/Hbase/HbaseRest

2015/10/19 14:59
78
0
An Excellent Snipt Code Snippet (HexDump.c)

/* * Copyright (c) 1993 by David I. Bell * Permission is granted to use, distribute, or modify this source, * provided that this copyright notice remains intact. * * Most simple...

2013/07/12 10:35
19
0
管理Activity的生命周期

As a user navigates through, out of, and back to your app, the Activity instances in your app transition between different states in their life cycle. 作为一个用户通过导航进出和...

2012/08/13 00:00
242
0
he gloveless game was the b

he gloveless game was the b

2015/06/10 13:25
4
0
How to Create a WordPress Child Theme

We’ve all been there: the crossroads of updating your theme and overwriting the edits you made to it. Either you have to leave your theme out of date or erase all the work you ...

2014/08/17 17:34
13
0

没有更多内容

加载失败,请刷新页面

返回顶部
顶部