Fork me on GitHub
#keechma
<
2016-06-28
>
roberto16:06:56

the to-validator function in the forms example seems to be generic and helpful enough that it could probably be included in the forms library?

roberto16:06:24

it is something that I see myself having to copy/paste for every new project

mihaelkonjevic17:06:47

it’s not really generalized and there might be better ways to write it. it depends how you would want to format the validations map. But I agree that a generalized solution might make sense

mihaelkonjevic17:06:42

also I’m not sure If you’ve seen this, but Keechma Forms allows the best validation UX 🙂 https://medium.com/wdstack/inline-validation-in-forms-designing-the-experience-123fb34088ce#.mdeu0s4br

roberto17:06:55

hadn’t seen it 🙂

bocaj19:06:46

Hadn't read it. That's why I picked keechma to start learning, though. I'm trying to introduce validations on a wonky set of data in an HR context

bocaj19:06:09

I'd love to something like this work out for the poor folks that do data entry. http://blog.cognitect.com/blog/2015/5/14/breeze-ehr-to-simplify-healthcare-with-clojure-and-datomic

bocaj20:06:53

Life lesson "Hybrid — reward early, punish late — approach"

bocaj23:06:04

(defrecord Controller [main-app]
  controller/IController
  (params [_ route-params] true)
  (handler [this app-db-atom in-chan _]
    (let [main-app (:main-app this)
          user (cks/get :current-user)]
      (if user
        (start-app! main-app app-db-atom)
        (controller/dispatcher app-db-atom in-chan
                               {:login (partial login main-app)})))))

bocaj23:06:14

vs

(go (start-app! main-app app-db-atom)

bocaj23:06:54

So everything delegated from a controller must be async. Is this correct? Understandable style?