Specifications
Chapter 218
Extension APIs
The extension APIs provide the framework that you use to add functionality to Dreamweaver.
You write the bodies of the functions as described in these APIs, and you specify the return values
as required. After writing an extension, you must save it to the correct folder for it to work
properly. The Extension Manager facilitates the process of saving extensions correctly.
Dreamweaver automatically calls any extension that exists in an appropriate Configuration folder
when specified conditions are met. In most cases, this means that a user initiates a task, and then
Dreamweaver identifies a related extension in the Configuration folder, calls the various functions
in the extension, and expects a valid return value from each.
For developers who want to work directly in the C programming language, there is a C
extensibility API that lets you create DLLs. The functionality that is provided in these APIs wraps
your C DLLs in JavaScript so that your extension can work seamlessly within Dreamweaver.
The documentation of extension APIs outlines what each function does when it is called and
what it is expected to return.
Utility APIs
The utility APIs provide functions that can assist you with specialized tasks. You should use
the functions that are available within these APIs if your extension needs to do any of the
following actions:
• Connect with databases
• Create Flash or Fireworks files
• Read and write files on disk
• Read and write Design Notes
• Get and send information to and from a remote web server using HTTP
• Work with JavaBeans
JavaScript API
The JavaScript API provides JavaScript access to Dreamweaver. You can call any function that is
available in this core JavaScript API from your extension, and Dreamweaver returns the
appropriate value. In some cases, functions within this API make use of corollary functions that
you write to determine the return value. For example, the
dom.serverModel.getDisplayName() function in the core JavaScript API
(“dom.serverModel.getDisplayName()” on page 553) calls and makes use of the value that the
getServerModelDisplayName() function returns (“getServerModelDisplayName()” on page
222) that you write.
Extension folders
The folders and files that are stored in the Configuration folder contain the extensions that come
with Dreamweaver. When you write an extension, you must save the files in the proper folder for
Dreamweaver to recognize them. If you download and install an extension from the Macromedia
Exchange website (www.macromedia.com/exchange), the Extension Manager automatically saves
the extension files to the proper folders.