Caution, my comments should be taken with a grain of salt. I've build prototypes with Clara in the browser but nothing of production quality. Therein could lay dragons... YMWV.
Ryan, Clara's author, uses it much more extensively on servers and such. His use cases are primarily JVM based but I hear it does quite well there. Alan -- *"Whatever you can do, or dream you can do, begin it. Boldness has genius, power, and magic in it. Begin it now."* - *Goethe* On Apr 20, 2015, at 3:35 PM, Marc Fawzi <[email protected]> wrote: Thank you for sharing this Alan! Its really interesting. Would Clara then work with something like Hipo? I like the distinction you make between it and mutation based reactions. Very interesting topic that deserves more discussion imo. Sent from my iPhone On Apr 20, 2015, at 2:56 PM, Alan Moore <[email protected]> wrote: On Mon, Apr 20, 2015 at 1:45 PM, Kurt Sys <[email protected]> wrote: > The basic stuff I need is really very similar. What I like about react, is > not the dom diffing as such, the 'should-update' mixin. This really can > make things way easier. It doesn't play as nice as I thought it to be > between rum and datascript queries, but it'll work. Datascript queries are > really amazingly powerful to me. I use them really a lot, and full dom > diffing might be pretty, or more, expensive compared to a 'should-update'. > > That said, I had been looking to clara before (for another kind of > project), but I pretty much like the idea of using it as 'database/query > engine'-someting. Would you implement something like the should-update on > component basis as well. I'm really very interested in your wrapper/library > and how it would work out. > The nice thing about Clara (and rule engines in general) is that you can declare that certain functions (RHS) are to be called when a set of conditions/queries (LHS) over your data evaluate truthfully. There is no need for "should-update" polling, it is more don't call us, we will call you - control is inverted. When a user or server event happens the handler code inserts the event data into the engine and then calls the fire-rules function to trigger subsequent actions based on the rule conditions. Clara does truth maintenance which is an awesome feature but in my use case I have to work around it slightly to accommodate transient facts/events. Not a big deal just something to keep in mind when first understanding how it works. I don't really see there being a need for a wrapper around Clara - you can use it as-is. I'm just trying to figure out the best way to integrate it in the client-side context. It was built with a particular set of use cases in mind that don't always match up with my experience with other rule engines that are more "mutation" oriented. Clara's rule engine is a value in the same way that Datomic's database is a value. This is super powerful but that means you need to organize your code slightly to take this into account. Alan -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- 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/kCdOQzPNAug/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
