Typically, you create an extension to perform a task that users encounter frequently. Certain parts of the task are repetitive; by creating an extension, you can automate the repetitive actions. Some steps in the task can change, or specific attributes of the code that the extension processes can change. To receive user inputs for these variable values, you build a UI.
For example, you might create an extension to update a web catalog. Users periodically need to change values for image sources, item descriptions, and prices. Although the values change, the procedures for getting these values and formatting the information for display on the website remain the same. A simple extension can automate the formatting while letting users manually input the new, updated values for image sources, item descriptions, and prices. A more robust extension can retrieve these values periodically from a database.
When you design an extension, you should determine what variables are necessary and what form elements can best handle them.
Consider the following basic guidelines when you design an extension UI:
To name your extension, place the name in the title tag of your HTML file. Dreamweaver displays the name in the extension title bar.
Keep text labels on the left side of your UI, aligned right, with text boxes on the right side, aligned left. This arrangement lets the user’s eyes easily locate the beginning of any text box. Minimal text can follow the text box as explanation or units of measure.
Keep check box and radio button labels on the right side of your UI, aligned left.
For readable code, assign logical names to your text boxes. If you use Dreamweaver to create your extension UI, you can use the Property inspector or the Quick Tag Editor to assign names to the fields.
In a typical scenario, after you create the UI, you test the extension code to see that it properly performs the following UI-related tasks: