Thursday, 3 October 2013

Asp.net INotifyPropertyChanged on domain objects

Asp.net INotifyPropertyChanged on domain objects

What happens if a domain object in asp.net implements
INotifyPropertyChanged and fires off the PropertyChanged event on the
property setters?
I have a common domain layer for both a silverlight a WebForms system. For
silverlight to get all the binding magic, the domain now does property
notifications.
My webforms system doesn't seem to be affected (everything still works)
but I am worried that something is happening behind the scenes that I
don't understand.
I could make a silverlight specific domain layer that extends the original
domain objects, and overrides the properties to do notifications, but is
this necessary? i.e. am I adding an extra layer of code for no reason.
Polluting my domain with ComponentModel stuff does feel ugly.

No comments:

Post a Comment