6 ms·
While I haven't had any time to play with ClojureScript, Om, React, etc. I've been keeping a pretty watchful eye, because the stack looks very appealing. One b
by lftl 13y ago
While I haven't had any time to play with ClojureScript, Om, React, etc. I've been keeping a pretty watchful eye, because the stack looks very appealing.
One bit that doesn't look appealing to me in Om, or Cloact is the tree-building. Is there anything in ClojureScript and React right now that will let me build templates in HTML and attach functionality via attributes Angular-style?
- brandonbloom 13y agoHopefully not! Why don't you give React a whirl and try not to force Angular thinking on to the React model. Shouldn't take more than an hour or two of investment to make a small toy app to experiment with.
- swannodette 13y agoAs I suggest below I don't see why you could not compile to Om or Cloact from HTML for a friendlier presentation for designers. Still I don't think Cloact nor Om DOM syntax is particularly unapproachable for designers - I think we need some good documentation and some compelling, friendly walk-through demos (Light Table anyone? :)
- airlocksoftware 13y agoPlease yes (on the Light Table demo). I know my way around ClojureScript, and I cannot get the Om TODOMVC demo to run in Light Table. If I get it figured out, I guess I'll be the one writing the tutorial, but so far no dice.
- craigching 13y ago> Still I don't think Cloact nor Om DOM syntax is particularly unapproachable for designers It's not just designers who appreciate using declarative markup over programmatic syntax! Of all the people who might understand this, I'd have thought you would be the first in line (as a fan of your work on core.logic and inspiring me to learn prolog)!
- swannodette 13y agoI find the React approach very declarative. Certainly competitive with most of the templating systems I've used, few of which I can speak very highly of :)
- craigching 13y agoI've used both dojo dijit and angularjs templates. I admit, I haven't done more than read your blog on Om, but I very much prefer the html declarative templates of both dojo and angularjs ... show me how Om/React beats direct html templates, I'm not seeing it. I'm not trying to be too non-constructive critical here, I fully admit I haven't tried Om/React, just looked at your blog post about it. So what am I missing?
- jacobolus 13y agoUsing clojure data syntax instead of SGML-like syntax doesn’t make the language any more or less “declarative”. Assuming you use the same features in your templates, the clojure version is precisely as declarative as whatever other template language. However, if you use the clojurescript version [or in standard React, the javascript- or coffeescript-looking version], then you suddenly have a bunch of potential extra features which in some cases are invaluable. (Or you can deliberately ignore those if you prefer.) When you say “declarative” I think you might really just mean “familiar for html experts”. But most html expert should be able to learn the new syntax quite easily, since the relevant parts are less verbose than html, quite regular and straightforward, and semantically equivalent. If you feel like putting your templates in separate files from your logic, or writing them using an SGML-like syntax, that’s pretty trivial to do in any of these environments.
- craigching 13y agoSounds like I need to give it a try, thanks for the feedback!