4 ms·
I'm a user of Backbone, Coffeescript across several projects - and generally a fan of your work. However, your comment makes me feel like you are missing what y
by jonmc12 15y ago
I'm a user of Backbone, Coffeescript across several projects - and generally a fan of your work. However, your comment makes me feel like you are missing what your users are saying and falling back on your opinions about code vs considering the actual utility of the library.
You can't say "we're talking about the style in which you think", and then say "the UI is your business", and then be disheartened when developers handle the UI with a library like knockout.js.
I write apps to provide a user experience and backbone only provides a conceptual model for a portion of this (specifically the model, collection / syncing). Its extremely clean and elegant.
However, backbone does not provide an elegant conceptual model for the UI/DOM. Using declarative bindings and JS generated templates is just fine from a coding point of view (I've built a few apps this way), but frankly its not a very powerful mental model - nor is it necessary consistent with the design patterns in backbone that make it shine.
I'll tell you the conceptual model of using a view model to control html templates is more empowering. I don't like the syntax and a lot of things about Knockout - however to me knockout is a nice abstraction on top of jquery event bindings, much like Backbone.sync is a nice abstraction on top of $.ajax.
- jashkenas 15y agoHey -- it's great to have the discussion. You describe a "nice abstraction on top of jQuery event bindings"... I'd be very curious to know, without any particular implementation in mind, what would you consider to be an ideal API to work with in JavaScript, to control these pieces of HTML UI? Do you have any (pseudo)code you could share?
- jonmc12 15y agoI created a quick doc to describe some of my ideals: http://jonmc12.github.com/BackboneIdeals/ http://jonmc12.github.com/BackboneIdeals/ - very quick obviously.. but I think it gets main points across: 1. A conceptual model that describes the input / output between DOM and user. 2. More explicit enumerations of event bindings 3. Explicit link between user interactions/events and constrained DOM manipulation - to match conceptual model. 4. Defining all viewable elements in HTML templates 5. Round-trip syncing between HTML and data models Let me know if you think inputs are interesting or would want any more detail around concepts.