practicalli / practicalli/clojure-web-services

Introducing Duct

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component lifecycle
Dominant language
Markdown
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Dependencies:
#12 Introducing component lifecycle management
#13 Introduce Integrant

A section on Duct, including introduction of integrant, atraxy, reitit, etc

Short introduction (not official)
Duct (Integrant) is a framework for configuring your project. It handles setting up all daemons (http server, for example) and dependencies between components (web handlers need the database to connected, so handlers are dependent on database).Ring is an HTTP server abstraction, so that actually has nothing to do with Duct. Default Duct actually uses Ring, so you don’t need to compare them.Reitit is a routing library, again not comparable with Duct. Default Duct uses Ataraxy for routing, which can be compared to Reitit. Ataraxy vs Reitit is just preference, but Reitit is more mature / popular at the moment.You can compare integrant with Component or Mount. Those two are also meant to manage your applications state. The main difference between Integrant and the other two options I mentioned are that Integrant is Data driven. It tries to configure your application in Data (EDN), and keep the actual code minimal. The benefit of this is transparency, you can look at static data and understand what it is. Function calls on the other hand can do anything. Duct / Integrant might be a bit difficult to get your head wrapped around, but I believe once you understand the concepts you can build really clear / clean applications. Just finished my first “real” production application in Duct at work today 🙂

Video: James Reeves, the creator of Duct discusses the concepts involved
https://www.youtube.com/watch?v=zznwKCifC1A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the repository's existing documentation structure and identify where a Duct section belongs; no specific file or test is named in the issue. Use the provided description and video as references, and consider the work done when the section introduces Integrant, Ataraxy, and Duct's data-driven configuration without incorrectly comparing Duct with Ring or Reitit.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.