Ticket #133 (assigned defect)

Opened 2 years ago

Last modified 2 years ago

Discussion: control flow within coherence

Reported by: Lawrence Assigned to: dev (accepted)
Priority: minor Milestone: 1.0
Component: Core Version:
Keywords: Discussion Cc:

Description

In a couple of places the global coherence object is provided to low level classes so they have access to data structures or can callback with changes. This makes it harder to develop test cases to test functionality in isolation.

One example is the event server (event reception) is passed the global object so it can call to proopgate event changes, this propogate then access global data in services to locate the service to deliver the event to. This task is started by calling into upnp.core.event by upnp.core.service to subscribe to the events.

In this case I would propose moving the subscribe list in upnp.core.service into upnp.core.event and leaving the later to manage the list. The control flow for events then does not need to know about top level coherence object, event propogation goes in a more direct route to the service.

The attached is a copy of upnp.core.event with this proposal, I have not attached the changes to remove this from service and base.

Attachments

event.py (15.3 kB) - added by Lawrence on 29.04.2008 13:14:09.
Simplifies control flow to enable easier unit testi9ng
event.dif (6.8 kB) - added by Lawrence on 29.04.2008 13:17:16.
dif file, for those who read diffs

Change History

29.04.2008 13:14:09 changed by Lawrence

  • attachment event.py added.

Simplifies control flow to enable easier unit testi9ng

29.04.2008 13:17:16 changed by Lawrence

  • attachment event.dif added.

dif file, for those who read diffs

30.04.2008 11:43:05 changed by dev

  • status changed from new to assigned.
  • milestone set to 0.6.

31.12.2008 14:09:06 changed by dev

  • milestone changed from 0.6 to 0.7.

31.12.2008 14:10:37 changed by dev

  • milestone changed from 0.7 to 1.0.