|
@@ -24,6 +24,9 @@ A baseline Clojure stack that runs on any and all platforms, that is nice to dev
|
|
* No bullshit (pull request if you disagree)
|
|
* No bullshit (pull request if you disagree)
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
## Philosophy
|
|
## Philosophy
|
|
|
|
|
|
Much influence has been drawn from Continuous Delivery, The Reactive Manifesto, and the Lean Startup. Talks such as
|
|
Much influence has been drawn from Continuous Delivery, The Reactive Manifesto, and the Lean Startup. Talks such as
|
|
@@ -342,6 +345,26 @@ to use an in-memory map based dispatch (ie. constant lookup time).
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
+#### Prismatic Schema
|
|
|
|
+
|
|
|
|
+Progressive typing support; prismatic gives alternative `defn`, `defrecord`, etc which allow creating types via
|
|
|
|
+a simple DSL:
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+(def MyEvent
|
|
|
|
+ "A schema for a nested data type"
|
|
|
|
+ {:a {:b s/Str
|
|
|
|
+ :c s/Int}
|
|
|
|
+ :d [{:e s/Keyword
|
|
|
|
+ :f [s/Num]}]})
|
|
|
|
+
|
|
|
|
+(defmulti react [component event :- MyEvent] :component/event)
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+The `:-` operator works in much the same way as the same way as the `^` operator but is more rich (see doc for more
|
|
|
|
+info).
|
|
|
|
+
|
|
|
|
+
|
|
### Marathon deployment
|
|
### Marathon deployment
|
|
|
|
|
|
12 Factor App
|
|
12 Factor App
|
|
@@ -514,6 +537,25 @@ you think in terms of the capabilities of a system. Component helps us manage th
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
+### Extensible component component
|
|
|
|
+
|
|
|
|
+```clojure
|
|
|
|
+(defmulti react [component event] :component/event)
|
|
|
|
+
|
|
|
|
+(defmethod react :component/extend [component event]
|
|
|
|
+ (let [component-ns (resolve (:ns event))
|
|
|
|
+ new-method (:react event)]
|
|
|
|
+ (binding [*ns* component-ns]
|
|
|
|
+ (eval new-method))))
|
|
|
|
+
|
|
|
|
+(defmethod react :component/extend [component event]
|
|
|
|
+ (let [component-ns (find-ns (:ns event))
|
|
|
|
+ new-method (:react event)]
|
|
|
|
+ (binding [*ns* component-ns]
|
|
|
|
+ (eval new-method))))
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
Idea:
|
|
Idea:
|
|
|
|
|