Feedback on an article I am trying to write (React JSX, Reagent)

206 views
Skip to first unread message

John

unread,
Feb 3, 2015, 5:38:01 AM2/3/15
to clojur...@googlegroups.com
Hi everybody!

I am trying to write an article about a topic I find interesting: embedded templates.

Please, read and give me feedback, if you find the topic interesting. English is not my first language, and I would appreciate all help to make it clearer.

Does it make sense? Or should I try to make the examples better? Does anyone agree with me?

https://medium.com/@johanberling/embedded-templates-in-react-12ca529df234

Marc Fawzi

unread,
Feb 3, 2015, 10:33:47 AM2/3/15
to clojur...@googlegroups.com
Hi John,

Thank you for sharing your work in progress.

Tomorrow I'll dedicate a couple hours to go over this, and I'll review it as a brand new user of CLJS/Reagent/React, and at least give you feedback about clarity.

I don't think we'll be using JSX but I'm very open minded to see what you've worked out!

Thank you

Marc 


--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Johan Berling

unread,
Feb 3, 2015, 11:12:16 AM2/3/15
to clojur...@googlegroups.com
Hi Marc!

Don't expect it to be a good introduction to Reagent. 

By the way, I think your choice is a wise one. Reagent is really nice to work with.


You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/huTCgQic1wc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.



--
Hälsningar
Johan

Marc Fawzi

unread,
Feb 3, 2015, 1:21:28 PM2/3/15
to clojur...@googlegroups.com

At last SF CLJS meetup Sean Grove mentioned to me a framework called Kioo https://github.com/ckirkendall/kioo which is for Om which introduces another kind templates

In our team, we create the HTML markup and assign CSS classes the designers make visual mock ups, so "templating" is not necessary to expose markup to designers etc, and I find the hiccup syntax (I'm familiar with Jade) pleasant. 

I've asked others who are more conversant in Reagent/CLJS to take a look too,

Will let you know of any input! 

Marc

Mike Haney

unread,
Feb 3, 2015, 2:12:22 PM2/3/15
to clojur...@googlegroups.com
FYI, Kioo works with Reagent as well.

Marc Fawzi

unread,
Feb 3, 2015, 4:56:29 PM2/3/15
to clojur...@googlegroups.com
Some semantic confusion on my part. Sorry.

I use the word "template" to refer strictly to out-of-language templates like HTML markup prototypes that can be cloned, augmented and populated based on data, or the old string substitution and innerHTML type templates. I have not yet started referring to DSLs as templating systems, but you're right they are.  

For me, being new to ClojureScript, all the code pasted below looks just like ClojureScript. If I didn't know about Reagent I would think that ClojureScripts came with HAML/Jade like support built-in.

The Kioo project is interesting but just like your imagined future version of Javascript and just like JSX it does not gel/jell well with the host language. Visually and mentally, it's hard for me to read anything other than the Jade/Reagent style code. 

I love Reagent for the simple reason that when I read the stuff below I simply do not get STRESSED out 

(defn form [field-wrapper fields]
[:form (map field-wrapper fields)
[:button {:type "submit"}])
(defn wrapper [{:keys [label-text input]}]
[:label
[:span label-text]
input])
[form wrapper 
[{:label-text "Name", :input [:input {:type "text"}]}
{:label-text "City", :input [:input {:type "text"}]}
{:label-text "Age" , :input [:input {:type "text"}]}]]
It's very pretty and clear from a symbolic/cognitive point of view. 

But I have to say I fail to zoom in on the point of the article. What is the argument you're making?  If it's that JSX is like Reagent then I strongly disagree, even if they are logically doing the same thing. It's just that when I look I JSX I want to run away and when I look at Reagent I have that pleasant feeling you mentioned. They're a world apart in terms of the intangible feel.

 


Johan Berling

unread,
Feb 5, 2015, 2:28:21 AM2/5/15
to clojur...@googlegroups.com
Thanks for the feedback. I think you are right, it is an unfocused article. I understand if you do not get my point, and I will not publish it.

What I tried to say, was that embedded templates makes it easier to structure our application code, than templates written in a more traditional way.


Marc Fawzi

unread,
Feb 5, 2015, 7:37:02 PM2/5/15
to clojur...@googlegroups.com
Yes! totally agreed, and I'd like to see the article making that clear, and then it'll be an insightful article my opinion, especially for those who may not have seen jade/haml style templating.
Reply all
Reply to author
Forward
0 new messages