Giter Site home page Giter Site logo

copper.js's Introduction

#Intro

copper.js is a convention-based binding framework that flows between your HTML, view object, and view-model object and then wires them all up.

The primary goal of the current version of copper.js is to allow you to use a full-fledged MVVM implementation, but without much of the boilerplate that can often come along with such designs. To the extent possible, copper uses conventions to determine what events should be bound and what data should be synchronized. The default conventions are name-based. (At present, there is no way to change conventions without modifying copper's source, but easy convention overriding is on the way.)

The closer your objects follow the conventions in place, the slimmer your code can be, letting the business logic that departs from boilerplate semantics shine through.

#Features

Future Auto-Binding Features

There are a number of features I plan to add to Copper in future releases. Generally they are all entered in the Issues list, but a few highlights include:

  • Auto-bind the disabled attribute of input elements.
  • Auto-bind ul, ol, and select children to an ObservableCollection
  • Auto-bind any element repetition to an ObservableCollection
  • Self-rendering views and template-based support for same.
  • Generate a simple ViewModel "bag of observables" from a hash of initial values.
  • Cu.Bindable: Bindable properties that are read-only via .val() and not observable, for syuncing on init only.

Stay tuned!

copper.js's People

Contributors

cammerman avatar

Stargazers

André Fiedler avatar Dan Giralte avatar  avatar Jonny Buchanan avatar Jim Cowart avatar

Watchers

 avatar James Cloos avatar

copper.js's Issues

Feature: Subview collections

Given template-based rendering of views, subview collections could facilitate auto-rendering of repeated children (simple examples: LI, OPTION, TD, TR)

Infrastructure: Refactor out redundancy of selector hash checks

Selector hash checking occurs in many steps of the binding pipeline, and the code for it is repeated in each case. It would be more useful to perform the association at the beginning of the pipeline and store it in the binding state object for reuse downstream.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.