Skip to main content
added 156 characters in body
Source Link
TheCatWhisperer
  • 5.3k
  • 1
  • 23
  • 43

Seems to me that this could potentially make the objects inconvenient to use if no persistence was needed. To unit test, I would have to mock the persistence interfaces; with an event based system, I can just choose not to subscribe to the SaveMe event.

Another potential problem is that doing things this way could make things potentially difficult in the instance of doing efficient batch CRUD operations.

Seems to me that this could potentially make the objects inconvenient to use if no persistence was needed. To unit test, I would have to mock the persistence interfaces; with an event based system, I can just choose not to subscribe to the SaveMe event.

Seems to me that this could potentially make the objects inconvenient to use if no persistence was needed. To unit test, I would have to mock the persistence interfaces; with an event based system, I can just choose not to subscribe to the SaveMe event.

Another potential problem is that doing things this way could make things potentially difficult in the instance of doing efficient batch CRUD operations.

Source Link
TheCatWhisperer
  • 5.3k
  • 1
  • 23
  • 43

Seems to me that this could potentially make the objects inconvenient to use if no persistence was needed. To unit test, I would have to mock the persistence interfaces; with an event based system, I can just choose not to subscribe to the SaveMe event.