A RESTful URL router for Common Lisp that maps HTTP concepts directly to CLOS.
Snooze is a URL router for Common Lisp specifically designed for building RESTful web services. It maps REST concepts directly to Common Lisp Object System (CLOS) constructs, allowing developers to define routes as CLOS methods and handle HTTP conditions as Lisp conditions. This approach eliminates the need for custom routing syntax or regular expressions, keeping development within the Common Lisp ecosystem.
Common Lisp developers building RESTful web services or APIs who want to leverage CLOS and standard Lisp tooling. It is particularly suited for those who prefer a tight integration between HTTP/REST semantics and Common Lisp's native features.
Developers choose Snooze because it eliminates the need to learn a custom DSL or regex-based routing by using standard CLOS methods for route definitions. Its unique selling point is the deep integration with CLOS, enabling features like automatic URI generation, content-type dispatch via CLOS specializers, and seamless error handling using Lisp conditions.
Common Lisp RESTful web development
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maps REST resources to CLOS generic functions and HTTP verbs to method specializers, allowing routes to be traced, inspected with M-., or extended using standard Lisp tools, as highlighted in the rationale.
Uses standard Lisp function definitions for routes without requiring regex or a domain-specific language, keeping development within familiar Lisp workflows, as emphasized in the README's design philosophy.
Provides path generator functions via defgenpath that create URIs perfectly matching route definitions, useful for internal linking, as demonstrated in the tutorial with lispdoc-path.
Routes based on HTTP Accept and Content-Type headers via CLOS specializers, enabling clean handling of different media types, shown in examples with :text/* and :application/json.
Works with any Common Lisp web server through adapter functions like make-clack-app and make-hunchentoot-app, offering flexibility in server choice, as noted in the backend agnostic section.
The README explicitly states it's 'kinda BETA' with a disclaimer of warranty, indicating potential instability, breaking changes, or limited support for production use.
Advanced URI manipulation requires implementing methods like uri-to-arguments and arguments-to-uri, adding complexity compared to simpler routing systems that handle conversions automatically.
Focuses solely on routing without built-in middleware, templating, or database integration, necessitating additional libraries and setup for full-featured web applications.
Requires deep understanding of CLOS and Lisp conditions to leverage fully, which may be challenging for developers accustomed to more conventional web frameworks or new to Common Lisp.