2

根据我的研究,我相信如果只使用 BackboneJS 来构建以客户端为中心的大规模应用程序,情况会变得很麻烦。是否有使用 BackboneJS 构建此类应用程序的最佳方法。我遇到了一个名为 ChaplinJS 的框架,它是 BackboneJS 的包装器,用于构建大型应用程序。有哪些其他框架可以像 ChaplinJS 一样将 BackboneJS 用于大型项目?

4

3 回答 3

1

Backbone.js 中缺失的椎骨比任何东西都可能填补的多。您需要确保您知道要使用什么解决方案进行验证、将模型变量绑定到表单字段和 HTML 显示(假设您想要双向绑定)、模板化、模块化/AMD(例如,类似 RequireJS ),然后可能还有像 Marionette 这样的东西。

我有比这些更多的笔记,但我已经删除了这些主题的大部分笔记,因为它们有点太意识流而难以理解。

Binding
    <https://github.com/theironcook/Backbone.ModelBinder>

Validation
    <https://github.com/toddself/Backbone.Validator>
        Just the validation part of things
    <https://github.com/thedersen/backbone.validation>
        Seems to combine binding and validation
    <https://github.com/n-time/backbone.validations>
        Seems to combine binding and validation

Modules
    <https://github.com/scottburch/river-js>

Templates
    handlebarsjs.com <http://handlebarsjs.com/>

总的来说,刚刚用它完成了一个大项目,它不会再次成为我的首选。它遗漏了太多你必须填写的部分。我们可能会看看 Ember.js 是否能更好地为我们工作。

于 2012-07-05T21:10:12.343 回答
1

木偶: https ://github.com/derickbailey/backbone.marionette

于 2012-07-05T20:42:32.457 回答
0

Backbone Aura looks really promising. It's from Addy Osmani and is based on his "Patterns for Large Scale JavaScript Applications" and Nicholas Zakas' "Scalable Application Architecture".

The developer preview was released just a few weeks ago, so documentation and tutorials are still scarce. But I like that it has such an impressive pedigree, and how it marries two of the most authoritative approaches to JS architecture (Osmani's Aura had been around for a while in non-Backbone form and several frameworks have been built around the Zakas model as well).

于 2012-07-05T21:22:28.197 回答