找回密码
 FreeOZ用户注册
查看: 1853|回复: 1
打印 上一主题 下一主题

[软件技巧] A simple javascript class to do MVC (or data-binding)

[复制链接]
跳转到指定楼层
1#
发表于 4-10-2013 12:57:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除, 无法发言

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
本帖最后由 black_zerg 于 4-10-2013 22:10 编辑

Demo:
http://glue.atwebpages.com/clip/Clip.html

Code sample:
        <input id='v1' type="range" name="num" min="1" max="100">
        <input id='v2' type="number" name='num' />
        <script>
           var m = {}; // the model
           Clip('v1', m); // view1
           Clip('v2', m); // view2
        </script>

The solution heavily relies on the event bus concept to provide the flexibility today's web apps need.

I will post more information later. Let me know if anyone is interested.   I will implement todoMVC with it and post my demo soon.

Before I started that small binding lib, I was planning to create a JS diagram editor. here is what I got so far:
http://glue.atwebpages.com/chart/index.html
Let me know if you feel more interested in this one, maybe we can start an opensource project together.

Any comment will be appreciated!

评分

参与人数 1威望 +50 收起 理由
coredump + 50 你太有才了!

查看全部评分

回复  

使用道具 举报

2#
 楼主| 发表于 4-10-2013 16:18:43 | 只看该作者
提示: 作者被禁止或删除, 无法发言
本帖最后由 black_zerg 于 4-10-2013 22:12 编辑

implementing the todoMVC  (under development):
http://glue.atwebpages.com/clip/todo/index.html

about todoMVC http://todomvc.com/
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 20-4-2024 19:31 , Processed in 0.030783 second(s), 19 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表