|
|
|
|
|
by _mql
5683 days ago
|
|
Just had a little discussion at #documentcloud regarding UI components (in terms of ui-widgets) that can be implemented using Backbone.View in very efficient ways. Here's just an example of a MultiString editor, that we're using for our document authoring engine. https://github.com/michael/substance/blob/master/src/backend... You can try out the editor at http://substance.quasipartikel.at:3003/# by clicking on the document's title (at the sheet) to activate the doc annotation pane. I used to use the jQueryUI widget factory for that task, but Backbone.View feels way more natural. Esp. declarative events and the fact, that Backbone encourages you keep an internal state, and re-render on demand instead of tying data to the DOM. Regarding UI components in general... imo, it would be better to have a number of widgets (each one targeting a specific use-case) instead of having one widget that takes 100 options handling a number of use-cases. This option-madness is what drives me crazy sometimes... Same is true for visualizations. developers should keep the codebase small, reusable and should not try to solve 100 use-cases at once — at least this was my conclusion. As we agreed in the channel, it makes sense to break UIs up in to small functional pieces, each being a view in their own right. Thoughts? -- Michael |
|