-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClojureScript? #7
Comments
Hi Paul, Work on Enliven has been a bit slow after the initial sprint. Clojurescript How did you envision the interaction of Enlive(n) and CLJS? Thanks, Christophe PS: Sorry for the delay this message lingered in drafts for no reason. On Mon, Jun 2, 2014 at 11:37 PM, Paul Lam [email protected] wrote:
On Clojure http://clj-me.cgrand.net/ |
What do you mean "The goal is to have one template definition and run it everywhere"? I totally missed that in the readme. Would it be able to do what Enfocus does? Do you envision Enliven to work for client-side cljs projects too? |
+1, curious to hear more thoughts from @cgrand on the high-level direction questions from @Quantisan thanks. |
@Quantisan @limist my stated goal for Enliven (when I get time/funding) is to create a continuous "templating" system. How do I plan to achieve this: the template depends on a model (which is accessed/scoped by lenses), when the user "compiles" a template he/she provides a description of the "lifecycle" of each piece of data of the model. (By lifecycle I mean: server-only, server-push, client-transient, client-persistent (eg local storage), client-push, and replication/conflict strategies.) [1] I've worked on being able to compose templates and the underlying encoding. I tested directly emitting UTF-8 bytes (skipping encoding for static parts), I experimented with directly emitting compressed output too and I also explored using (direct) bytebuffers and gather writes to reduce copying. |
I'm pretty sure it all sounds fuzzy and hand wavy. |
I'm not sure what you mean by reactive or dynamic. Are there examples of the system you're trying to build? Also, wow! I think that the objective is to build a templating system wherein members can be compiled by just the server, just the client, or both the client and the server, and the client can synchronize a scope when its requirements are met (lifecycle) and javascript is enabled. In the event javascript isn't available, the client at least gets the evaluated template. Let me know how on track this is. Also, this might be of interest to others who are also catching up: |
What's a template? A template describes a binding between representation and data. In conventional templating engines this relation is one-shot: the representation is only in sync with the data at render time. Traditionally keeping the representation up to date was achieved through different means:
(I've probably forgotten a couple of options.) By making this binding more declarative in Enliven I expect to be able to use it both server-side and client-side but also to have the client picks up where the server has left (so the server may prerender with whatever it knows from the model and the client is then in charge of updating – less "please wait, initializing" time for the user, better for SEO). Of course it means that Enliven will have to provide way to handle events too (so as to update the model, the update to the model triggering sync and repaint). |
That's a correct approximation however I don't promise enliven rendered templates to be fully usable for nojs clients. Just a bit less useless. |
Any interest in making this portable for both clj and cljs with cljx? Don't know how it might work yet, but if it does, this might save some duplicate efforts, i.e. enlive vs enfocus.
I can look into it and help out you're up for it.
The text was updated successfully, but these errors were encountered: