Hi James, Yes. The idea here is that you want individual components to be able to 'contribute' groups of routes. That way, you can avoid the common practice of having one big 'god' namespace containing all the Ring routes, which is then tightly coupled to all your Ring handlers. Instead, it's nice to have the flexibility to compose systems from different combinations of components.
One implementation approach is to have a 'router' component that delegates to its dependencies. That way, routes can be 'plugged in' using dependency declarations. Currently I only implemented this with bidi, which I'm slightly biased towards (because I wrote it). My 'router' implementation is here: https://github.com/juxt/modular/blob/master/modules/bidi/src/modular/bidi.clj But I have been meaning to add a Compojure equivalent, just haven't yet done so. Is this what you mean? If so, does Duct implement a similar pattern or does it do things differently? Also, I'm hoping that many of these pre-written components will be compatible with each other. For example, modular components are compatible with Daniel Szmulewicz's 'system' https://github.com/danielsz/system, and vice versa. On 8 January 2015 at 14:55, James Reeves <ja...@booleanknot.com> wrote: > Out of curiosity, does Modular have a mechanism for abstracting groups of > Ring routes? > > I'm wondering how much work can be shared between Modular and other > projects, such as my own Duct template, which has similar ideas. > > - James > > On 8 January 2015 at 14:42, Malcolm Sparks <malc...@juxt.pro> wrote: > >> I've created a new website to help new Clojure developers get started >> with Clojure and specifically with Stuart Sierra's >> component/reloaded-workflow pattern. >> >> On http://modularity.org you can find documentation about modular. >> Modular comprises :- >> >> - a set of pre-written components >> - a template system for creating new projects >> - some optional utility libraries >> >> There are also full instructions for creating new Clojure projects that >> are based on component, which involves typing the following :- >> >> $ lein new modular <project-name> <template> >> >> where <template> is one of a number listed on the site here: >> http://modularity.org/docs.html >> >> Don't expect everything to work perfectly yet, and please help if you can >> by suggesting improvements to make this easier for new Clojure developers. >> >> Thanks, >> >> Malcolm >> >> PS: There is a Google group mailing list 'modularity'. If you want to get >> more involved with this project, please join the list. >> >> -- >> 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. >> > > -- > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/YP_VM6Zf4RQ/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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.