Adobe 38000827 - Macromedia ColdFusion MX Standard Edition Evaluator Manual page 16

Evaluator guide
Hide thumbs Also See for 38000827 - Macromedia ColdFusion MX Standard Edition:
Table of Contents

Advertisement

Macromedia® ColdFusion® MX Evaluator's Guide
ColdFusion Components
ColdFusion MX features a new technology that empowers developers to easily create
component-based applications that take advantage of rich clients and web services and
enable a more scalable development and deployment model. ColdFusion Components
(CFC) make it easy to create reusable object-based components without requiring
complex programming. Using a tag-based syntax to define and encapsulate a
component's behavior, the model is immediately accessible to developers familiar with
scripting languages such as CFML, JavaScript, ActionScript, Perl, PHP, and others.
ColdFusion Components allow developers to encapsulate application functionality and
make it available to a variety of clients, including web browsers, other ColdFusion
developers, the Flash Player, and web services. CFCs also provide a simple, flexible
structure to ColdFusion developers or teams of developers that promotes code re-use,
application maintainability and scalability, resource security, and automatic application
documentation.
Creating a Component
Defining a component is extremely easy. Components are files containing CFML code
and stored in the web application directory using the new *.cfc file extension. The name of
the component is simply the name of the file, and the CFML within it defines the methods
it will expose. For example, the following code defines the sayHello method, or function,
which returns the text "Hellow World!" when it is invoked.
<cfcomponent>
<cffunction name="sayHello">
</cffunction>
</cfcomponent>
Using Components
By encapsulating application functionality in reusable components, developers can build
more flexible applications as well as work more efficiently within teams. As illustrated in
the diagram below, a component's methods can automatically be made accessible from a
variety of application client types. The ColdFusion environment automatically handles the
plumbing required to invoke components from web services or from Macromedia Flash
(e.g., data marshalling and web service proxy generation), enabling developers to focus
on building the business logic of their applications.
<cfoutput>Hello World!</cfoutput>
ColdFusion Component
Web
CFML
Service
Component
Method
Flash
Client
16

Advertisement

Table of Contents
loading

This manual is also suitable for:

Macromedia coldfusion mx

Table of Contents