Home

Onnew

Onnew is a naming convention used in software development to denote an event handler or callback that responds when a new item, record, or resource becomes available. It is not a language feature by itself but a pattern that appears across programming languages and frameworks in which events are exposed to user code.

In practice, a function or method named onnew is registered with an event source—such as a data

Variations in naming reflect different language conventions. Common forms include OnNew, onNew, or onnew, depending on

Related concepts include other event handlers such as ondata, onupdate, or ondelete, and broader design patterns

stream,
a
collection
that
emits
items,
or
a
network
service—that
fires
whenever
a
new
entity
is
encountered.
The
handler
typically
receives
context
about
the
new
item,
allowing
the
program
to
process,
validate,
or
store
it.
Handlers
named
onnew
are
common
in
event-driven
architectures
and
data-processing
pipelines,
where
timely
reaction
to
incoming
data
is
required.
whether
a
language
uses
PascalCase,
camelCase,
or
snake_case.
The
exact
signature
of
an
onnew
handler
varies,
but
it
usually
includes
an
argument
or
payload
that
describes
the
new
item
and
may
also
provide
metadata
such
as
timestamps
or
source
identifiers.
like
the
observer
pattern
and
publisher–subscriber
models.
While
onnew
is
not
a
standardized
API,
it
serves
as
a
recognizable
cue
that
code
is
designed
to
react
to
the
introduction
of
new
information
or
resources.