How is stuartsierra/component OOP when it is building an immutable object graph? (Contrast that to Guava etc.)
On Thu, Jun 18, 2015 at 5:15 AM, Xiangtao Zhou <tao...@gmail.com> wrote: > hi guys, > > Constructing simple clojure project is trival, just make functions. if the > project grows large, with more datasources, message queue, and other > storages, dependencies problem is on the table. > > One solution is stuartsierra/component, using system to configure > dependencies graph, make component and dependencies resolution separate. > > If we make namespace must run with code block that init the namespace, > like the "start" method in component, is this a good way to solve the > dependencies? > You can do that. But it's not a really good idea to have top-level side-effectful code within namespaces. How are you going to test that ns? How will you do (stop)? Namespaces should only define things. > > because when the namespace is required the first time, the init block > worked once. > > any suggestion is appreciated. > > > - Joe > > -- > 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. > -- 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.