Adobe 38000827 - Macromedia ColdFusion MX Standard Edition Evaluator Manual

Type
Evaluator Manual

This manual is also suitable for

Macromedia® ColdFusion® MX Evaluator’s Guide
Evaluator’s Guide
1
Macromedia® ColdFusion® MX Evaluator’s Guide
© 2002Macromedia Inc. All rights reserved.
The information contained in this document represents the current view of Macromedia on the
issues discussed as of the date of publication. Because Macromedia must respond to changing
market conditions, it should not be interpreted to be a commitment on the part of Macromedia, and
Macromedia cannot guarantee the accuracy of any information presented after the date of
publication.
This Guide is for informational purposes only. MACROMEDIA MAKES NO WARRANTIES,
EXPRESS OR IMPLIED, IN THIS DOCUMENT.
Copyright 2002 Macromedia, Inc. All rights reserved. Macromedia, the Macromedia logo,
ColdFusion, the ColdFusion logo, Dreamweaver, UltraDev, Flash, JRun, HomeSite, Macromedia
Generator, and Macromedia Spectra are trademarks or registered trademarks of Macromedia, Inc.
Other brands may be trademarks or registered trademarks of others.
Macromedia, Inc 275 Grove Street Newton MA 02466
www.macromedia.com info@macromedia.com (617) 219-2000
2
Macromedia® ColdFusion® MX Evaluator’s Guide
Contents
Introduction ......................................................................................4
Planning Your Evaluation ................................................................. 5
Evolution of ColdFusion.................................................................... 6
Introducing ColdFusion MX .............................................................. 7
ColdFusion MX Customer Profile ..................................................... 8
Macromedia ColdFusion MX Feature Overview ............................... 9
Top 10 Reasons to Buy ColdFusion MX.......................................... 10
Top 10 Reasons to Upgrade to ColdFusion MX ................................11
An Introduction to Building Applications with ColdFusion MX ....... 12
ColdFusion MX in Depth ................................................................. 14
New Features and Benefits Overview ............................................32
Product and Company Facts ..........................................................36
System Requirements ....................................................................38
3
Macromedia® ColdFusion® MX Evaluator’s Guide
INTRODUCTION
Thank you for evaluating Macromedia® ColdFusion® MX. Over the course of the last
seven years, ColdFusion has proven itself as a fast, scalable, open, and secure platform
for building and deploying tens of thousands of Internet applications.
The ColdFusion MX release offers a range of significant new features that increase
developer productivity, improve server manageability, and enhance performance.
Whether the solution is business automation, commerce or content publishing,
ColdFusion MX is ideally suited for the next generation of business applications.
This Evaluator’s Guide is designed to quickly introduce you to ColdFusion and highlight
the important changes and enhancements in this new release. For complete information
on using ColdFusion, we strongly recommend that you take advantage of the standard
product documentation and the numerous resources available on Macromedia.com.
Macromedia also provides a variety of classroom and online training offerings for
ColdFusion.
4
Macromedia® ColdFusion® MX Evaluator’s Guide
PLANNING YOUR EVALUATION
The amount of time required to fully experience the power and ease of use of ColdFusion
MX varies depending on your background and skillset,
If you are new to ColdFusion, or dynamic application development, we suggest you read
the early sections of this guide in order to gain a basic understanding of ColdFusion .
Then, we recommend you take advantage of the online resources in the Getting Started
with ColdFusion MX Resource Center. These provide further information about the
technologies behind dynamic applications and step-by-step tutorials that demonstrate
how to build introductory dynamic applications with ColdFusion.
If you are familiar with ColdFusion, or other web programming languages like ASP, PHP,
JSP or Perl, the later chapters in this guide provide more in depth information about the
features in ColdFusion that make it the most powerful rapid application development
environment on the Internet. Once you’ve completed the guide, we suggest you download
the more advanced tutorials and experience first-hand the full capabilities of ColdFusion
MX.
Everything you need, including tutorials, downloads, support, and more is waiting for you
at our Getting Started with ColdFusion MX Resource Center. To visit the Resource
Center go to http://www.macromedia.com/software/coldfusion/resources/get_started/
We know you will enjoy working with ColdFusion MX, Dreamweaver MX, and
Macromedia Flash MX. Have fun experiencing how easily you can develop the next
generation of Rich Internet Applications.
5
Macromedia® ColdFusion® MX Evaluator’s Guide
EVOLUTION OF COLDFUSION
Since its first release in 1995, Macromedia
ColdFusion
has been a pioneer in rapid
Internet application development. By combining an approachable and productive server
scripting environment with enterprise connectivity and built-in capabilities like search and
charting, ColdFusion helped bring web application development into the mainstream.
ColdFusion is one of the most popular web development technologies on the Internet – at
use in more than 75 of the Fortune 100 and providing the power behind over 18 million
pages on the public Internet. With the help of ColdFusion, companies like Allied Office
Products, Bank of America, Boeing, FAO Schwarz, Hertz, Jaguar, and Simon & Schuster
have built customer service applications, online publishing systems, e-learning solutions,
business reporting applications, business-to-business extranets, and much more.
With each new release, ColdFusion has evolved to meet the changing requirements of
developers and IT managers—supporting emerging standards and integrating with the
latest technologies, while maintaining a leadership position in ease of use and
productivity. The latest release of ColdFusion continues in this tradition, yet also marks a
major milestone in the evolution of the product.
New Standards Support
Web development has evolved dramatically in the past few years. Support for standards-
based architectures has become more important than ever. ColdFusion MX has
responded. ColdFusion MX has been completely re-architected to run on the Java
platform. ColdFusion MX includes an embedded J2EE™ 1.3 compliant Java application
server, can run on WebSphere and WebLogic, and has robust support for Microsoft .NET
products and technologies. With ColdFusion MX, users can benefit from the rapid
application development capabilities of ColdFusion while fully leveraging the power of the
Java and .NET platforms.
XML and Web Services
XML and web services are two of the most important Internet standards for application
development. By providing standard mechanisms for exchanging data and exposing
functionality, XML and web services are revolutionizing the way IT organizations build
applications. ColdFusion MX offers native support for handling XML data and for
publishing and consuming web services. As a result, developers now have an incredibly
easy way to take advantage of these powerful new technologies in their applications.
Rich Internet Applications
The way developers are delivering applications via the Internet is also changing. Users are
finding that web applications that rely on HTML are limited and often don’t offer the best
customer experience. Rich Internet applications that use Macromedia Flash
interfaces
make it possible to deliver much more compelling customer experiences. With native
connectivity to the Flash Player and tight integration with the application development
capabilities in Macromedia Flash MX, ColdFusion MX will do for rich Internet applications
what it did for rapid web application development – bring it to the mainstream.
A Powerful Combination
Together with Macromedia’s industry-leading development tools – Macromedia
Dreamweaver
MX and Macromedia Flash MX – ColdFusion MX is ushering in the next
generation of the Internet, enabling developers to deliver richer, more powerful
applications while maintaining a high level of productivity and efficiency.
6
Macromedia® ColdFusion® MX Evaluator’s Guide
INTRODUCING COLDFUSION MX
Macromedia is proud to announce ColdFusion MX, the rapid server scripting environment
for creating rich Internet applications.
Macromedia ColdFusion MX
ColdFusion MX is the rapid server scripting environment for creating rich Internet
applications. Combining highly approachable scripting, effortless connectivity to
enterprise data, and powerful built-in search and charting capabilities, ColdFusion MX
enables developers to easily build and deploy dynamic websites, content publishing
systems, self-service applications, commerce sites, and more.
The ColdFusion MX Product Family
Each member of the Macromedia ColdFusion MX product family presents developers
with a common set of development capabilities, while the different product lines enable
customers to select the edition that best meets their requirements for deployment,
performance, integration, and security.
ColdFusion MX Server product line:
The Macromedia ColdFusion MX Server product line is a group of standalone servers
that include the entire infrastructure necessary to run ColdFusion applications,
including an embedded Java™ server based on Macromedia JRun
® technology.
ColdFusion MX Server is available in two editions. ColdFusion MX Server
Professional Edition provides the ideal solution for advanced websites and
departmental applications. For large-scale websites, applications and hosting
environments, Macromedia offers ColdFusion MX Server Enterprise Edition, the
solution for maximum performance, management and security.
ColdFusion MX for J2EE™ Application Servers product line:
The Macromedia ColdFusion MX for J2EE™ Application Servers product line enables
the development and deployment of ColdFusion applications on supported J2EE™
application servers. By adding rapid server scripting capabilities to their existing
J2EE™ infrastructure, customers can optimize their development teams while
enjoying full access to the power of the J2EE™ platform. Editions of ColdFusion MX
for J2EE™ Application Servers will be available for Macromedia JRun, IBM
WebSphere, Sun ONE Application Server, and BEA WebLogic Server.
ColdFusion MX and Macromedia Development Tools
Macromedia’s industry-leading development tools play a vital role in the power and
productivity of ColdFusion MX. As the primary development environment for working with
ColdFusion MX, Dreamweaver MX provides a high-productivity workspace for web
developers and designers alike. With complete support for the new features in
ColdFusion MX, Dreamweaver MX enables organizations to rapidly design, build, test,
and maintain applications that take full advantage of the ColdFusion MX environment.
ColdFusion MX is also integrated with the Macromedia Flash MX authoring environment
and the Flash Player. As a result, Flash users can easily develop and debug rich
applications built with Flash user interfaces from within their familiar work environment.
7
Macromedia® ColdFusion® MX Evaluator’s Guide
COLDFUSION MX CUSTOMER PROFILE
Internet applications are now prevalent in virtually every modern organization. Fortune
500 companies, small and medium-size businesses, government agencies, universities
and non-governmental agencies alike have seized the opportunity to automate their
businesses, improve their communications, and explore new market opportunities with
the help of Internet applications. ColdFusion MX supports these organizations by
providing a highly productive environment and cost-effective solution for building and
managing Internet applications.
While the roles and backgrounds of ColdFusion users are as varied as the companies
they work for, they typically fall into one of three groups.
Web Application Developers
Web application developers are the individuals who build the back end to every
Internet application. Their primary emphasis is on developing the necessary business
logic and database interaction required to implement productive web applications. As
the importance of Internet applications to businesses has grown, these developers
find themselves under increasing pressure to deliver more complex applications that
are also intuitive to use and based on industry standards.
These individuals choose ColdFusion MX because it supports industry standards
while also enabling them to maintain a high level of development productivity. By
providing access to powerful technologies like XML, web services, Java, and .NET
through an intuitive server scripting environment, ColdFusion MX enables web
application developers to deliver better results with less effort.
Professional Web Developers
Professional web developers have traditionally focused on static (HTML only) website
development. Yet the volume of content they need to manage is rapidly outgrowing
their ability to maintain it. Moreover, their customers are increasingly demanding more
feature-rich sites than can be delivered with static web pages. They are looking for
interactivity, personalization, and a simplified way to manage website content.
ColdFusion MX addresses this need by providing an easy to learn and highly
productive server scripting environment for creating rich Internet applications. Fully
integrated with the industry-leading Dreamweaver MX development environment,
ColdFusion MX enables professional web developers to easily get started on the path
to Internet applications that are both richer in functionality and easier to maintain than
static websites.
Macromedia Flash Developers
Experienced users of Macromedia Flash are creating interactive websites and rich
client applications using the powerful design and programming tools in the
Macromedia Flash MX authoring environment. As the use of Macromedia Flash
expands, these developers are being asked to build data-driven websites using
Macromedia Flash and to create more usable application interfaces using the rich
client environment provided by the Macromedia Flash Player.
ColdFusion MX addresses the needs of this community through tight integration with
Macromedia Flash MX. With native connectivity to the Flash Player and support for
server-side ActionScript, ColdFusion MX provides the ideal environment for
integrating Macromedia Flash interfaces with back-end data and applications. This
enables Macromedia Flash developers to easily integrate their work with that of
application developers or to develop entire dynamic solutions on their own.
8
Macromedia® ColdFusion® MX Evaluator’s Guide
MACROMEDIA COLDFUSION MX FEATURE OVERVIEW
The rapid server scripting environment for creating rich Internet applications
EASY - Deliver applications in record time.
ColdFusion MX delivers powerful Internet capabilities within an easy-to-learn and highly
productive server scripting environment.
! Intuitive tag-based language that requires fewer lines of code by handling low-
level programming tasks automatically and simplifying code reuse.
! New server-side ActionScript that enables Macromedia Flash developers to use
the same scripting language for both client and server logic.
! Complete support for new ColdFusion MX features within the Dreamweaver MX
development environment, including powerful visual layout and prototyping,
enhanced code editing and development capabilities, and integrated debugging.
POWERFUL – Deliver a more compelling user experience.
ColdFusion MX provides a robust architecture and rich set of built-in capabilities that
deliver high performance and scalability and enhance your applications with advanced
functionality.
! Fully integrated application services for adding full-text search, dynamic charting,
and high-performance connectivity to Macromedia Flash clients to your
applications.
! Innovative architecture that delivers the scalability, reliability, and power of the
Java™ platform without the complexity.
! Complete extensibility via custom tag libraries, reusable components, Java/C++,
and thousands of available third-party add-ons.
OPEN – Leverage the latest industry standards and infrastructure.
ColdFusion MX supports open industry standards and easily integrates with your existing
technology infrastructure.
! Highly approachable integration with all of the major Internet standards and
component models, including XML, web services, Java, .NET/COM, and CORBA.
! Support for developing and deploying applications on a standalone ColdFusion
MX Server or on leading Java application servers such as IBM WebSphere.
! Support for the leading server operating systems, web server software, mail
servers, directory servers, file systems, and relational database management
systems.
9
Macromedia® ColdFusion® MX Evaluator’s Guide
TOP 10 REASONS TO BUY COLDFUSION MX
1. Increase your productivity. Build dynamic websites and Internet applications quickly
with powerful and intuitive server scripting. ColdFusion MX lets you easily publish
dynamic data, manage session information, process HTML forms and handle XML
data all with an easy-to-learn scripting environment. Plus, you can customize the
environment with your own reusable tag libraries, components, and functions.
2. Optimize your development with Dreamweaver MX. Combining powerful visual
design controls with a newly redesigned code editor, Dreamweaver MX provides
robust application development, rapid visual prototyping, integrated debugging
and complete support for new ColdFusion MX language elements and features.
3. Build rich Internet applications with an optimized connection to Macromedia Flash.
Easily create rich applications with support for server-side ActionScript, a fast,
secure protocol for passing data from ColdFusion MX to Macromedia Flash
clients, and integrated debugging in the Flash MX authoring environment.
4. Harness the power of XML and web services. Easily integrate XML data using built-
in XML document parsing, XSL transformations, and automated serialization of
data into XML. Work with SOAP-based web services or those created using the
Microsoft .NET Framework. Or publish your own using a standards-based web
services engine.
5. Flexibly deploy applications to leading operating systems and on industry-leading
application servers. Deploy ColdFusion MX Server on any of the leading server
operating systems, including Windows, Linux, Solaris, and HP-UX. Or deploy
ColdFusion MX on leading Java application servers with the ColdFusion MX for
J2EE™ Application Servers product line.
6. Enhance your sites with a powerful suite of integrated application services. Simplify
searching with built-in Verity full-text search. Deliver professional business
graphics with the embedded charting and graphing engine. Secure sites by
integrating role-based security with your existing directory infrastructure.
7. Leverage the developer community. Increase productivity with reusable libraries of
ColdFusion and JSP tags. Create your own or download any of thousands
available on the Developers Exchange or from third-party sites.
8. Integrate with enterprise systems. Connect to virtually any database or directory
server with high-performance Type IV JDBC drivers and LDAP support. Integrate
with legacy systems through web services or industry-standard component
interfaces, including COM, CORBA, and JavaBeans/EJB.
9. Combine rapid ColdFusion development with the power of the J2EEplatform.
Create applications that leverage the reliability and performance of the Java
platform while benefiting from the legendary productivity of ColdFusion.
Applications also benefit from dynamic load balancing, automatic failover, and
high-performance database connectivity.
10. Effortlessly manage your applications with advanced server administration. Utilize the
web-based ColdFusion MX administration console to quickly configure servers,
schedule tasks, monitor performance, and analyze server logs. Easily archive or
deploy entire applications with powerful Application Deployment Services.
10
Macromedia® ColdFusion® MX Evaluator’s Guide
TOP 10 REASONS TO UPGRADE TO COLDFUSION MX
1. Integrate with .NET, XML, and web services. Easily integrate with XML data using
built-in XML document parsing, XSL transformations, and automated serialization
of data into XML. Incorporate web services into your applications or publish your
own using a standards-based web services engine.
2. Build advanced applications with ColdFusion Components. Create self-
documenting, reusable components using standard CFML. ColdFusion
Components take custom tags to the next level by letting you write a component
once and then access it from a ColdFusion page, a Macromedia Flash client, or as
a web service.
3. Experience the power of Java, without the learning curve. ColdFusion MX combines
the power of the Java platform with the ease of use of ColdFusion. Develop and
deploy ColdFusion applications with the standalone ColdFusion MX Server or
deploy on leading J2EE™ application servers with the ColdFusion MX for J2EE™
Application Servers product line.
4. Save development time with Dreamweaver MX. Combining powerful visual design
controls with a newly redesigned code editor, Dreamweaver MX provides robust
application development, rapid visual prototyping, integrated debugging and
complete support for new ColdFusion MX language elements and features.
5. Increased performance and reliability. Increase site responsiveness and availability
by leveraging the proven performance and reliability of the Java platform. Speed
up high-volume applications with shared variable locking and simplified locking
configuration with shared in-memory variables.
6. Make your sites more compelling with dynamic charting and native Macromedia Flash
connectivity. Easily create rich applications with a fast, secure protocol for passing
data from ColdFusion MX Server to Macromedia Flash clients and full support for
ColdFusion debugging in the Flash MX authoring environment. Utilize enhanced
charting capabilities, including support for multiple data series, fully customizable
output and report types, batch reporting, and drill-down functionality.
7. Develop faster with powerful new debugging capabilities. Find errors faster with
enhanced error messages, customizable tracing, and better output organization –
all accessible from inside the Macromedia Dreamweaver MX IDE.
8. Easily migrate existing applications to the ColdFusion MX foundation. Upgrade your
existing servers quickly by following the complete migration guide and by
identifying any potential issues up front with the Code Compatibility Analyzer.
9. Internationalize your applications. Build applications that support character-based
languages such as Chinese, Japanese, or Korean with built-in UNICODE support.
10. Reuse JSP tag libraries like ColdFusion custom tags. Increase productivity by
reusing Java components within ColdFusion. Import JSP tag libraries and use
them just like ColdFusion custom tags or integrate CFML pages with Java servlets.
11
Macromedia® ColdFusion® MX Evaluator’s Guide
AN INTRODUCTION TO BUILDING APPLICATIONS WITH
COLDFUSION MX
Building data-driven websites and applications with ColdFusion MX is very intuitive for
developers familiar with web languages such as HTML and JavaScript. The ColdFusion
server scripting environment is easy to learn and provides a highly productive way to build
powerful Internet applications.
How ColdFusion MX Applications Work
To understand how ColdFusion MX works, it is necessary to understand how websites
function in general, A website is a collection of files that reside on a server. The web
server handles requests for those files. When a web browser requests a static web page
such as an HTML page, the web server locates the file in the file system and then sends it
back to the browser for display.
By contrast, when a browser requests a ColdFusion page (indicated by a .cfm extension),
the ColdFusion MX environment dynamically constructs the page before delivering it to
the web server. The diagram below shows how ColdFusion works when a web browser
invokes a ColdFusion page.
Web Browser
Internet or
Intranet
Web
page
ColdFusion
MX
Web
Server
2
3
1
4
5
Client Network Server
HTTP
Request
CF
Page
Web
page
Databases
Web Services
COM/EJB
File System
Directories
E-mail
When a user clicks hypertext link on a page, the web browser sends an HTTP request to
the web server. If the requested page is a ColdFusion page, the web server then passes
the request for processing to ColdFusion.
ColdFusion then processes the CFML in the page. Based on the CFML, the server may
interact with database servers, the file system, mail servers, and potentially other
applications and systems.
As it processes the CFML instructions, ColdFusion dynamically generates output that is
returned to the client via the web server. The output from ColdFusion can be HTML,
WML, XML, and even application-specific content, such as data for Flash or desktop
applications such as Microsoft Excel.
Building ColdFusion MX Applications
While developers can write the tags and scripts in a ColdFusion MX application using any
text editor, the integrated support in the Dreamweaver MX environment makes it the ideal
tool for working with ColdFusion, Using Dreamweaver MX, developers create
applications by building pages that combine ColdFusion server scripting with HTML and
12
Macromedia® ColdFusion® MX Evaluator’s Guide
other web technologies. Developers can then test the pages locally or deploy them on a
web server where the ColdFusion MX environment has been installed. The following is an
example of a simple dynamic web page written with CFML. The majority of the text is
standard HTML, while the highlighted lines are ColdFusion tags.
<CFQUERY NAME="ProductList" DATASOURCE="CompanyDB">
SELECT * FROM Products
</CFQUERY>
<HTML>
<HEAD>
<TITLE>Product List</TITLE>
</HEAD>
<BODY>
<H1>Company X Products</H1>
<CFOUTPUT QUERY="ProductList">
#ProductName# $#Price# <BR>
</CFOUTPUT>
</BODY>
</HTML>
The first ColdFusion tag embedded in this page instructs the ColdFusion environment to
retrieve all of the entries from the Products table in the CompanyDB database. The
second tag instructs ColdFusion to place the results from the query on the page, with
each product name and its associated price on its own line. These instructions on the
ColdFusion page are processed entirely on the server. Only the results, in this case the list
of products and the associated HTML tags, are passed to the browser requesting the
page.
With its intuitive server scripting and integrated development tools, ColdFusion MX
enables developers to build advanced websites and applications – including database
reporting systems, content publishing solutions, portals, ecommerce sites and more – in
the most rapid and cost-effective manner available.
13
Macromedia® ColdFusion® MX Evaluator’s Guide
COLDFUSION MX IN DEPTH
This section provides an in-depth look at a few of the most exciting new features in
ColdFusion MX, including its new standards-based architecture, ColdFusion
Components, native XML handling, web services, integration with the Java and .NET
platforms, and enhanced charting and graphing.
ColdFusion MX Architecture Overview
ColdFusion MX introduces an innovative new architecture to the ColdFusion environment
that merges the ease of use and productivity of ColdFusion with the power of the J2EE™
and .NET platforms. As a result, developers get the benefit of these emerging
infrastructure standards without the associated complexity.
Built on a completely standards-based infrastructure, ColdFusion MX Server (left)
includes an embedded Java™ server based on Macromedia JRun technology. This
proven infrastructure provides the runtime services for ColdFusion applications, including
high-performance connectivity to databases, Internet protocols, and components; a
standards-based web services engine; and resource management features like database
connection pooling, thread management, and security.
ColdFusion MX Architecture
ColdFusion MX Server ColdFusion MX for J2EE App Servers
JRun, WebSphere, iPlanet, WebLogic
J2EE Infrastructure Services
ColdFusion Scripting Environment
Charting &
Graphing
Full-Text
Search
Flash
Remoting
Web
Services
ColdFusion Scripting Environment
Charting &
Graphing
Full-Text
Search
Flash
Remoting
Web
Services
The innovative architecture of ColdFusion MX affords customers much greater flexibility
in deploying ColdFusion applications and integrating them with the rest of the enterprise
infrastructure. Taking advantage of the ColdFusion MX architecture, Macromedia is
making available a new line of ColdFusion MX products. The editions in the ColdFusion
MX for J2EE™ Application Server line can be deployed on leading Java application
servers, such as Macromedia JRun, IBM WebSphere, Sun ONE Application Server, and
BEA WebLogic Server.
In addition to providing tighter integration with Java technologies, ColdFusion MX also
offers support for the emerging Microsoft .NET architecture. ColdFusion MX includes
continued support for Windows and integration with the .NET Enterprise Servers,
including IIS, SQL Server, and Exchange. ColdFusion MX also makes it easy to integrate
with applications built using Microsoft technologies through native support for the COM
component model and integration with .NET web services.
On top of this powerful infrastructure, ColdFusion MX provides an enhanced version of
the rapid server scripting environment and built-in application services that have made
ColdFusion wildly popular.
14
Macromedia® ColdFusion® MX Evaluator’s Guide
ColdFusion Scripting Environment
The rapid server scripting environment in ColdFusion provides a highly approachable and
efficient model for Internet application development. At the heart of ColdFusion scripting
is the ColdFusion Markup Language (CFML), a tag-based language that accelerates
development by encapsulating the low-level details of Internet programming. ColdFusion
MX introduces many powerful new capabilities to CFML, including native support for
XML and web services, connectivity to Macromedia Flash, and ColdFusion Components,
a powerful yet approachable way to create structured, reusable code in ColdFusion.
Also new to the ColdFusion scripting environment is support for server-side ActionScript.
ActionScript is the JavaScript-based language used to write application logic in
Macromedia Flash. By bringing this language to the server, ColdFusion MX enables Flash
developers to use their familiar scripting environment to connect to ColdFusion resources
and easily deliver the results to client-side applications using the integrated Macromedia
Flash Remoting service.
ColdFusion Application Services
Unlike other web application development technologies, ColdFusion includes a suite of
built-in application services that make it easy to add powerful capabilities to your Internet
applications. In ColdFusion MX, these include a new enhanced charting and graphing
engine, integrated Verity full-text search, and the ground-breaking Flash Remoting
service, which provides a high performance protocol for exchanging data with application
clients built with Macromedia Flash MX. Using the native access to these services in the
ColdFusion scripting environment, developers can easily build advanced functionality into
their applications, without having to purchase addition components or spend valuable
time trying to integrate them.
15
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">
<cfoutput>Hello World!</cfoutput>
</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.
ColdFusion Component
Web
Service
Flash
Client
CFML
Component
Method
16
Macromedia® ColdFusion® MX Evaluator’s Guide
Self-Documenting Interfaces
Another major benefit of components is simplified team development and code reuse.
One of the largest impediments to effective team development is the difficulty in
understanding functionality written by another developer. Encapsulating functionality in
high-level methods makes sharing functionality between developers more
straightforward, since the developer need only understand the component’s methods and
not the underlying implementation.
ColdFusion components further simplify this process through their ability to automatically
display documentation about themselves. By simply calling a component via a URL, a
developer can see information about its methods, the parameters those methods require,
and the results each method will return. All of this information is generated automatically
by ColdFusion MX and displayed either as a web page or within the Dreamweaver MX
component explorer (pictured below).
17
Macromedia® ColdFusion® MX Evaluator’s Guide
Web Services
Web services are playing an increasingly important role in the world of web applications
because they help solve a difficult problem for IT organizations – integrating disparate
systems within their own environment or enabling those systems to be used by partners
and customers in a cost-effective and straightforward manner.
Web services are based on the simple object access protocol (SOAP), a platform-
independent, standards-based means for accessing methods or services on remote
applications. Web services enable various types of systems and applications to expose
their functionality as services that can be invoked across the Internet.
As with other Internet programming tasks, ColdFusion MX enables developers to access
the power of web services without being forced to deal with the many low-level details of
the technology. In ColdFusion MX, developers can create and consume web services
using CFML and ColdFusion components. As a result, ColdFusion developers can easily
create web services for reuse by other ColdFusion developers or by developers using
other technologies that support web services, such Microsoft ASP.NET and the
Java/J2EE platform. Conversely, ColdFusion applications can also consume web
services created using these other technologies.
Consuming Web Services in ColdFusion MX
Invoking, or consuming, a web service in ColdFusion MX is done with the same easy to
use syntax involved in invoking a ColdFusion component. The developer simply specifies
the location of the service and passes it the appropriate input parameters. ColdFusion MX
automatically handles interaction with the SOAP protocol – parsing the interface
description associated with the service, generating the necessary client proxies, and
marshalling the input and output parameters to and from the service. For example, the
following code invokes a currency exchange web service published at Xmethods.net.
<cfinvoke
webservice="http://www.xmethods.net/sd/2001/CurrencyExchangeService.wsdl"
method="getRate" returnVariable="convertPrice">
<cfinvokeargument name="country1" value="USA">
<cfinvokeargument name="country2" value="Euro">
</cfinvoke>
Performing the equivalent task in other programming environments usually involves a
lengthier and more complex set of object calls and proxy creation. As a result, working
with web services is more time-consuming and the code is harder to maintain.
Integrated support for web services in the Dreamweaver MX development environment
makes working with web services even easier for the ColdFusion developer. As shown in
the figure below, developers can introspect web services and their methods from within
the Dreamweaver MX IDE. Once they have located the correct method, they can then
drag it into the editor and automatically generate the code for invoking it.
18
Macromedia® ColdFusion® MX Evaluator’s Guide
Publishing Web Services in ColdFusion MX
ColdFusion MX also makes it easy to expose functionality built in ColdFusion as a web
service. Once a method is exposed as a web service, it can be invoked by another
ColdFusion application or by any other technology that supports the SOAP standard for
web services, such as ASP.NET, Java, or PHP. As a result, developers using other
technologies can take advantage of functionality built by ColdFusion developers without
having to know ColdFusion itself.
Creating or publishing web services in ColdFusion MX is done through ColdFusion
components. Making a ColdFusion component available as a web service takes only a
single step. In the example below, setting the access parameter to “remote” tells the
ColdFusion MX environment to make this function available as a web service.
When the ColdFusion MX environment encounters the “remote” keyword, it automatically
generates the web services description language (WSDL) files for the method. This XML-
based document is the interface specification that enables a remote client to understand
and invoke the service. Using this information, a developer could invoke the sayHello web
service from any technology that supports web services. In addition, a developer using
Dreamweaver MX could browse the web service and build an application that invokes it
by simply dragging the method into the code editor.
<cfcomponent>
<cffunction name="sayHello"
access=”remote”
>
<cfoutput>Hello World!</cfoutput>
</cffunction>
</cfcomponent>
In addition to ease of use, the approach to web services offered in ColdFusion MX also
enables developers the flexibility to adopt web services gradually. Even if they are not
ready to start using web services today, by building applications using ColdFusion
components, they can easily add this capability later – without having to re-architect their
application or write additional code.
19
Macromedia® ColdFusion® MX Evaluator’s Guide
XML Handling
The Extensible Markup Language (XML) is becoming a widely adopted technology for
sharing data between different operating platforms, applications, devices, and systems.
Traditional methods for transferring data between disparate machines such as the use of
comma-delimited files or other ad-hoc protocols are limited because of lack of standards
and the inability to represent complex data types and describe relationships. XML
addresses this problem by providing developers with a single text-based markup
language that can describe both documents and data as well as represent both simple
and complex data relationships.
Until now, using XML in most web development languages has been a tedious process,
requiring in-depth knowledge of XML parsers and how to interact with their complex
programming interfaces and object models. ColdFusion MX introduces a revolutionary
approach to XML by allowing developers to parse, create, and manipulate XML
documents using the same easy to use scripting syntax used in CFML. As a result,
developers can easily incorporate XML data into their applications without the overhead
of having to deal with complex, low-level programming constructs.
Parsing and Creating XML Data
The built-in XML parser that is now part of ColdFusion MX automatically processes XML
that is passed to ColdFusion and converts it into a native ColdFusion object, making it
easy for developers to manipulate incoming XML data in their applications. The XML
object is a structure of CFML structs and arrays, which means that developers navigate
XML the object using the same syntax ColdFusion provides for reading and writing other
complex data types.
ColdFusion MX also makes it easy for developers to generate XML as output in their
applications. The creation of XML documents usually requires an understanding of the
Document Object Model (DOM) and its associated API. Developers must execute
multiple function calls to create nodes, set their values, and then serialize the object to
generate an XML string. By contrast, ColdFusion MX provides a single tag that
automatically generates a valid XML document from text, application variables, and the
output of CFML code embedded within its body. As a result, developers can quickly and
easily exchange data with other applications using standards-based XML.
Manipulating XML Data
The XML specification also provides two powerful methods for manipulating data that is
stored in XML. These include XSLT style sheets and XPath searches. Style sheets enable
developers to convert XML data from one format to another. For example, if a developer
is merging employee data represented in two different XML schemas, he or she can use a
transformation to convert the two sets of data so that they share the same schema.
XPath provides a different way to navigate through XML data. XPath searches are similar
to SQL queries in that they enable an application to search for a specific set of data
contained in an XML document (as opposed to accessing a particular known location in
the XML document).
The ColdFusion MX scripting environment provides native support for both of these
powerful technologies, making it easy for developers to work with XML data. With the
new XMLTransform function, a developer simply needs to pass in an XML document and
the appropriate XSLT style sheet, and ColdFusion MX performs the transformation.
Similarly, XPath searches are enabled through the easy to use XMLSearch function.
20
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38

Adobe 38000827 - Macromedia ColdFusion MX Standard Edition Evaluator Manual

Type
Evaluator Manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI