4 ms·
I think clojure's use of higher order functions is very well suited for this. With only a "#" in front the code becomes a lambda function. This pretty much make
by radu_floricica 17y ago
I think clojure's use of higher order functions is very well suited for this. With only a "#" in front the code becomes a lambda function. This pretty much makes the whole concept of handler functions void - or at least trivial.
But I'm not sure if it will work out in the end... and I mixed this with liberal use of metadata and thrown away SQL too... mostly I try to go as far as I can and see where I trip. It's fun.
And it does make for some terse code. This for example is the code for changing the person responsible for a brief:
(html-select (cons {:id 0 :name "- No account -"}
(filter #(:is-account %) @users))
:selected (:account brief)
:onchangefn #(do
(passoc briefs (:brief %)
:account (Integer/parseInt (:value %)))
(return-from briefs (:brief %))
:onchangeparams (str "&brief=" (:id brief)))
And this really is all of it. No html, no sql, nothing.
- swolchok 17y agoOK, now you want to develop a desktop version of your application with a snazzy graphical interface. Good luck.