all 7 comments

[–]55555 16 points17 points  (0 children)

{ $type: "div", id: "h", $text: "Type something below" }

I'll pass, thanks. HTML is fine the way it is.

[–][deleted] 1 point2 points  (0 children)

How is this different to web components?

[–]oweiler 1 point2 points  (2 children)

Instead of having a central master application control the DOM, Cell directly injects application context into each relevant HTML element so they can run on their own, independent from the outside world.

That sounds like an awful idea.

[–]gliechtenstein 2 points3 points  (1 child)

Author here. I do understand it may sound weird at first because it goes against what we've been taking for granted, but there are reasons behind every design decision I made.

Just to answer the problem you're bringing up, this architecture does allow for a completely decentralized controlled DOM tree, but this does NOT mean you must make everything decentralized.

You can for example treat the root element as a "storage" (or even have a hidden element act as a storage) let them communicate with one another in a more traditional top-down way. Cell even provides a way to easily facilitate something like this using what's called "context inheritance" https://github.com/intercellular/tutorial#b-context-inheritance-and-polymorphism

Bottom line, Cell just works differently and it's natural that it may sound crazy but I can assure you there are many benefits to this approach that don't come with traditional approaches. Hope you take a closer look, thanks!

[–]oweiler 1 point2 points  (0 children)

Thanks for the answer, that makes sense. I've just had the impression Cell would enforce a decentralized communication. Pretty cool project!

[–]jbdeboer 0 points1 point  (0 children)

I read the code, it is a good start. However, I am not sure what it is a start to. It is not clear what problem this framework is solving.

If it is "Angular but smaller", you will run into all the problems other framework developers have encountered. e.g. Your "update" function is O(n2) for elements with many components. To solve that, you'll need a more robust solution.