Hi Atamert, I realised too the discouraged note <https://github.com/stuartsierra/component#disadvantages-of-the-component-model> about cyclic dependencies but although your closed "parent->child" component relations is logically perfect on start your system, when system "is ready to work" it's very useful to open the door to "child->parent" relation too, so the "child" component can communicate with "parent" component. Here a couple of examples that you could find this reverse relation: * routing (router and webservices). webservice could need to know which other webservices are connected to its "parent" router to construct urls ( modular/bidi <https://github.com/juxt/modular/tree/master/modules/bidi>) * templating (menu and menu-items). Menu-items could need to know which others menu-items are used/displayed on the menu component to adapt their renderer
Does this explanation make sense to you? Thanks for reviewing Juan El martes, 2 de diciembre de 2014 12:55:42 UTC+1, Atamert Ölçgen escribió: > > Hi Juan, > > I thought co-dependencies ought to be designed out. Could you give a use > case for co-dependency? > > > On Tue, Dec 2, 2014 at 7:16 PM, JUAN ANTONIO Ruz <juanant...@gmail.com > <javascript:>> wrote: > >> *co-dependency* is a library that lets you use "*cyclic*" dependencies in >> stuartsierra/component systems >> >> In other words, :a depends-on :b, :b (co-)depends-on :a >> >> Although I used "cyclic" word, this co-dependency library is designed on >> the idea that components don't need co-dependencies to start as normal >> dependencies. >> >> co-dependency follows the pattern described in >> stuartsierra/component#customization >> <https://github.com/stuartsierra/component#customization> to accomplish >> this "cyclic" feature >> >> You can find all the details about this lib on >> https://github.com/tangrammer/co-dependency >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com >> <javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Kind Regards, > Atamert Ölçgen > > -+- > --+ > +++ > > www.muhuk.com > -- 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.