Fork me on GitHub
#biff
<
2023-11-21
>
Lyn Headley12:11:42

One of the nice things about biff and other clojure web frameworks is structural editing of hiccup. When i think of other languages "integration" with html, and the experience of editing html documents as strings or "templates" - I smile.

4
Martynas Maciulevičius13:11:16

I don't see any problems:

public Object[] displayMyString(badge: Object[], myString: Object[]) {
        return new Object[]{[
                "div", 
                Map.of(
                    "style", Map.of("background-color", "red")
                ),
                new Object[] {
                    "div",
                    badge, 
                    new Object[]{
                        "p",
                        myString
                    }
                }
            ]
        }
    }
On a similar note: We also have integrations like honeysql where you have the select statement as a data structure instead of string manipulation or a thousand of factory functions.

😆 6
Lyn Headley15:11:08

I think in clojure it is much easier to take the bottom "p" and make it wrap around the top "div", using structural editing

Martynas Maciulevičius15:11:16

I expected a rage of Java developers because "it's not OOP and 'look how many maps you created'" 😂

🙂 1
chromalchemy19:11:04

I agree. Structural editing is a killed app, often taken for granted. Applyi g it to html nesting helps so much!