Home - MagnusThor/BobTheBinder GitHub Wiki

#Bob The Binder wiki

##About Yet another MVVM framework - Bob The Binder is a tiny JavaScript framework for Model-View-View-Model that mainly is designed for real time applications. Awesome or super - heroic ? No, it just reduces the list of things you have to worry about.

At this url you can find a simple realtime todo app using Bob The Binder -

http://magnusthor.github.io/BobTheBinder/todo/default.html

At the following url you find an example using WebRTC and Bob The Binders ArrayBuffer (BinarySupport)

http://magnusthor.github.io/BobTheBinder/fileshare/

##Requirements

BobTheBinderJS works without any polyfill on the following browsers:

  • Google Chrome 36+
  • Opera 23 +

and with polyfill's applied BobTheBinder runs smoothly on the following browsers ( tested per 5th of Maj 2015)

  • Firefox 36+
  • IE 10+

As BobTheBinderJS relies on Object.Observe a polyfill is a requirement for browsers that natively don't support that particular API

##Data-binding

Declarative data-binding using Bob is a intuitive way of keeping the view and model syncronized. This is awesome because it minimizes DOM manipulation from the list of things you have to worry about. It doesnt matter if the model or the view changes, Bob makes sure it works both ways!

##Native JavaScript

Unlike many other frameworks, there is no need to inherit from roprietary types in order to wrap the model in accessors methods. Bob expects plain vanilla JavaScript objects. This makes your code easy to maintain,reuse, and attach or de-attach from Bob.

##How does it work?

This is the most simple example.

###JavaScript

var ViewModel = function () {
    this.item = {
        name: "John Doe",
        age: 40,
    }
};

var vm = new ViewModel();

$(function() {
    Bob.apply(Bob.binders).bind($("#app"), vm);
});

###html

<div id="app">
    <p>
        The value if item.name is 
        '<mark data-bind="text:item.name"></mark>'
    </p>
    <div>
        <label>Name:</label>
        <input type="text" data-bind="value:item.name" />
    </div>
</div>

##More basic examples

More examples can be found at the following url

http://magnusthor.github.io/BobTheBinder/

##Documentation

Right now the development and documentation is in progress. We still are working on the "Notifiers" , a feature of Bob that simplifies and gives the opportunity to easily add bi-directional-data-synchronizations in real-time this not the main focus at the moment.

A first version of the notifier implementation can be found on - https://github.com/MagnusThor/BobTheBinder/wiki/8.-Notifiers

The Wiki contains a brief description of what BobTheBinderJS contains.

##Roadmap

TBD

##Todo app

http://magnusthor.github.io/BobTheBinder/todo/default.html/

##Licence

The MIT License

Copyright (c) 2015 Magnus Thor

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub-license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

⚠️ **GitHub.com Fallback** ⚠️