V
VisionSet
My Swing Table model has a delete method.
When I call it it deletes a row from my table model, updates the view, and
deletes it from the underlying domain model.
Except that last step is a desirable *side effect*.
The swing model holds a list of domain model objects this is the same list
object that is retrieved from the domain model. So as a side effect changes
to the swing model affect changes to the domain model.
This is fine behaviour for me with this system, though I realise that often
more decoupling is desired.
The downside is that I don't explicitly call myDomainObject.deleteWhatever()
so my intent from pure code is not obvious.
Thoughts?
When I call it it deletes a row from my table model, updates the view, and
deletes it from the underlying domain model.
Except that last step is a desirable *side effect*.
The swing model holds a list of domain model objects this is the same list
object that is retrieved from the domain model. So as a side effect changes
to the swing model affect changes to the domain model.
This is fine behaviour for me with this system, though I realise that often
more decoupling is desired.
The downside is that I don't explicitly call myDomainObject.deleteWhatever()
so my intent from pure code is not obvious.
Thoughts?