Home

PropertyChange

PropertyChange is a notification mechanism used in software design to indicate that a named property of an object has changed. It is typically emitted by the object's mutator or setter when the new value differs from the old one. Listeners or observers register to receive these notifications, which generally include the property name, the old value, the new value, and sometimes a reference to the source object. This pattern supports decoupled communication between components, such as models and user interfaces.

In Java, the concept is formalized in the JavaBeans framework through PropertyChangeEvent, PropertyChangeListener, and the PropertyChangeSupport

In the .NET ecosystem, a closely related pattern is provided by the INotifyPropertyChanged interface and the

Other ecosystems offer similar mechanisms, such as Cocoa’s Key-Value Observing (KVO) and various signal/slot or observer

Design considerations include avoiding unnecessary notifications, thread-safety, proper listener lifecycle management to prevent leaks, and decisions

helper.
A
bean
fires
a
property
change
event
by
calling
firePropertyChange
with
the
property
name
and
values.
Listeners
implement
the
propertyChange
method
to
react
to
updates,
enabling
common
data-binding
and
UI
refresh
scenarios.
PropertyChanged
event.
Frameworks
and
libraries
use
OnPropertyChanged
to
raise
the
event,
typically
supplying
only
the
property
name,
though
some
implementations
expose
additional
context.
This
supports
data
binding
in
UI
frameworks
and
MVVM
architectures.
patterns
in
dynamic
languages.
Use
of
PropertyChange
signals
is
common
for
UI
synchronization,
model-view
communication,
and
any
scenario
requiring
responsive
updates
to
state
changes.
about
including
old
and
new
values.