using Component for replacing dependencies in tests

2014-09-16 Thread Anvar Karimson
Hi, I am trying to wrap my head around how to best use the Component library for structuring my app. Let's say I have a simple Store protocol: (defprotocol Store (get [store k]) (put [store k v])) The production Store protocol implementation would, as an example, be backed by Riak but in

Re: using Component for replacing dependencies in tests

2014-09-16 Thread Anvar Karimson
that make sense? On Tuesday, 16 September 2014 09:19:09 UTC+1, Michael Klishin wrote: On 16 September 2014 at 12:13:13, Anvar Karimson (an...@karimson.com javascript:) wrote: Option 1, separate lifecycle from the actual store: I've seen this approach in use, it works well

Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
Hi, I am trying to understand what the best course of action would be in the following scenario: I have a Java base class that I need to extend. The class is fundamental to my application and will be running fairly hot compared to other bits of code in the application. Therefore I want it to

Re: Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
Is that via gen-class? I have to admit that I am not very familiar with gen-class, is it still possible to use the class from Clojure? Yes, that is probably the most pragmatic choice, premature optimization and all that. On Friday, 4 April 2014 15:03:00 UTC+1, Phillip Lord wrote: Anvar

Re: Proxy vs. glue class

2014-04-04 Thread Anvar Karimson
class. Genclass is a little more painful than proxy, but probably a little less painful than having a combined Java/Clojure build. Phil Anvar Karimson an...@karimson.com javascript: writes: Is that via gen-class? I have to admit that I am not very familiar with gen-class