Web Authoring
  Home arrow Web Authoring arrow Page 8 - Dreamweaver MX 2004 Extensions
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB AUTHORING

Dreamweaver MX 2004 Extensions
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 42
    2004-07-06

    Table of Contents:
  • Dreamweaver MX 2004 Extensions
  • Managing Extensions with the Macromedia Extension Manager
  • Yaromat Check Form
  • Build a Simple Survey Form
  • Massimocorner CF Upload
  • Dreamweaver’s Server Behavior Builder
  • Build Server Behavior Code and Interface
  • Distributing Server Behavior

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Dreamweaver MX 2004 Extensions - Distributing Server Behavior


    (Page 8 of 8 )

    To distribute your new server behavior, you can use the Extension Manager, which allows you to create an MXP and submit it to the Macromedia Exchange (http://www.macromedia.com/exchange).

    For the Extension Manager to be able to package your server behavior, you must prepare a Macromedia Extension Installation (MXI) file. These files are basically XML files used to document the name of the extension, its version number and type, and the content of the package. In addition to this, the MXI file tells the Macromedia Extension Manager how to install the extension, and tells users how to access and use it. The Sample subfolder of the Extension Manager application directory contains several MXI example files you can use as starting templates to create your own installation file. In addition to this, a complete reference about MXI files is available on the Macromedia web site at http://www.macromedia.com/go/em_file_format/.

    We will now guide you through the creation of a simple MXI file you can use to package your CF Form Mailer server behavior for distribution:

    1. Start by creating a folder on your desktop (or wherever you prefer on your local machine) and name it CFBook Form Mailer. This is where you will copy all the files that will form the extension package.
    2. Copy the three files created by the Server Behavior Builder for your CF Form Mailer extension into this folder: CF Form Mailer.htm, CF Form Mailer.edml, and CF Form Mailer_block1.edml. They should be in the Configuration\ServerBehaviors\ColdFusion subdirectory of your Dreamweaver install directory.
    3. Open your text editor of choice. Now you start to build the MXI file. First add the following tag to the file, which provides data about the extension to the Extension Manager, including name, version, and type, and whether a restart of Dreamweaver is required after installation:

      <macromedia-extension name="CF Form Mailer"
        version="1.0"
        type="serverBehavior"
        requires-restart="false">
      </macromedia-extension>

    4. Next you specify the products the extension has been built for, which in your case is Dreamweaver only. Add the following lines inside the <macromedia-extension> tag (note that Dreamweaver corresponds to version 7 of the application):

      <products>
        <product name="Dreamweaver" version="6" required="true" />
      </products> 

    5. Other required information is as follows: the name of the extension’s author (contained in the <author> tag name attribute), a short explanation of its use (in the <description> tag), and instructions on how to access it from inside the application (in the <UI-access> tag).

      The last two tags must contain a CDATA section and use a VARCHAR data type with a limit of 2,000 characters. In addition to this, you can use the <br /> HTML tag and nonbreaking spaces (specified by the   escape code) to format the text inside those tags. Add the following lines directly below the </products> tag:

      <author name="CFBook"></author>

      <description>
        <![CDATA[
          Generic ColdFusion Form Mailer
        ]]>
      </description>
      <UI-Access>
        <![CDATA[
           You can run this Server Behavior by choosing:<br />
           Server Behaviors > CF Form Mailer
        ]]>
      </UI-Access>

    6. Now it’s time to provide the list of files that must be installed in the application as part of the extension. This is done using the <files> tag, which contains <file> child tags—one for each file installed.

      The <file> tag has two attributes: source and destination. The first attribute contains the name of the file to be installed, and the second contains the path to the destination folder. Add the following lines to your code, just below the <UI-Access> tag:

      <files>
        <file source="CF Form Mailer.htm" 
         destination="$Dreamweaver/Configuration/ServerBehaviors
      /ColdFusion/">
        </file>
        <file source="CF Form Mailer.edml" 
         destination="$Dreamweaver/Configuration/ServerBehaviors
      /ColdFusion/ ">
        </file>
        <file source="CF Form Mailer_block1.edml" 
         destination="$Dreamweaver/Configuration/ServerBehaviors
      /ColdFusion/ ">
        </file>
      </files>

    Our MXI file should now be ready for packaging—save it as cf_form_mailer.mxi in the same location as your .htm and .edml files (check that it is correct by comparing it to the cf_form_mailer.mxi file in the code download for this chapter, available at http://www.apress.com).

    Now double-click your cf_form_mailer.mxi file. The Macromedia Extension Manager will now launch and present you with the dialog box shown in Figure 9-18. 


    Figure 9-18.
    The Extension Manager prompts you to choose an extension to package when you click on an MXI file.

    Click the OK button, and the Extension Manager will propose a name for the MXP file. Accept the default offered by clicking OK again, and the extension package will be created.

    Our CF Form Mailer extension can now be installed in Dreamweaver. Always remember to test carefully each new extension you package before distributing it. Macromedia Exchange provides a set of useful extension testing guidelines at http://www.macromedia.com/exchange/.

    Summary

    In this chapter you have learned about several aspects of Dreamweaver extensibility. You now know:

    • What a Macromedia Extension is

    • What the Macromedia Extension Manager is and where to get it

    • How to install, remove, and manage extensions by using the Macromedia Extension Manager

    • Where to download additional extensions to add to Dreamweaver

    • How to use Jaro von Flocken’s Check Form behavior

    • How to use Massimo Foti’s CF Upload server behavior

    • What the Server Behavior Builder is

    • How to create custom server be haviors by using the Server Behavior Builder

    Extensibility is one of Dreamweaver’s best features because it lets us easily customize our environment to better fit our development needs.

    This chapter is from ColdFusion Web Development with Macromedia Dreamweaver MX 2004, by Jen and Peter deHaan et al. (Apress, 2004, ISBN: 1-59059-237-9). Check it out at your favorite bookstore today.

    Buy this book now.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway