wilzbach / msa

Modular BioJS compoment for a multiple sequence alignment
http://msa.biojs.net
Boost Software License 1.0
168 stars 79 forks source link

Replace the custom backbone model with lightweight React (or similar) #145

Closed wilzbach closed 2 years ago

wilzbach commented 8 years ago

When I started the MSA at some point I realized, that the MVC model in backbone is quite well suited. We have some data and all the view listen to it and update themselves accordingly.

However as backbone never supported child views out-of-the-box, I created those three packages

https://github.com/wilzbach/backbone-thin https://github.com/wilzbach/backbone-viewj https://github.com/wilzbach/backbone-childs (backbone with subviews)

It works okayish currently, but has a couple of disadvantages

I haven't wrapped my head around the best way to solve this, but most likely we want to go for a light-weight react-like library.

This step requires quite a lot of effort, but ideally with this step we can make the MSA a lot more custumizable and easier to develop with.

RiotJS looks to be promising ...

sillitoe commented 8 years ago

marionette?

http://marionettejs.com/

Seems to have sub views amongst other things - haven't used it though...

wilzbach commented 8 years ago

Seems to have sub views amongst other things - haven't used it though...

I looked at it when I wrote backbone-childs. The difference is that with the current approach you need to define your subviews manually where with marionette it creates them automatically based on a collection, but back then it was in it early days and manually inferring order nor additional views wasn't possible and a huge bundle. That being said, moving to that would certainly be an improvement, but I was more saying that backbone is a very old framework and it was never built for web components and with compatibility to IE8. This msa.g is based on the assumption that there is no Object.observe.

Anyways I was just throwing this issue here, so that we can brainstorm about ways to go ;-)

sillitoe commented 8 years ago

Sure. I'm interested in the outcome / recommendation as I'm using bb in a different project (and the lack of subviews is already annoying...)

wilzbach commented 8 years ago

I found a great overview - https://www.sitepoint.com/react-alternatives-preact-virtualdom-deku/ They all look very promising.

wilzbach commented 8 years ago

They all look very promising.

I pushed a proof-of-concept branch at #165 - it is a nice drop-in replacement for backbone, but a lot more convenient to write, flexible and a lot faster :) Now we only need to figure the best way to replace the global event bus .g.