@@ -34,12 +34,12 @@ <h1 class="title">
3434 < section class ="section ">
3535 < div class ="container is-max-tablet ">
3636 < p class ="is-size-4 ">
37- Duct defines the structure of your application as < strong > pure
38- data</ strong > .
37+ Define the structure of your application as < strong > pure data</ strong > .
3938 </ p >
4039 < p >
41- A data structure is far more powerful than a prescribed
42- file tree from an application template.
40+ Instead of a prescribed file tree, Duct uses a Clojure data structure
41+ to describe how the components of your application are connected and
42+ configured.
4343 </ p >
4444 < pre class ="highlight "> < code class ="language-clojure "> {:system
4545 {:duct.module/logging {}
@@ -52,11 +52,12 @@ <h1 class="title">
5252 < section class ="section ">
5353 < div class ="container is-max-tablet ">
5454 < p class ="is-size-4 ">
55- Instead of templates and generators, Duct has < strong > modules</ strong > .
55+ Factor out common configuration with < strong > modules</ strong > .
5656 </ p >
5757 < p >
5858 Modules expand out into extra configuration that you can inspect and
59- optionally override.
59+ optionally override. These fulfil a similar role to templates and
60+ generators in frameworks based around a file tree.
6061 </ p >
6162 < div class ="columns split-view ">
6263 < div class ="column left ">
@@ -83,17 +84,19 @@ <h1 class="title">
8384 < section class ="section ">
8485 < div class ="container is-max-tablet ">
8586 < p class ="is-size-4 ">
86- Lorem ipsum
87+ Write the rest of your code in idiomatic < strong > Clojure </ strong > .
8788 </ p >
8889 < p >
89- Lorem ipsum dolar.
90+ The top-level keywords in your system are linked to normal Clojure
91+ functions or multimethods. This code is < em > simpler</ em > as it
92+ doesn't need to know how it's connected to the rest of the system.
9093 </ p >
9194 < pre class ="highlight "> < code class ="language-clojure "> (ns demo.routes
9295 (:require [next.jdbc :as jdbc]))
9396
9497(defn items [{:keys [db]}]
9598 (fn handler [_request]
96- {:body {:results (jdbc/execute! db ["SELECT * FROM items"])}}))</ code > </ pre >
99+ {:body {:items (jdbc/execute! db ["SELECT * FROM items"])}}))</ code > </ pre >
97100 </ div >
98101 </ section >
99102 </ body >
0 commit comments