HTTPS SSH

ModelView: Fast templates

ModelView is a simple templating system that binds JavaScript to good ol' HTML templates using HTML5.

It was inspired by AngularJS, but has somewhat different design goals. The goal of ModelView is to be as light and fast as possible, and rely on standard APIs to get the job done: it currently does not have any dependencies at runtime.

It allows to bind data to DOM elements, and be able to refresh the DOM when the data changes, and vice versa, either automatically or on demand, or when a certain event is fired.

It provides a few common constructs, like binding values, looping, conditionals, events, and so on. It is also easily extensible, and new constructs can be added fairly quickly with a few lines of code.

Contributions are welcome.

Features

Current features

  • Model bindings
  • Scope and nested scope resolution
  • Common directives: Value, Model, Condition
  • Foreach loops via the Each directive
  • Event bindings directive

Upcoming features

  • Garbage collector
  • Async rendering
  • Event optimisation
  • Model shorthand directives (if, each)
  • Model versioning and change history

Installation

Simply install using npm:

$ npm install modelview

Usage

You can check the documentation at http://modelview.io/docs, and/or check the test cases https://bitbucket.org/overridelogic/modelview/raw/master/tests/integration.html for examples!

Building

When building from source, use the build script:

$ npm run build

It creates a distribution in the dist/ directory, and documentations in build/docs/.

Contributing

Contributions are always welcome. If you want to contribute:

  • Fork the project
  • Test your code (see below)
  • Push your code
  • Submit a pull request

Testing

Contributions must pass both the tests and styling guidelines. Before submitting a patch, make sure you run:

$ npm run test && npm run validate

About the project

Change log

See CHANGELOG https://bitbucket.org/overridelogic/modelview/raw/master/CHANGELOG.md.

Licence

MIT License: see LICENSE https://bitbucket.org/overridelogic/modelview/raw/master/LICENSE.

Authors

Francis Lacroix @netcoder1 created ModelView while at OverrideLogic.