Re: [ANN] components.md

2016-04-30 Thread Derek Troy-West
I've quite enjoyed reading the various approaches to using Component (or not as the case may be), so much so that I've added my own two pence: http://derek.troywest.com/articles/how-i-use-component On Tuesday, April 5, 2016 at 6:28:48 PM UTC+10, Renzo Borgatti wrote: > > Hello clj, > > kinda la

Re: [ANN] components.md

2016-04-19 Thread Francis Avila
I believe by "several different mem-dbs" he means different instances, not implementations, i.e. they differ by name and (maybe) config, but share an implementation. There are two ways this can happen: two system graphs in the same clojure runtime, or one system graph that uses the same service

Re: [ANN] components.md

2016-04-19 Thread Brian Platz
Jeroen, Happy to talk more about it on Slack. No matter what you are `def`-ing something somewhere. For Component I’d `def` a big config map, and I do the same with Mount. My advantage with Mount in the REPL is that I can have local vars for ‘components’ that are easy to reference (but still

Re: [ANN] components.md

2016-04-19 Thread Jeroen van Dijk
Hi Brian, When looking at the Readme of Mount (I think) I already see global state backed in. (defstate ^{:on-reload :noop} mem-db :start (connect config) :stop (disconnect mem-db)) Do I misunderstand this or do we just disagree on what global state is? What if I want

Re: [ANN] components.md

2016-04-08 Thread Brian Platz
>> This is also something that wouldn't be possible with Mount as this library seems to promote global state. As a recent switcher from Component to Mount, and without trying to change the thread's topic into a this vs. that -- I'll simply say that I don't believe any of these tools promote gl

Re: [ANN] components.md

2016-04-07 Thread William la Forge
Ah, discussions which do not define terms are subject to endless round and rounds. I see several characteristics of a component. The first is that there is a lifecycle. A component may need to be opened and closed. The second is that components are not singletons. So you can have multiple inst

Re: [ANN] components.md

2016-04-07 Thread Renzo Borgatti
> On 7 Apr 2016, at 13:42, Jeroen van Dijk wrote: > > > > The thing that this doc also advocates (and I am against) is manual > > dependency management, your app start function must call start on its > > dependencies. This not only hardcodes the dependency, but also requires the > > user to

Re: [ANN] components.md

2016-04-07 Thread Jeroen van Dijk
> > >> > The thing that this doc also advocates (and I am against) is manual >> dependency management, your app start function must call start on its >> dependencies. This not only hardcodes the dependency, but also requires the >> user to think about the startup order of components on every usage.

Re: [ANN] components.md

2016-04-06 Thread Timothy Baldridge
Thanks for replying. >> (with-redefs [bootstrap/system {:rabbit “my stub”}] ) That would possibly do the trick, but I really don't like using redefs, it assumes a mutable environment, and then also locks me into a single-threaded testing system, one where all uses of a var must refer to the same

Re: [ANN] components.md

2016-04-06 Thread Renzo Borgatti
Thanks Tim for reading down till the last line! > On 5 Apr 2016, at 19:09, Timothy Baldridge wrote: > > The thing that this doc also advocates (and I am against) is manual > dependency management, your app start function must call start on its > dependencies. This not only hardcodes the depend

Re: [ANN] components.md

2016-04-05 Thread Timothy Baldridge
The thing that this doc also advocates (and I am against) is manual dependency management, your app start function must call start on its dependencies. This not only hardcodes the dependency, but also requires the user to think about the startup order of components on every usage. In addition this

Re: [ANN] components.md

2016-04-05 Thread James Reeves
On 5 April 2016 at 17:23, wrote: > Not sure it's worth to depend on a library for a defprotocol with two > functions. Also, still need to double check, but I think I can get rid of > that defprotocol. > Well, the advantage with using the Lifecycle protocol from Component is that you can make use

Re: [ANN] components.md

2016-04-05 Thread reborgml
Not sure it's worth to depend on a library for a defprotocol with two functions. Also, still need to double check, but I think I can get rid of that defprotocol. Renzo On Tuesday, 5 April 2016 16:12:42 UTC+1, James Reeves wrote: > > Why implement your own Lifecycle protocol, rather than using t

Re: [ANN] components.md

2016-04-05 Thread James Reeves
Why implement your own Lifecycle protocol, rather than using the one from the Component library? - James On 5 April 2016 at 09:28, Renzo Borgatti wrote: > Hello clj, > > kinda late into that discussion of a while ago about “how I use > components”, I finally wrote-up about it: > > https://githu

[ANN] components.md

2016-04-05 Thread Renzo Borgatti
Hello clj, kinda late into that discussion of a while ago about “how I use components”, I finally wrote-up about it: https://github.com/reborg/scccw/blob/master/COMPONENTS.md The result is a markdown document that is meant to be used by copy-pasting. So no libraries, no frameworks. The reason