Ijk – Transforms arrays into virtual DOM trees
1–10 of 49 posts
Re: Ijk – Transforms arrays into virtual DOM trees
#2https://github.com/cwells/breve
I don't see a huge advantage over hyperscript (hyperapp and mithril both use it), but that is a ridiculously small codebase.
The JS hate is kind of funny around here, because when you dig into stuff like this, you realize that JS is very lispy in ways (it's easy to build up trees of HTML dynamically). In the mid aughts on r/programming people would rant and rave about the kind of stuff Smalltalk's Seaside could do. Now that's possible, most of the disadvantages have been worked out, and people hate it.
Can't win, can you?
Re: Ijk – Transforms arrays into virtual DOM trees
#3Reminiscent of Breve. https://github.com/cwells/breve I don't see a huge advantage over hyperscript (hyperapp and mithril both use it), but that is a ridiculously small codebase. The JS hate is kind of funny around here, because when you dig into stuff like this, you realize that JS is very lispy in ways (it's easy to build up trees of HTML dynamically). In the mid aughts on r/programming people would rant and rave a…
Thanks, I hadn't seen Breve! I was looking for exactly this a while ago.
Re: Ijk – Transforms arrays into virtual DOM trees
#4Re: Ijk – Transforms arrays into virtual DOM trees
#5Reminiscent of Breve. https://github.com/cwells/breve I don't see a huge advantage over hyperscript (hyperapp and mithril both use it), but that is a ridiculously small codebase. The JS hate is kind of funny around here, because when you dig into stuff like this, you realize that JS is very lispy in ways (it's easy to build up trees of HTML dynamically). In the mid aughts on r/programming people would rant and rave a…
Re: Ijk – Transforms arrays into virtual DOM trees
#6Improve it a little bit more by by removing the single quote by turning the html tags into functions that accepts 2 arrays: the attributes and the child elements, by this time you will come across with elm in which expressing the html document tree fits perfectly in the language syntax and semantics.
That's high-value in a language like Elm because you can refine element-generating functions (e.g. not allow children elements for empty elements), it's not really useful in a dynamically typed language.
Re: Ijk – Transforms arrays into virtual DOM trees
#7Re: Ijk – Transforms arrays into virtual DOM trees
#8I like the syntax, but I have to say that I prefer JSX. The real advantage of JSX is that it's very similar to HTML and developers have been reading, mentally modeling and reasoning about HTML -> DOM translation for decades.
Even with decades of knowledge, I think you'll find that devs can transition to the non-html model really, really quickly, and then it's nice because everything is a single uniform language.
Re: Ijk – Transforms arrays into virtual DOM trees
#9At that point, I hadn't really done much react-style apps - will have to see how well that works with React!
Re: Ijk – Transforms arrays into virtual DOM trees
#10I like the syntax, but I have to say that I prefer JSX. The real advantage of JSX is that it's very similar to HTML and developers have been reading, mentally modeling and reasoning about HTML -> DOM translation for decades.