Hi there!
Another solution is to use the Micro Monolith Architecture to solve
dependency problems
which also gets you a really awesome development experience!
https://medium.com/@joakimtengstrand/the-micro-monolith-architecture-d135d9cafbe#.z7gjrqoif
On Wednesday, January 18, 2017 at 3:28:24 PM
Hi Sean…
thanks a lot, indeed, this is a good hint :-).
Does not affect the stop strangeness, however.
I had a quick look into the code, namely update-system-reverse, and it
looks to me like the deps update is a no-op here as the update code in the
reduce is the same as in the is the update-sy
Do not dissoc a base field from a record – instead assoc a nil value into it.
If you dissoc a base field, the record changes into a hash map.
Change:
(dissoc this :data)
to:
(assoc this :data nil)
Sean Corfield -- (970) FOR-SEAN -- (904) 302-S
Hi Jose…
thank you for the hint, indeed this fixes it.
Ciao
…Jochen
P. S.
However, just for completeness, I still am a bit uncertain this is perfect
behavior as (dissoc this :mydatacomp) fiddles with the dependencies which I
understood should be managed by component.
So, when I call compon
Hello, I forgot a parenthesis :-P
(defrecord MyComputeComponent [factor mydatacomp]
component/Lifecycle
(start [this]
(println "Starting MyComputeComponent")
this)
(stop [this]
(println "Stopping MyComputeComponent")
(dissoc this :mydatacomp)))
El miércoles, 18 de enero de 2
Hello, your code is acting ok, as you are not dissocing the data component
from the compute component during its "stop" method .
Remember, this is not object oriented programming. You removed the data
from the data component, but did nothing to the compute component. That is
the reason why the
Hi…
playing around with Stuart Sierras component library I found some behavior
(code at end) that I find odd.
M sample has just two components, data and compute, where data is injected
into compute. On start data associates a data map and on stop dissociates
it.
compute uses a value from data's