Specifications
31
CHAPTER 3
User Interfaces for Extensions
Most extensions are built to receive information from the user through a user interface (UI). If
you plan to submit your extension for Macromedia certification, you need to follow the
guidelines that are available within the Extension Manager files (http://www.macromedia.com/
exchange/). These guidelines are not intended to limit your creativity; their purpose is to ensure
that certified extensions work effectively within the Dreamweaver UI, and that the extension UI
design does not detract from its functionality.
Designing an extension UI
Typically, an extension is built to perform a task that a set of users encounters frequently. Certain
parts of the task are repetitive and, therefore, can be automated. Some steps in the task can
change, or specific attributes of the code that the extension processes can change. You build the
UI to handle user inputs for these variable values.
As an example, an extension could automate updates for a web catalog where users need to change
values for image sources, item descriptions, and prices periodically, but the procedures for taking
these values and formatting the information for display on the website remains the same. A
simple extension can automate the formatting while letting users manually input the new,
updated values for the three variables. A more advanced extension could automate the process of
pulling a set of values for image sources, item descriptions, and prices directly from a database,
with variables for time intervals input by the user.
So the purpose of your extension UI is to receive the user inputs that are needed to handle the
variable aspects of a repetitive task that the extension performs. Dreamweaver supports HTML
and JavaScript form elements as the basic building blocks for creating extension UI controls and
displays the UI using its own HTML renderer. Therefore, an extension UI can be as simple as an
HTML file that contains a two-column table with text descriptions and form input fields.
Most extension developers design their extension UI after coding most of the functionality of
their extension in JavaScript. After you begin writing code, it is often easy to discern what
variables are necessary and what form inputs can best handle them.