Clojurians
#precept
<
2018-01-17
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

dadair05:01:43

Can precept be used for back-end applications? I have a server use-case that I think fits with re-frame/precept style, and given that I already use clara rules I think precept would be a good framework to adopt to enforce some consistency. I don’t need any rendering functionality, mostly interested in the EAV/subscription style/framework around Clara.

alex-dixon16:01:27

@dadair Hey. Sorry for the delayed response. You definitely can, but there are caveats. The EAV syntax and Datomic-style schema integration and fact types are Clojure compatible. Subscriptions are currently not. They depend on Reagent r/atoms and cursors, which are CLJS only (Note: I might actually be wrong about this so will research and if I am get back to you if so). So if your server is Clojure/Java I wouldn’t expect them to work at this time

alex-dixon16:01:42

That said I think it’d be fairly trivial to make changes that support different atom and/or cursor implementations to enable the same subscription model in Clojure

alex-dixon16:01:31

Actually after looking through the code I think we might just need to drop in a reagent cursor implementation for Clojure here https://github.com/CoNarrative/precept/blob/issue-19/src/cljc/precept/core.cljc#L292