Think in Terms of Application Components

The approach that a typical Clojure web application takes is probably different from what you’re used to. Most frameworks favor using the model-view-controller (MVC) pattern for partitioning the application logic, with strong separation between the view, the controller, and the model.

Luminus does not enforce any strict separation between the view and the controller portion of the application. Instead, Luminus encourages organizing the application to keep any related code in the same namespace. The route handler functions are typically responsible for processing HTTP requests from the client and dispatching actions based on them. This approach provides a clean separation between the domain logic and ...

Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.