Chaplin

Chaplin是使用Backbone.js库的JavaScript应用程序的架构。(Chaplin is an architecture for JavaScript applications using the Backbone.js library. )

Github stars Tracking Chart

Chaplin 是使用Backbone.js库的JavaScript应用程序的架构。 Chaplin通过提供具有经过验证的设计模式和最佳实践的轻量且灵活的结构来解决Backbone的局限性。Chaplin使您能够快速开发可扩展的单页面Web应用程序; 使您能够专注于在Web应用程序中设计和开发底层功能。

Chaplin 特性

  • 更好地支持CoffeeScript类层次结构以及对象组合
  • 更好的支持继承:从整个原型链自动合并声明性绑定的事件(和一些其他道具)。
  • 严格的内存管理和对象处置
  • 可选的Underscore和jQuery,使用 Exoskeleton
  • 模块封装和延迟加载使用 AMD/common.js 模块
  • 使用Mediator和发布/订阅模式的跨模块通信
  • 用于管理各个UI视图的控制器
  • 将URL映射到控制器操作的Rails样式路由
  • 网址逆转,允许动态构建应用网址
  • 路由调度和顶级视图管理器
  • 扩展模型、视图和集合类,以避免重复和强制执行约定
  • 用于简单和智能列表呈现的集合视图

Overview

Name With Ownerchaplinjs/chaplin
Primary LanguageCoffeeScript
Program languageCoffeeScript (Language Count: 2)
Platform
License:Other
Release Count19
Last Release Name1.0.0 (Posted on 2014-01-23 12:03:55)
First Release Name0.1.0 (Posted on )
Created At2012-02-11 14:14:04
Pushed At2022-12-30 06:52:38
Last Commit At2022-12-30 07:52:38
Stargazers Count2.9k
Watchers Count95
Fork Count230
Commits Count1.7k
Has Issues Enabled
Issues Count484
Issue Open Count42
Pull Requests Count334
Pull Requests Open Count3
Pull Requests Close Count85
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Chaplin

Build Status

An Application Architecture Using Backbone.js

Introduction

Chaplin is an architecture for JavaScript applications using the Backbone.js library.

All information, commercial support contacts and examples are available at chaplinjs.org, comprehensive documentation and class reference can be found at docs.chaplinjs.org.

Download the latest release on chaplinjs.org. See below on how to compile from source manually.

Building Chaplin

The Chaplin source files are originally written in the CoffeeScript meta-language. However, the Chaplin library file is a compiled JavaScript file which defines the chaplin module.

Our build script compiles the CoffeeScripts and bundles them into one file. To run the script, follow these steps:

  1. Download and install Node.js.

  2. Open a shell (aka terminal aka command prompt) and type in the commands in the following steps.

  3. Change into the Chaplin root directory.

  4. Install all dependencies

    npm install
    
  5. Start the build

    npm run build
    

This creates these files in build dir:

  • chaplin.js – The library as a compiled JavaScript file.
  • chaplin.min.js – Minified. For production use you should pick this.

Running the Tests

Chaplin aims to be fully unit-tested. At the moment most of the modules are covered by Mocha tests.

How to run the tests:

  1. Follow the steps for building chaplin.

  2. Open a shell (aka terminal aka command prompt) and type in the commands in the following steps.

  3. Change into the Chaplin root directory.

  4. Start the test runner.

    npm test
    

or alternatively, if you want code coverage reports

npm run coverage

Generated code coverage reports may be viewed by opening coverage/index.html in your browser.

Ending

The Cast

The Producers

To the top