I looked around for good patterns, and found Malcolm's code examples from the real project (I believe it was "Open Sensors") really useful. I still have an uneasy feeling about a "component" framework, since it:
Having said that, I do understand that state needs to be managed somewhere, and component seems to do it well. Hence I'd like to ask a few questions to start a discussion (and to have a better understanding in the process):
1. What would be your preferred grouping of state and behavior? i.e. say I have 3 sources: DB, Amazon SQS, some external REST thingy. I would create 3 components to hide and manage their lifecycle (i.e. state). But what about functions that deal with this state? For example would you have a (receive-messages-from-sqs [...]) loop in the same namespace as the Amazon SQS component?
2. Would you group components into a single namespace (i.e. system "A"), or would you rather have a single namespace for each?
3. Let’s say there are two components A and B. B depends on A, and has a function that needs to communicate something to A. With all the examples it looks like B would pass A to that (B) function. In my mind it couples A and B quite tightly. Would it not make more sense to only pass core.async channels to all the components, and have communication between ALL the components be via these channels? (e.g. a component C would have a channel "ch-a" as its state, B and A would be injected with this "ch-a", and when a function in B wanted to pass something to A, it would just put that something onto "ch-a")
4. Following up from the question #3: Can a component then just be three things: an atom, an input channel, an output channel? Just thinking out loud, since I have not used "component" yet.
5. I would also be very interested to learn what did not work for you with using "component", and what you would recommend to do right from the start that will help later on.
Thank you,
/Anatoly
5. I would also be very interested to learn what did not work for you with using "component", and what you would recommend to do right from the start that will help later on.
To view this discussion on the web, visit https://groups.google.com/d/msgid/modularity/cc73ceaa-e5fc-4794-97ce-ddbdb1d43a03%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "modularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modularity+...@googlegroups.com.
To post to this group, send email to modul...@googlegroups.com.
Visit this group at http://groups.google.com/group/modularity.