-
Notifications
You must be signed in to change notification settings - Fork 151
Enlive N(ext)
cgrand edited this page Feb 4, 2013
·
13 revisions
Notes on the direction of Enlive. This is not a road map.
- First-order transformations
- Removes distinction between templates and snippets
- Need to define a new seq type and a
as-nodes
function - Seq support is nearly mandatory for Ring
- Or explicit call to a serialization fn?
- snippets sub selection through
:only
option
- Need to define a new seq type and a
- New execution model for templates:
- parallel execution of selectors
- node selectors as a special case of fragment selectors
- as soon as a selectors match, the matching fragment is plucked out (and saved with the state-machine state)
- the remaining tree can be partially serialized
- More options
- parser, encoding, http client, serializer...
- standard way to specify them
- move away from TagSoup (better html 5 support)
- new state machine (shared with regex)
- static CSS-in-string selectors
- no dynamic support
- dynamic only through [:traditional :selectors]
- no dynamic support
- hiccup-like helper
- new macro to replace template/snippet
- ternary rhythm (selector op data)
- extensible (net.cgrand.xmacros)
- paves the way for Clojurescript
Sample
(deftemplate name resource
docstring?
:opt1 XXX :opt2 YYY
([args]
sel1 op1 data1
sel2 op2 data2)
other arities)