Giter Club home page Giter Club logo

ribcage-view's People

Contributors

cscheye avatar cstumph avatar joeybaker avatar techwraith avatar tedbreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ribcage-view's Issues

A `bindEvents` plan

What if we remade bindEvents to have 1) a nicer API, and 2) auto-call stopListening?

Here's my thought: we could copy the backbone events object syntax:

, events: {
  'click .mything': 'onMyThingClick'
}
, bbEvents: {
  'change:key model': 'onModelChangeKey'
}
  • keys would be split on a space, just as the events hash does
  • the first part of the key would be the event to listen to
  • the second part of the key would be the object to listen to. this. would be assumed. If omitted, it will listen on the view itself
  • the value would be the name of the function to call
  • bindEvents would then become the method that parses this object. If over-ridden, (as we do now) things would behave as normal. Else, it just parses the bbEvents object. That makes this backward-compatible.

Subviews lose their events

Here's a requirebin: http://requirebin.com/?gist=7127537

It looks like rendering a parent view clobbers the events on all the subviews.

This means that on every render, all my subviews have to be reinitialized, which is pretty expensive.

I'm not sure if this is a problem with the way i've structured my application or an actual bug in ribcage-view. I feel like i should be able to render a parent view without wiping out all my subviews.

Integrate some of the ideas from wheelhouse-view?

https://github.com/joeybaker/wheelhouse-view is a previous project that I worked on that has a lot of the same ideas of this project. Maybe steal some of them?

Ideas

optimize a large number of subview rendering

#7 talks about using a document fragment to optimize sub-view rendering. An idea I've always had it to further optimize for a large number of subviews (> 50~ish?) and use requestAnimationFrame to batch up the rendering so that the DOM doesn't lock up.

Tests?

Would love some tests if possible :)

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.