Skip to content

Practicalli Clojure Web Services

Practicalli Clojure Web Services banner Practicalli Clojure Web Services banner

Develop server-side web services and API's from the ground up using Clojure following a simple and data-centric design and applying functional programming concepts.

Use a REPL Workflow approach to provide instant feedback on the code behaviour as it is written, validating design decisions as they are made.

Clojure REPL workflow

Toolsλ︎

Clojure CLI is used to manage library dependencies and run Clojure code, enhanced with aliases from Practicalli Clojure CLI Config.

Larger projects use Integrant & Integrant REPL to manage components and state, using a reloaded REPL workflow to manage changes in addtion to evaluating functions in the REPL.

Persistence is provides via Postgresql (and eventually JUXT Crux)

tools.build will be used to create Clojure artefacts for deployment, with GitHub actions and Docker used for Continuous Integration and orchestrating systems.

make is a general build tool used to support project development and support automation of wokflow tasks.

Heroku deployment to be archived

Heroku Cloud service deployment approach is being archived as the service no longer provides a developer environment (November 2022)

Older content using Leiningen

Older content uses Leiningen for project configuration. This content can be converted to a Clojure CLI project by creating a deps.edn file containing the relevant dependencies. Add a build.clj configuration to create assets to deploy, e.g. jar & uberjar.

Library Composition approachλ︎

The Clojure community provides a diverse set of libraries, each focused on a specific need. Libraries are assembled to rapidly develop a tailored solution, avoiding bloat and the unnecessary complexity that comes with large frameworks. Libraries are relatively simple to replace with alternatives or used as inspiration for your own custom functions.

Templates can be used to create example projects with common libraries, with code to show showing how libraries can be wired together. provide examples of libraries working together.

Avoiding large frameworks

Frameworks are design decisions others have made and generalised to solve a range of problem, so there is no guarantee on how many of those decisions are relevant for the current project.

Frameworks tend to include many features not relevant to the current problem, which can be challenging to remove or replace. Frameworks can be over relied upon, taking away an opportunity to think about the most relevant solution.

Clojure does not focus on the classic framework approach like Rails or Spring, for this reason.

Use the mouse or built-in key bindings to navigate the pages of the book

  • P , , : go to previous page
  • N , . : go to next page

Use the search box to quickly find a specific topic

  • F , S , / : open search dialog
  • Down , Up : select next / previous result
  • Esc , Tab : close search dialog
  • Enter : follow selected result

Sponsor practicalli-johnny

All sponsorship funds are used to support the continued development of Practicalli series of books and videos, although most work is done at personal cost and time.

Thanks to Cognitect, Nubank and a wide range of other sponsors from the Clojure community for your continued support

Creative commons licenseλ︎

Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License (including images & stylesheets).