A new release of system is now available! https://github.com/danielsz/system
[org.danielsz/system "0.4.0"] This release represents a milestone, hence the major version bump. It is breaking only with regards to the Duct-style components. This is also where most of the innovation took place. The Duct components, an idea that originated with James Reeves, revolves around a handler, endpoints and middleware. Compojure gave us means to route http requests, Duct builds on that work and allows us to group routes by purpose, exposing them to the dependencies they need. The endpoints are in fact closures on top of routes with the dependencies available in lexical scope. So are middleware components (at this point, this is true only for system’s implementation of Duct). The original Duct mini-framework boasts a data-driven configuration. At system, we provide a code-driven configuration that maps nicely with the way classical (Stuart Sierra) components are configured. A minimal system would look like that: (component/system-map :db (new-database) :endpoint (component/using (new-endpoint ring-handler) [:db]) :middleware (new-middleware {:middleware [[[wrap-not-found]]]}) :handler (component/using (new-handler) [:endpoint :middleware]) Middleware can be applied globally and/or on a per endpoint basis. This addresses real-world scenarios where some endpoints may need different middleware than other endpoints. An example of this is the Sente routes that don’t tolerate data format middleware as it does its own serialization. Duct components allow web developers to write specialized endpoints in isolation and (re)use them in application code with ease. For example, a social sign-in library that has endpoints for the Facebook login workflow, can be (re)used like so: (component/system-map :db (new-database) :app-endpoint (component/using (new-endpoint ring-handler) [:db]) :facebook-endpoint (new-endpoint facebook) :middleware (new-middleware {:middleware [[[wrap-not-found]]]}) :handler (component/using (new-handler) [:app-endpoint :facebook-endpoint :middleware]) And voilà, your web app now does Facebook sign in. If you haven’t looked at system yet, here are a couple of reasons why you should. - system brings very little semantics of its own (a good thing in my book!), it embraces the coding discipline and philosophy of its constituent parts: Component, Boot, Duct, etc. - system is stable and battle-tested (running in production for several years already). - system has excellent live coding facilities. It even offers a Lisp mode where the REPL behaves the same way it does in all Lisp systems: redefine away until it breaks. On the other hand, documentation is sparse. Efforts are under way to remedy the situation. Docstrings adorn the Duct namespaces thanks to a recent PR by Arne Brasseur. I have plans to build a project homepage with educational material. Blog posts and/or screencasts will be very much appreciated. The complete changelog: https://github.com/danielsz/system/blob/master/CHANGELOG.org#040 This release was made possible with the contributions of: Arne Brasseur Wei Hsu Alex Miller Andreas Rottmann John Swanson Thank you so much! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.