Microsoft AJAX
framework provides three means for the developers to extend its client-side
functionalities—behaviors, visual
controls, and non-visual controls. In cases where we want to extend the behavior
of an existing DOM element, we can create a custom Behavior control that inherits
from "Sys.UI.Behavior" class. While controls that derive from Sys.UI.Behavior extend the overall behavior of a DOM element,
they donot modify the original purpose or intent of the control. When visual
controls need to be created that modify the original intent of a DOM element
and extend the element’s functionality, the Sys.UI.Control
class can be used as the base class for the control. Controls are user
interface elements that are associated with DHTML elements and they can manage
and control all the rendering for that element. Non-visual controls that do not
extend the behavior of a DOM element or extend its overall functionality should
derive from the Sys.Component base class. In general, Components
are reusable building blocks that can be created declaratively or
programmatically. They can easily be wired up to each other through bindings or
events and manage their own lifetime.
For the convenience of later discussion, let us first take a
look at the relationships between the objects we are interested in.
Figure 1: Hierarchical relationships between
Components, Behaviors and Controls

Now, let us look into the above three means one by one.