JavaScript的MVC框架 TrimJunction
- 授权协议: Apache
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://code.google.com/p/trimpath/wiki/TrimJunction
- 软件文档: http://trimpath.googlecode.com/svn/trunk/junction_docs/index.html
软件介绍
TrimJunction是个开源项目,其模型很像Ruby on Rails,它提供一个可扩展的JavaScript的MVC框架。TrimJunction的特性之一是它能在内存中保存数据模型的变化。然后在重新连接后把这些变化发送给服务器。
示例代码:
BlogPost = function() {}
modelInit('BlogPost');
BlogPost.hasMany('Comments);
BlogPost.findByShortName = function(shortName) {
return BlogPost.find("first", { conditions: ["BlogPost.shortName = ?", shortName] });
}
