Component basics

 < Day Day Up > 

Programmers use various strategies to encapsulate their work. You can think of encapsulation as creating an entity that exists in a virtual black box. To use it, you don't need to know how it works; you only need to know what information it needs to do its job and what information it will output after its job is complete. For example, a programmer might create a program that gets information from an employee database. Anyone, including other programs, can then use that program to query that database. Thus, the program is reusable.

Experience shows that well-organized programs that use encapsulation are easier to maintain, enhance, and reuse. Different technologies offer programmers different ways to accomplish this encapsulation, and different names describe these strategies: functions, modules, and others. Macromedia Dreamweaver 8 uses the term component to refer to some of the more popular and modern encapsulation strategies, including web services, JavaBeans, and ColdFusion components (CFCs). So, when users build web applications in Dreamweaver, the Components panel assists them in using available web services, JavaBeans, and CFCs.

Components from recent technologies (such as web services, JavaBeans, or CFCs) can describe themselves. Usually there is information about the component embedded in the files that constitute the component. The ability of a component to publish or share this information is called introspection. In other words, a program such as Dreamweaver can ask a component for a list of the functions it exposes (that is, functions that can be invoked from another program). Depending on the technology in use, a component can reveal other information about itself. For example, a web service might describe new data types.

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net