For clarity, can you confirm the relationship between this and ring and compojure? Am I right in saying the defined routes are ring compatible (using domkm.silk.serve) and therefore silk is a replacement for compojure (albeit compojure has some more middleware utilities)?
I understand I can just use silk in the UI and ring/compojure on the backend, but if I am using silk on the front end then simplicity would suggest using ring/silk on the backend. This looks great, and I am just about to write my first “Clojure-all-the-way” web app using Om instead of coffeescript and ExtJS, and I want to make sure I don’t go down a rabbit hole (of which there are many!). To make life interesting, it is also a non-trivial SPA so client routing will help significantly. On Tuesday, 5 August 2014 04:04:22 UTC+1, DomKM wrote: > > I have recently been experimenting with isomorphic Clojure and > ClojureScript architecture > <http://t.signauxsix.com/link?url=https%3A%2F%2Fgithub.com%2FDomKM%2Fomelette&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgKy2ku4IDA&k=cc73e108-936d-4e2c-f625-7a414698957a>. > > The goal is to make Clojure[Script] web applications that can share logic > for routing, rendering, and other functionality in order to be able run in > both server-side and browser-side environments. > > I couldn't find a suitable routing library that worked in both Clojure and > ClojureScript nor could I find a routing library with a design that was > suitable for porting to the other platform, so I wrote one. > > https://github.com/DomKM/silk > <http://t.signauxsix.com/link?url=https%3A%2F%2Fgithub.com%2FDomKM%2Fsilk&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgKy2ku4IDA&k=d59252ea-aff3-4ae7-dda7-5e3aac259234> > > The core functionality of Silk is entirely compatible with both Clojure > and ClojureScript. > > Silk is easily extensible, which is especially important for an isomorphic > library. For example, you may have routes that, on the server, should only > match GET requests, but which should also work in the browser where you are > not routing from an HTTP request. This functionality is trivial to add to > Silk (and, as a convenience, is built in). > > In Silk, route matching and handling are decoupled. While this is an > important architecture concern anywhere, it is an essential feature for > isomorphism. Matching URLs on the server and browser will be very similar, > but what you do after will likely be entirely different. You can think of > routing in Silk as bidirectional (yes, routes are named) pure functions > that match URLs to extract parameters or take parameters to form URLs. > > If this sounds like it could be useful for you, please give it a try and > let me know what you think. > > Thanks! > -- 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.