JavaScript 的 MVC 方法
我正在寻找一个合适的框架来根据 MVCS 微架构组织我的 Javascript、jQuery 辅助代码。
我对 JavaScriptMVC 做了一些研究,虽然它看起来像是一个强大的产品,但我担心它有点“杀伤力” “为了我的需要,而且由于它的记录很少,我需要花费几个小时才能仅排除我可以使用的部分。
我真正寻找的是一些优雅的东西,比如 jQuery-PureMVC 端口(据我所知不存在)或Robotlegs(对于熟悉此 AS3 框架的人)。 换句话说:我正在寻找一个轻量且简单的框架,它允许我轻松管理围绕我的许多现有自定义 jQuery UI 小部件 的业务逻辑。
有什么建议吗?
I am searching for a decent framework for organizing my Javascript, jQuery assisted code according to MVCS micro-architecture.
I did some research on JavaScriptMVC, and though it looks like a robust product, I'm afraid it's a bit of an "overkill" for my needs, and since it's poorly documented it will take me hours to exclude only the parts of it that I can utilize.
What I really search for is something elegant like a jQuery-PureMVC port (which as far as I know does not exist) or Robotlegs (for those who are familiar with this AS3 framework).
In other words: I look for a light and simple framework that will allow me to easily manage the business logic surrounding my many existing custom jQuery UI Widgets.
Any recommendations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 backbone.js
它是轻量级的,允许您轻松插入抽象。它还被设计为没有附加 UI,因此您可以插入 jQuery 或您打算使用的任何其他库。
Try backbone.js
It's lightweight and allows you to plugin into the abstractions easily. It was also designed to not have a UI attached to it so you can plug in jQuery or whatever other library you intend to use.
快速浏览一下 backbone.js,它是 underscore.js。
它是一个相当小但功能强大的框架,可让您从头开始构建东西。
这里有一个关于如何操作的简短教程使用 Backbone.js 开发单页应用程序。
Have a quick look at backbone.js, a companion project to underscore.js.
It is a fairly small but powerful framework, which lets you build things from the ground up.
Here a brief tutorial on how to develop a single page app with Backbone.js.