by Donald Booth
30 April 2010
|Some experience with Dreamweaver will be helpful..|
The Adobe Widget Browser is an Adobe AIR application that allows users to easily preview and configure widgets, and then generate an HTML page that uses the widget.
The Adobe Widget Browser is designed to solve these difficulties by providing an intuitive user interface for configuring and using widgets.
A quick overview
OpenAjax Alliance is a group of industry leaders that are helping to define a common way of communicating between frameworks. OpenAjax Alliance has developed a Metadata specification that can be used to describe a widget. The specification defines a standard for creating an XML file that describes the dependencies, markup, and options of a widget.
Adobe has been a part of OpenAjax Alliance since its inception and has helped to define the specification. The Adobe Widget Browser uses the XML format described in the specification.
The Adobe Widget Browser helps developers and designers use widgets by simplifying three main steps:
- Browse: View details and ratings as you browse available widgets.
- Deploy: Save the current working code to a file that can be integrated into your web pages.
The Adobe Widget Browser displays any widgets that have been uploaded to the Adobe Exchange. Widgets are actually ZIP files that have been prepared for the Widget Browser.
As you browse widgets, you can sort them by name (see Figure 1), author, rating, number of downloads, and date posted.
Figure 1. The Adobe Widget Browser with widgets sorted by name
After you sign in to Adobe Exchange, you can preview individual widgets and see additional details. Follow these steps to try it out:
- Start Adobe Widget Browser and click Sign In.
- Enter your Adobe ID and password. (If you don't have one, you can click Create Account.)
- Click the jQuery UI Accordion.You'll see an enlarged view of the widget, along with details including the author, version, framework, license, compatible browsers, and more (see Figure 2).
- Click Preview to see a live working view of the widget.
While previewing the widget you can interact with it as if it were on a web page, and you can click Code to see the widget's HTML code.
Figure 2. Details for the jQuery UI Accordion widget
Customizing a widget
Before you can customize and use a widget, you have to add it to your My Widgets set. My Widgets is a collection of widgets that you like and want to use in your sites. Widgets in this collection are downloaded and stored locally.
Follow these steps to begin customizing a widget:
- Select the widget you want to customize and open it in the Details view or Preview view.
- Click Add To My Widgets.
- Review and accept the license agreement for the widget, if any.
- When Adobe Widget Browser confirms that the widget has been added to My Widgets, click Go To My Widgets.
- Select the widget to view the existing presets for the widget.
Presets are customized configurations for the widget. There are two types of presets: Developer and User.
The Developer presets come with the widget. Each widget comes with a default preset (labeled "<default>"), which is the basic configuration as set by the widget developer. The developer may also include additional presets with the widget to highlight a special style or certain capabilities of the widget.
When you configure a preset for your own use (a User preset) it is listed under My Presets (see Figure 3).
Figure 3. Presets for the jQuery UI Accordion widget
After you choose the widget you want to use, follow these steps to create your own preset:
- Select the preset that you'd like to start with.
- Click the Configure button (found below the list of presets) to open the Configuration panel.
- Type a Name for the preset you are creating and optionally a description.
- Adjust any of the properties in the Properties group; as you do, the Live View on the right will update automatically to reflect the changes you make.Figure 4. The Configuration panelIn the jQuery UI Accordion widget (see Figure 4), you can select the mouse event that the accordion will respond to as well as color and font parameters for the text. The widget developer determines which properties are exposed to you for configuration.Note: In some cases, there may be things that the widget can do that aren't exposed via the Widget Browser. In these cases, you'll need to check the widget documentation for more details.
- Click Code to see the generated code.As with the Live View display, the code changes are updated immediately when you change a property.
- When you've finished configuring the widget, click Save Preset.The new preset is now stored locally and can be accessed via My Widgets.
- Back on the My Widgets panel, click Save Widget Files to create an HTML file with the widget in its current configuration and all the dependent files needed to run the widget.
- Select a destination folder for the files.Adobe Widget Browser will confirm that it saved the files and ask if you want preview them in your browser.
- Click Preview to see the widget you configured running in the browser.
When you add a widget to the My Widgets list, the widget and its presets are available in Dreamweaver CS5.
Follow these steps to access a widget from Dreamweaver CS5:
- Open a new or existing HTML page in Dreamweaver.
- If the Insert panel is not open, choose Window > Insert to open it.
- In the Common category of the Insert panel, click Widgets.Figure 5. The Widget dialog box in Dreamweaver CS5
- In the Widget dialog box, select the widget and preset you want (see Figure 5).
Dreamweaver will insert the widget onto the page and copy the dependent files to the local root folder.
Where to go from here
With the Adobe Widget Browser you now have an easy way to find widgets, customize them visually, and then insert them in your web page via Dreamweaver.