Hardware Reference
In-Depth Information
It Starts with the Stuff You Touch
All of the objects that you'll encounter in this topic—tangible or intangible—will have
certain behaviors. Software objects will send and receive messages, store data, or both.
Physical objects will move, light up, or make noise. The first question to ask about any
object is: what does it do? The second is: how do I make it do what it's supposed to do?
Or, more simply, what is its interface?
An object's interface is made up of three elements. First,
there's the physical interface . This is the stuff you touch—
such as knobs, switches, keys, and other sensors—that
react to your actions. The connectors that join objects
are also part of the physical interface. Every network of
objects begins and ends with a physical interface. Even
though some objects in a network (such as software
objects) have no physical interface, people construct
mental models of how a system works based on the
physical interface. A computer is much more than the
keyboard, mouse, and screen, but that's what we think of it
as, because that's what we see and touch. You can build all
kinds of wonderful functions into your system, but if those
functions aren't apparent in the things people see, hear,
and touch, they will never be used. Remember the lesson
of the VCR clock that constantly blinks 12:00 because no
one can be bothered to learn how to set it? If the physical
interface isn't good, the rest of the system suffers.
not all software interfaces are as simple as you'd like them
to be, so be prepared to experiment a little to get some
software objects to do what you think they should do.
When you're learning a new software interface, it helps
to approach it mentally in the same way you approach
a physical interface. Don't try to use all the functions
at once; first, learn what each function does on its own.
You don't learn to play the piano by starting with a Bach
fugue—you start one note at a time. Likewise, you don't
learn a software interface by writing a full application with
it—you learn it one function at a time. There are many
projects in this topic; if you find any of their software
functions confusing, write a simple program that demon-
strates just that function, then return to the project.
Finally, there's the electrical interface —the pulses of electri-
cal energy sent from one device to another to be interpreted
as information. Unless you're designing new objects or the
connections between them, you never have to deal with
this interface. When you're designing new objects or the
networks that connect them, however, you have to under-
stand a few things about this interface, so that you know
how to match up objects that might have slight differences
in their electrical interfaces.
X
Second, there's the software interface —the commands
that you send to the object to make it respond. In some
projects, you'll invent your own software interface; in
others, you'll rely on existing interfaces to do the work for
you. The best software interfaces have simple, consistent
functions that result in predictable outputs. Unfortunately,
It's About Pulses
In order to communicate with each other, objects use communications protocols .
A protocol is a series of mutually agreed-upon standards for communication between
two or more objects.
Search WWH ::




Custom Search