Skip to content

Commit 67d5179

Browse files
service-repl: refactor donut system page content
1 parent abb604a commit 67d5179

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

docs/service-repl-workflow/donut-system.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# Donut System
22

3-
!!! WARNING "Draft page"
4-
This is an early draft of using Donut to manage system components, although all the code does work when added to a project created with [Practicalli Project Templates](https://github.com/practicalli/project-templates/) - `practicalli/service` template. Some of the writing and examples may be improved as more is learned about Donut
5-
6-
73
[Donut system](https://github.com/donut-party/system) takes a system as data approach, using a hash-map to define the overall system with keys to define each component (or component group) in that system.
84

95
Component definitions are also a hash-map with `:start`, `:stop`, `:config` keys to express how to manage that component
106

7+
> Donut system configuration is a similar data-centric approach to that used by reitit for http request routing.
8+
119
??? WARNING "Practicalli uses ::donut alias instead of ::ds"
12-
Practicalli requires the donut qualified keywords using `donut` rather than the more cryptic `ds`
10+
The `donut.system` library is required using the `:as donut` alias.
1311

14-
Practicalli recommends meaningful alias names or not using an alias at all, instead requiring specific functions. This makes code easier to read and searching considerably easier (fewer false matches)
12+
`::donut` is used as the keyword qualifier
1513

14+
Practicalli recommends meaningful names to make code easier to read and searching considerably simpler (fewer false matches)
1615

1716

18-
> Donut system configuration is a similar approach to that used by reitit for http request routing.
17+
## Create project with Donut
1918

19+
`practicalli/service` template from [:fontawesome-solid-book-open: Practicalli Project Templates](https://github.com/practicalli/project-templates/){target=_blank} can be given a `:component` option to include the Donut System library and example code.
20+
21+
`:project/create` alias from [:fontawesome-solid-book-open: Practicalli Clojure CLI Config](https://practical.li/clojure/clojure-cli/practicalli-config/){target=_blank}
22+
23+
!!! EXAMPLE "Create Clojure Web Service project with Donut"
24+
```shell
25+
clojure -T:project/create :template practicalli/service :component :donut :name practicalli/web-service-name
26+
```
2027

2128
## Including Donut
2229

0 commit comments

Comments
 (0)