doom library

192 views
Skip to first unread message

Franco Ponticelli

unread,
Nov 21, 2015, 5:36:44 PM11/21/15
to haxe...@googlegroups.com
Hello Haxers,

I just finished my first example (https://rawgit.com/fponticelli/doom/master/demo/00.todomvc/index.html) with a new library called Doom (https://github.com/fponticelli/doom).

The idea of the library is to provide a DOM View API (and just that) similar to ReactJS but taking advantage of a lot of Haxe features. First and most importantly everything is typed.

I am actively working on it so things change constantly. For the sample code have a look here: https://github.com/fponticelli/doom/tree/master/demo/00.todomvc

Enjoy,

Franco 

Justin Donaldson

unread,
Nov 21, 2015, 6:31:48 PM11/21/15
to Haxe
Awesome!

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Franco Ponticelli

unread,
Nov 21, 2015, 8:08:31 PM11/21/15
to Haxe
Thanks! Ideas on how to improve are very welcome ;)

Aaron

unread,
Nov 21, 2015, 9:58:57 PM11/21/15
to Haxe
Will there be a way to break up the js into multiple files?

Franco Ponticelli

unread,
Nov 22, 2015, 12:22:19 AM11/22/15
to Haxe
It is not the the scope of the library to do that. I believe there are solutions out there to do exactly that though. Personally I never felt like a need to have feature.

On Sat, Nov 21, 2015 at 7:58 PM Aaron <co...@seasonsoftware.com> wrote:
Will there be a way to break up the js into multiple files?

--

Timothy Farrell

unread,
Nov 22, 2015, 4:24:23 AM11/22/15
to Haxe
Good stuff here.  I've been learning React lately and I like your approach.  However, I find that React, as a library, is uninteresting since we also have Mithril, virtual-dom, etc.  What is really compelling is all the tools that have been developed around React.

React router is elegant for routing.  Director is another good option
Redux is certainly one of the best ways to manage state for large applications.

Do you plan to integrate such features into Doom or is it just planned to be a virtualDOM component library?

-t

Philippe Elsass

unread,
Nov 22, 2015, 5:39:39 AM11/22/15
to Haxe

Looking nice! What is the rendering strategy? Any diff-ing?

Franco Ponticelli

unread,
Nov 22, 2015, 12:09:10 PM11/22/15
to haxe...@googlegroups.com
I like the idea of keeping Doom as just the view portion of it and I am interested in looking into solutions like Redux for the state. Same would apply for something like Redux.

The principle in Doom is that a component can only updated itself and its children. It is a quite simple concept and in my opinion sets the expectation correctly.

--

Franco Ponticelli

unread,
Nov 22, 2015, 12:15:22 PM11/22/15
to haxe...@googlegroups.com
The rendering strategy is as follows:

  * a component has its method 'render' invoked
  * render() generates a tree of Virtual Nodes (in the code just Node)
  * if it is the first time that render was invoked the Node is transformed into HTML DOM directly
  * if it was not the first time the old Node and the new one are diffed and a Patch is generated. The Patch is applied to the HTML DOM. In this transition the new overriding component also obtains an instance of the associated DOM Element.

What might be confusing is that the components are never stored in their parents. They are created in a parent render(), used and lost. References might be kept internally to a component to perform actions or to self-update.

Confidant

unread,
Nov 22, 2015, 10:21:08 PM11/22/15
to Haxe
Cool! You do realise you need to support loading .WAD files, right? ;)

Franco Ponticelli

unread,
Nov 22, 2015, 11:31:44 PM11/22/15
to Haxe
It is only fair ;)

On Sun, Nov 22, 2015 at 8:21 PM Confidant <alter...@gmail.com> wrote:
Cool! You do realise you need to support loading .WAD files, right? ;)

--
Reply all
Reply to author
Forward
0 new messages