backbone README

The project's README from github.com/jashkenas/backbone. As one markdown file: README.md.

 ____                     __      __
/\  _`\                  /\ \    /\ \                                   __
\ \ \ \ \     __      ___\ \ \/'\\ \ \____    ___     ___      __      /\_\    ____
 \ \  _ <'  /'__`\   /'___\ \ , < \ \ '__`\  / __`\ /' _ `\  /'__`\    \/\ \  /',__\
  \ \ \ \ \/\ \ \.\_/\ \__/\ \ \\`\\ \ \ \ \/\ \ \ \/\ \/\ \/\  __/  __ \ \ \/\__, `\
   \ \____/\ \__/.\_\ \____\\ \_\ \_\ \_,__/\ \____/\ \_\ \_\ \____\/\_\_\ \ \/\____/
    \/___/  \/__/\/_/\/____/ \/_/\/_/\/___/  \/___/  \/_/\/_/\/____/\/_/\ \_\ \/___/
                                                                       \ \____/
                                                                        \/___/
(_'_______________________________________________________________________________'_)
(_.———————————————————————————————————————————————————————————————————————————————._)

Backbone supplies structure to JavaScript-heavy applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.

For Docs, License, Tests, pre-packed downloads, and everything else, really, see: https://backbonejs.org

To suggest a feature or report a bug: https://github.com/jashkenas/backbone/issues

For questions on working with Backbone or general discussions: security policy, https://stackoverflow.com/questions/tagged/backbone.js, https://matrix.to/#/#jashkenas_backbone:gitter.im or https://groups.google.com/g/backbonejs

Backbone is an open-sourced component of DocumentCloud: https://github.com/documentcloud

Testing powered by SauceLabs: https://saucelabs.com

Many thanks to our contributors: https://github.com/jashkenas/backbone/graphs/contributors

Special thanks to Robert Kieffer for the original philosophy behind Backbone. https://github.com/broofa

This project adheres to a code of conduct. By participating, you are expected to uphold this code.

backbone (jashkenas/backbone)

Searching Database…

28.1K ·GitHub
这是什么?Backbone.js 通过带有键值绑定和自定义事件的 Models、提供丰富可枚举 API 的 Collections,以及支持声明式事件处理的 Views,为依赖大量 JavaScript 的应用提供结构;这些部分通过 RESTful JSON 接口同步数据,连接在一起。
这是框架还是轻量级库?它是一个轻量级库,而不是完整的框架:它提供 Model、Collection 和 View 这些构建模块来组织应用,但路由风格、模板引擎和构建工具等选择都由你自己决定。
我该怎么把 Backbone 加到项目里?在页面中引入 backbone.js(或安装 npm 包),同时引入它所需的 Underscore 工具库,然后把你的 Models 和 Collections 连接到支持 RESTful JSON 的后端。
使用 Backbone 时还需要别的库吗?需要。Backbone 的 package.json 中只把 Underscore 列为运行时依赖,因为 Backbone 依赖它提供的可枚举和工具函数。
Backbone 需要特定类型的后端吗?默认情况下,Backbone 的 Models 和 Collections 通过 RESTful JSON API 同步数据,所以你的服务器需要遵循这种模式,除非你自己重写 sync 方法。
Collections 相比 Models 多了什么?Collections 是有序的 Models 集合,提供一整套基于 Underscore 的可枚举方法(如 map、filter、sortBy 等),还有 add、remove 和 reset 操作对应的事件。
Backbone 是怎么测试的?Backbone 使用 Karma 运行测试套件,另外还有一个单独的 CoffeeScript 模型测试和 ESLint 检查,跨浏览器测试由 SauceLabs 提供支持。
What are similar projects?hyperapp, alpine, vue, svelte, angular.js, vuex, socket.io-client, riot
Creator
jashkenas
Size
26.6 MB
Stars
28.1K
Updated
CommitOct 13
Age
16y
Commits · 90 Days