Closed WhittlesJr closed 6 years ago
Amazing work! I'll look at it immediately.
FYI I think bacure.util
is no longer necessary in bacure.remote-device
. :stuck_out_tongue:
Checked, fixed and tested. Thank you very much!
Excellent, thank you! Glad to help.
OK, I touched a lot of lines here. A lot of it is just formatting though.
Here's a summary:
bacure.services
NS, where also COV subscription will go when I do that next. These simply send the requests and have nothing to do with listening for responses.bacure.events
NS. This is what listens for events, and updates a stateful cache of what we find, under the local device that sent the request. (So the local-device has an event listener attached to it, and it stores what it gets from those events under the local-device atom.)bacure.local-device
andbacure.events
.One point you might want to change is how RemoteObjects are coerced and cached... I decided to mimic how other objects are coerced (maps of properties), with :object-name and :object-identifier being the only properties given. And when I cached them, I cached them a bit deeply, like below.
We could probably make that a bit more terse, but it would no longer look like a typical object. I dunno. Up to you.
I think on the whole, what I've ended up with is coherent and sensible, but that might not be the case from someone else's perspective.