-
Notifications
You must be signed in to change notification settings - Fork 79
first experiment with prereact to replace labels #173
base: master
Are you sure you want to change the base?
Conversation
Had a chance to go through React tutorials - easier to see what this is doing now. Code certainly much cleaner and I'm very much in favour of that (JSX has my vote whatever the decision about Preact). Looks like their philosophy aligns well to msa - essentially lightweight (3kb) and fast (http://developit.github.io/preact-perf/). Not sure whether this will be able to fully replace Backbone though (if that was the intention). Is Preact more likely than Backbone to still be around in 3 years time? I guess even if it isn't, then React still will be. Biggest test will be the one you already mentioned - getting existing (documented) events to play nicely with Preact - wouldn't be great to change the documented events model straight after a 1.0 release(!). |
does this mean we can get our sequence alignments to do this? |
Excellent!
It will! And yes that's right - I want to kill backbone (with fire)!
Obviously I can't guarantee this, but (1) React will be there in 3 years and the API is very similar (think about it as underscore and lodash), (2) such a small library is a lot easier to maintain than the current custom backbone solution, (3) my custom backbone solution hasn't been maintained since it's creation in 2014, because I admittedly made some major mistakes.
Yes this will introduce a couple of breaking changes (once it's ready), but they are needed if we want to have a modern, light-weight, fast and flexible MSA Viewer, btw the "core" of the MSAViewer is the canvas which we don't need to touch. I am not entirely sure how to proceed, but I guess the best is that we start a |
Yes and no. What (Pre)-react provides is this fast virtual-DOM rendering based on a data store which we will use for all views. The sequences are currently drawn in a Canvas block which is currently pretty hard to update because it needs to know where to start and stop drawing. |
Sounds good. I've been using Backbone to write an app attempting to glue various components together and managing the relationships and events hasn't scaled well (in terms of complexity for my poor little brain). Probably my lack of experience more than anything else but (P)react keeps components simple and separate and that's generally good.
Agreed. I guess backwards-incompatible changes are precisely what major version releases are for... (as you probably guessed I was kind of joking about the animated sequence alignments, however now you mention it...) |
Presume you've seen this? https://facebook.github.io/react/tips/use-react-with-other-libraries.html |
Yep, that's how the Canvas will be a (Pre)-react component! Those {un,}mount events are really helpful! Btw if you think about it Backbone is actually rather similar to (Pre)-React - the view is updated based on the data, but just a better, more efficient API for it. They both even name their central method |
Just wondering if there are still interest in a |
Resurrected #165 after the great git purge event.