Does haxe-dom get the attention it deserves?

91 views
Skip to first unread message

Cambiata

unread,
Nov 23, 2015, 1:42:52 AM11/23/15
to Haxe
Hi guys!

There's a lot of buzz about React, Mithril and other client and/or isomorphic dom-handling libraries. (Now we have Franco's Doom also.)
Can't help asking myself (and you) if Sam MacPherson's haxe-dom library gets the attention it deserves?
https://github.com/Blank101/haxe-dom

I've tried both React and Mithril, and I like the approach, but for me nothing comes close to haxe-dom.
No jsx or similar to adapt, just building the dom using simple standard classes - no matter if it's server (neko or node in my case) or clientside js.
Populate custom data on the serverside and it's recognized transparently on the client.
Some light macro magic for writing clientside code that's hidden when compiling serveside.

Ok, no virtual dom. No Flux or unidirectional data flow suff. No semi-declarative approach.
Had some issues on IE, but these could be easily sorted out.
In all, very simple and straightfoward. The only thing that's breaking standard Haxing is that it doesn't allow anonymous
event handlers today - but I'm sure that this could be sorted out with some simple macro.

Sam's documentation isn't really on par with the library itself right now,
but here's my own example - fwiiw:
https://github.com/cambiata/haxe-dom/tree/master/example
It's not a an example of good architecture, but of how custom data is populated on the server and used on the client.
Here are the dom "components" - the index html, a list and list items:
https://github.com/cambiata/haxe-dom/blob/master/example/src/Components.hx
Here's the simplistic server side main:
https://github.com/cambiata/haxe-dom/blob/master/example/src/Server.hx
And here's the clientside main:
https://github.com/cambiata/haxe-dom/blob/master/example/src/Client.hx

More detailed info on Sam's page:
https://github.com/Blank101/haxe-dom

From my perspective, this is the ideal isomorphic approach.
What you say? Are there drawbacks in this that I just don't see yet?

/ Jonas






 
 

Sam MacPherson

unread,
Nov 23, 2015, 3:20:50 PM11/23/15
to Haxe
Hey thanks for this Jonas. I haven't had a chance to use React (yet), but I've played with other JS frameworks and I do appreciate using haxe-dom as well. Documentation has never really been my strong suit, so feel free to contribute in this regard. :)
Reply all
Reply to author
Forward
0 new messages