Feedback on Precept library

Hey! Sorry for not seeing this sooner.

Precept is still in alpha and not in production use that I’m aware of. It may well be production ready (it’s a wrapper around Clara rules and Reagent mostly). We take removing the “alpha” tag really seriously though and won’t remove it until we’re convinced beyond doubt it’s ready and users won’t suffer as a result of using it.

We could definitely use more feedback from people using it to build anything. Most of the QA is being done by me, which means it’s slower than it could be and limited to my experience and perspective. It’d be valuable to have more perspectives on it, and issues!

My real word experience using it consists of building the todomvc, the fullstack example, a drag and drop example just to see if that was performant (it was). Most recently I’ve used it to develop precept-devtools, which should be released soon.

I really do love it. I’m consistently amazed at how much it simplifies front-end development, state management, and programming in general. Things just seem to work. Rules are a much more natural way of reasoning and expressing logic for me. Going back to work on Mondays where we’re using Javascript’s latest and greatest – GraphQL, Apollo, Redux, redux-saga – is hell because I know there’s a much better way of doing things.

The devtools have a lot going on and I’ve found some problems like data munging to be more difficult to solve using rules and relational data structures. In those cases I’ve found it seamless to use Clojure/Clojurescript alongside rules instead of trying to use them for everything (which I kind of took as a challenge to myself before). I still try using rules for everything first but back off if it starts to seem silly. Using each for what they seem best at.

It’s always an option to use other stuff – a Reagent atom to hold temporary state, conditional statements inside components, a sort or filter function inside a component, or whatever you like. As I got more comfortable with using the rule engine though, I found myself not doing that as much and using Precept for pretty much everything. Precept and Clara handle updates performantly (including keypresses, mouse movements), and if I can put all state in the rules session (i.e. global state atom) then any rule can process and respond to anything that happens in the app.