Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design HTML Bindings #8

Open
staab opened this issue Oct 25, 2014 · 2 comments
Open

Design HTML Bindings #8

staab opened this issue Oct 25, 2014 · 2 comments
Assignees
Milestone

Comments

@staab
Copy link
Owner

staab commented Oct 25, 2014

Not sure how to go about this, but we'll probably want something pretty declaratively client-side model driven, listening for updates on the models and updating the DOM in response. When updating the DOM, it seems more correct from what I've seen to have various pre-defined classes that HTML can include, rather than the javascript going out and finding html based on certain criteria.

@staab staab added this to the 0.1.0 milestone Oct 25, 2014
@jpurdy
Copy link
Collaborator

jpurdy commented Oct 25, 2014

"listening for updates on the models"
What is the mechanism for this? Is this mechanism related to http://backbonejs.org ? I don't understand what this looks like; can you (or anyone else out there) point me to where I might get a little more information? Thanks.

@staab
Copy link
Owner Author

staab commented Oct 25, 2014

Yeah, I honestly don't know the mechanism either. I've used knockout.js
http://knockoutjs.com/ a little bit, and there are also Ember, Angular,
Backbone, and lots of others.

I think the basic concept is this:

  1. Write some javascript that defines predefined behaviors for certain
    identifiers in your html. When it finds elements matching its search
    criteria, it modifies them and listens to modifications on them in a
    predefined manner.
  2. include the predefined identifiers (classes or data attributes) in your
    markup for elements you want to be processed/analyzed/synchronized by
    javascript.

This differs from the jquery paradigm in that the html is very much a
consumer of a data api defined in javascript. The thing is, html can't do
much on its own, so event bindings are still the mechanism for making it
happen. This lends to code re-use, since you're defining data structures
and applying them to disparate ui elements, rather than defining disparate
ui elements and accomodating your data structures to them.

On Sat, Oct 25, 2014 at 9:07 AM, jpurdy notifications@github.com wrote:

"listening for updates on the models"
What is the mechanism for this? Is this mechanism related to
http://backbonejs.org ? I don't understand what this looks like; can you
(or anyone else out there) point me to where I might get a little more
information? Thanks.


Reply to this email directly or view it on GitHub
#8 (comment).

@staab staab assigned feus4177 and unassigned jpurdy Nov 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants