MACROMEDIA COLFUSION MX 7-MIGRATING APPLICATIONS TO COLDFUSION MX 7 Manual

Migrating applications to coldfusion mx 7
Table of Contents

Advertisement

Quick Links

COLDFUSION
MX 7
®
Migrating Applications to ColdFusion MX 7

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA COLFUSION MX 7-MIGRATING APPLICATIONS TO COLDFUSION MX 7

  • Page 1 COLDFUSION MX 7 ® Migrating Applications to ColdFusion MX 7...
  • Page 2 Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally.
  • Page 3: Table Of Contents

    CONTENTS CHAPTER 1: Migrating Applications from ColdFusion 5 ..... 5 Migrating to ColdFusion MX ......... 5 Planning your migration .
  • Page 4 Tag and function examples ......... . 21 Using ListSort in ColdFusion MX .
  • Page 5: Chapter 1: Migrating Applications From Coldfusion

    Migrating to ColdFusion MX When you migrate your existing ColdFusion Server 5 applications to ColdFusion MX, you might encounter a few incompatibilities between ColdFusion 5 and ColdFusion MX. Macromedia strongly encourages you to develop a migration plan for porting existing ColdFusion 5 applications to ColdFusion MX.
  • Page 6: Planning Your Migration

    Planning your migration To facilitate the migration process, Macromedia recommends that you develop a migration strategy. Because every application is different, you must tailor your own migration strategy to meet your environment’s needs. This section contains two possible migration strategies, following a discussion of web server differences in ColdFusion MX.
  • Page 7: Migration Strategy Using External Web Server

    ColdFusion MX on a testing server before moving to production. Adapt the following suggested steps to fit your needs: Study the ColdFusion MX Migration section of the Macromedia website (www.macromedia.com/go/cfmxmigration) and this migration guide to anticipate the compatibility issues that might affect your system.
  • Page 8: Migration Strategy Using Built-In Web Server

    Your application is now ready for production on ColdFusion MX. Note: A number of testing applications are available for download from the web. For more information, see the Support section of the Macromedia website (www.macromedia.com/support). Migration strategy using built-in web server If your environment does not multiple computers for development, testing, and staging.
  • Page 9: Using The Configuration And Settings Wizard

    Define data sources in the ColdFusion MX Administrator. If possible, do not run tests against a production database. Copy CFM files to the cf_root/wwwroot (server configuration) or jrun_root/servers/coldfusion/ cfusion-ear/cfusion-war (multiserver configuration) directory. Test the code in your application using the ColdFusion Code Compatibility Analyzer. For more information, see “Using the ColdFusion Code Compatibility Analyzer”...
  • Page 10: Using The Coldfusion Code Compatibility Analyzer

    Using the ColdFusion Code Compatibility Analyzer To isolate compatibility issues between ColdFusion MX and ColdFusion Server 5, use the Code Compatibility Analyzer to check your ColdFusion pages. Based on diagnostic information, the Code Compatibility Analyzer issues error and information messages to alert you to the following compatibility issues: •...
  • Page 11: Connecting To A Data Source With Odbc Socket

    Connecting to a data source with ODBC Socket In ColdFusion 5, an ODBC Data Source Name (DSN) entry that was created with the ODBC Data Source Administrator would automatically appear in the list of data sources in the ColdFusion Administrator. It does not appear automatically in ColdFusion MX; you must manually add the ODBC DSN entry.
  • Page 12: Localization And Character Handling

    Localization and character handling This section describes the changes between ColdFusion 5 and ColdFusion MX that affect locale functions. It contains the following topics: • Extended character code and encoding support • Support for new currency formats • Changes to formatting functions •...
  • Page 13: Support For New Currency Formats

    For more information on support for character encodings see the “Developing Globalized Applications” chapter in ColdFusion MX Developer’s Guide and the individual tag and function descriptions in the CFML Reference. Support for new currency formats ColdFusion MX recognizes new currency formats for locales. For example, when a euro currency is passed to the function, ColdFusion MX returns Yes if the locale is a Euro LSIsCurrency...
  • Page 14 Changes to formatting functions The following table outlines changes to formatting functions. For more information, see CFML Reference for the appropriate function. Function Description of change LSEuroCurrencyFormat In ColdFusion 5, the LSEuroCurrencyFormat function used EUR or the euro symbol (€) for every locale, even if the locale did not support the euro. For example, returned LSEuroCurrencyFormat(123.45, "international")
  • Page 15 Function Description of change LSDateFormat In ColdFusion MX, returns the appropriate date for the set LSDateFormat locale. For example, returns Jan-12-2002 if the LSDateFormat(12/01/02) locale is set to English (UK), and Dec-01-2002 if the set locale is English(US). In ColdFusion 5, throws an error or returns an incorrect LSDateFormat format.
  • Page 16: Other Locale-Specific Changes

    • If the time zone is not specified in the date/time string parameter, ColdFusion MX does not adjust the time value. When developing an application, Macromedia recommends that you evaluate the entered time string for a time zone setting and, if necessary, change your application to adjust the value.
  • Page 17: Other Changes

    Other changes This section describes other changes between ColdFusion 5 and ColdFusion MX. Advanced security ColdFusion MX provides a new and easy way for you to build user authentication and roles-based security into your applications. However, it is based on a completely different security model than ColdFusion 5.
  • Page 18: Cfml Data Types

    Note: The following locales use 28 as the date pivot point instead of 20: English (Australian), English (New Zealand), German (Austrian), German (Standard), German (Swiss), Portuguese (Brazilian), Portuguese (Standard), and Swedish. Macromedia has confirmed this inconsistency using the SUN JRE version 1.4 and the IBM JRE version 1.3.0.
  • Page 19: Request Variable

    So in ColdFusion MX, if the date is within 80 years before and 20 years after the date when it processes the date, then ColdFusion MX returns the date with the current century. Otherwise, it returns the previous century. In ColdFusion 5, if the date is within 71 years before and 29 years after the date when it processes the date, then ColdFusion 5 returns the current century.
  • Page 20: Log Files

    CFM pages in directories that use virtual mappings, you must reconfigure your application and move these pages to a nonvirtual directory. For more information, see the WebSphere pages on www.macromedia.com/go/cfmxj2ee-cert. The application.cfc file The updated application framework in ColdFusion MX 7 lets you use a file named Application.cfc to control your application and keep track of application events.
  • Page 21: Tag And Function Examples

    Tag and function examples This section provides remedies for some of the compatibility issues listed in Chapter 3, “Tag and Function Changes.” Using cfregistry in ColdFusion MX tag is deprecated for UNIX and Linux platforms. Therefore, you must remove it cfregistry on UNIX to avoid compatibility problems when migrating to a later version of ColdFusion MX.
  • Page 22: Using The Cfindex Tag In Coldfusion Mx

    Using the cfindex tag in ColdFusion MX To populate a collection with the contents of the query results, you can now use the cfindex with the attribute and , for all actions that require query type = "file" type = "path" information from the attribute.
  • Page 23: Configurations

    CHAPTER 2 Changes in ColdFusion MX 7 This chapter describes functionality changes in ColdFusion MX 7. It does not include information on tag and function changes. For information on tag and function changes, see Chapter 3, “Tag and Function Changes.” Contents Configurations.
  • Page 24: Chapter 2: Changes In Coldfusion Mx 7

    This section describes changes and enhancements in ColdFusion MX 7. Many of these changes may result in changes to your applications. For a complete list of features, enhancements, and changes in ColdFusion MX 7, see the Release Notes at www.macromedia.com/go/ cfmx7_releasenotes. Chapter 2: Changes in ColdFusion MX 7...
  • Page 25 If your application uses the tag or server validation, ensure that you review the cfform enhancement discussions in the Release Notes. In particular, rich forms (using Macromedia Flash) and skinnable forms (using XML) provide major enhancements to form display and processing.
  • Page 26 • The Verity search service consists of three separate processes: k2server for searching k2index for indexing k2admin for administration • Verity searches now return keyword scores for the alternate keywords returned in the Status structure. • Although the Verity search server is very similar to K2 functionality that was previously available in ColdFusion MX, the interface between ColdFusion and Verity has completely changed.
  • Page 27 • The following new functions enable access to SOAP headers in CFML clients and ColdFusion MX web services: AddSOAPRequestHeader AddSOAPResponseHeader GetSOAPRequestHeader GetSOAPResponseHeader GetSOAPRequest GetSOAPResponse IsSOAPRequest For more information, see CFML Reference and ColdFusion MX Developer’s Guide. ColdFusion components (CFCs) You can now call super methods using named arguments. CFCs can now return arrays of CFC instances.
  • Page 28 Encrypt(string, key [ ,algorithm [ ,encoding [ ,IVorSalt [ ,iterations ] ] ] ]) Decrypt(string, key [ ,algorithm [ ,encoding [ ,IVorSalt [ ,iterations ] ] ] ]) For more information, see the TechNote at www.macromedia.com/go/cfmx7_encrypt. OEM updates ColdFusion MX 7 includes updated versions of the following: •...
  • Page 29 ColdFusion MX 7 includes the following new or modified XML functions, parameters, and attribute: • IsXML • IsXMLAttribute • IsXMLDoc • IsXMLElem • IsXMLNode • IsXMLRoot • XmlGetNodeType • XmlNew • attribute XmlParse validator • XmlValidate Additionally, ColdFusion MX 7 includes support for specifying a document path or URL, including a relative URL, in the attribute.
  • Page 30 Data source changes The cfsnippets, CompanyInfo, and CFExamples data sources have been combined into the cfdocexample data source. This database includes all tables from the previous three data sources. It is provided to support the ColdFusion documentation code examples and does not necessarily represent best practices in database design (for example, there is an employee table and an employees table).
  • Page 31 Crystal Reports integration ColdFusion MX 7 supports Crystal Reports versions 9 and 10. Additionally, ColdFusion MX 7 now uses the RDC technology from the Crystal Reports API. You must install Crystal Reports with the following options: • Enable export to disk •...
  • Page 32 Other installation and configuration changes The following changes have been made to ColdFusion configuration: • In the server configuration, the server name is coldfusion (cf_root/runtime/servers/coldfusion). In ColdFusion MX 6.1, the server name was default (cf_root/runtime/servers/default). • The installer for the multiserver configuration (formerly known as the ColdFusion MX with JRun 4 option) automatically creates a JRun user named admin with the same password as the ColdFusion MX Administrator password.
  • Page 33: Chapter 3: Tag And Function Changes

    CHAPTER 3 Tag and Function Changes This chapter describes tag and function changes, by release, starting with the base ColdFusion MX release. Contents Tag changes since ColdFusion 5..........33 Function changes since ColdFusion 5 .
  • Page 34: New Tags, Attributes, Values, And Changes

    New tags, attributes, values, and changes This table lists tags, attributes, and attribute values that have been added since the ColdFusion MX release: Attribute or value Added in this Comment ColdFusion release attribute ColdFusion MX 7 cfapplication scriptProtect attribute Previously, enabling this setDomainCookies attribute caused CFID and CFTOKEN to use domain-...
  • Page 35 Attribute or value Added in this Comment ColdFusion release attribute ColdFusion MX cfcache action="flush" action="flush" (continued) attribute now correctly expires a cached page in the server, the client, or both locations. The cfcache.map file now contains the template name and source timestamp.
  • Page 36 Attribute or value Added in this Comment ColdFusion release attributes ColdFusion MX 7 cfchart style title ColdFusion MX 6.1 xAxisType yAxisType attributes ColdFusion MX ColdFusion MX cfchartdata cfchartseries attribute ColdFusion MX 7 dataLabelStyle value of column type attribute ColdFusion MX attribute changed ColdFusion MX If you use the...
  • Page 37 Attribute or value Added in this Comment ColdFusion release ColdFusion MX 7 cfcomponent style namespace serviceportname porttypename wsdlfile attributes bindingname Extended functionality for hint displayname attributes when publishing document-literal style web services ColdFusion MX attribute ColdFusion MX 7 cfcontent variable attribute for ColdFusion MX 7 cfdirectory...
  • Page 38 Attribute or value Added in this Comment ColdFusion release attribute for ColdFusion MX 7 cffile result upload action attribute for fixnewline action="append" action="write" Change ColdFusion MX When assigning the attributes, the file’s Archive attribute is always set. attributes ColdFusion MX 7 cfform name action...
  • Page 39 Attribute or value Added in this Comment ColdFusion release ColdFusion MX 7 cfformgroup cfformgroup discussion in CFML Reference does not include attribute, which you use for accordion, tabnavigator, and repeater types. For cfformgroup more information, see the Release Notes. cfformitem ColdFusion MX 7 attribute ColdFusion MX 7...
  • Page 40 Attribute or value Added in this Comment ColdFusion release attribute ColdFusion MX 7 cfhttp result Changes ColdFusion MX 6.1 attribute timeout requires the Java Development Kit (JDK) version 1.4. Otherwise, ColdFusion MX ignores this attribute. tag had many cfhttp enhancements in ColdFusion MX 6.1.
  • Page 41 Attribute or value Added in this Comment ColdFusion release ColdFusion MX 7 cfindex custom3 custom4 category attributes categorytree update refresh actions attribute for Update, status Refresh, Delete, Purge actions attribute New values. For more language information, see CFML Reference. Change ColdFusion MX You can use the query...
  • Page 42 Attribute or value Added in this Comment ColdFusion release attribute (image only) ColdFusion MX 7 cfinput (continued) attribute for ColdFusion MX 7 cfinvoke servicePort web services ColdFusion MX attribute ColdFusion MX 7 cfinvokeargument omit ColdFusion MX attribute ColdFusion MX 7 cfldap returnAsBinary Changes...
  • Page 43 Attribute or value Added in this Comment ColdFusion release (continued) attribute ColdFusion MX If the attribute is cfldap referral referral selected, returns the cfldap name of the referred server before the results. For example, if the referred server is server1.rnd.anytown.anyc , the results orp.com:123 could look like the...
  • Page 44 Attribute or value Added in this Comment ColdFusion release attribute ColdFusion MX cfmail spoolEnable ColdFusion MX 6.1 tag had many charset failto replyTo cfmail enhancements in userName password attributes ColdFusion MX 6.1. For wrapText more information, see the ColdFusion documentation. Change ColdFusion MX ColdFusion MX formats...
  • Page 45 Attribute or value Added in this Comment ColdFusion release Changes ColdFusion MX attribute is cfprocparam maxrows obsolete in ColdFusion MX. If you have ref cursors in packages or stored procedures, use instead. This cfprocresult causes Datadirect JDBC to place the Oracle ref cursors into a result set.
  • Page 46 Attribute or value Added in this Comment ColdFusion release attribute ColdFusion MX 7 cfquery result Change When running in a locale other than US or Japanese, always returns cfquery date fields in numeric format; for example, 12.13.52 or 3:30PM. Changes ColdFusion MX ColdFusion MX disallows SQL reserved words as...
  • Page 47 Attribute or value Added in this Comment ColdFusion release ColdFusion MX 7 cfreport template format name filename query overwrite permissions encryption , and ownerpassword attributes userpassword Changes ColdFusion MX This tag no longer manages the data connection for a Crystal report.
  • Page 48 Attribute or value Added in this Comment ColdFusion release Change ColdFusion MX You can no longer have cfswitch code inside a cfswitch that is not in a cfcase tag. cfdefaultcase ColdFusion 5 erroneously ignores the code, whereas ColdFusion MX correctly throws a compiler error.
  • Page 49: Deprecated Tags, Attributes, And Values

    Deprecated tags, attributes, and values The following tags, attributes, and attribute values are deprecated. Do not use them in ColdFusion applications. They might not work, and might cause an error, in releases later than ColdFusion MX. Attribute or value Deprecated as of this ColdFusion release cfcache attributes.
  • Page 50: Obsolete Tags, Attributes, And Values

    Attribute or value Deprecated as of this ColdFusion release attributes ColdFusion MX cfsearch external language attribute ColdFusion MX 7 cfselect passthrough cfservlet ColdFusion MX ColdFusion MX cfservletparam ColdFusion MX cfslider imgStyle grooveColor refreshLabel tickmarkimages tickmarklabels tickmarkmajor attributes tickmarkminor ColdFusion MX cfstoredproc connectString dbName...
  • Page 51: Function Changes Since Coldfusion 5

    Attribute or value Obsolete as of this ColdFusion release attribute ColdFusion MX cfprocparam maxrows ColdFusion MX cfsetting catchExceptionsByPattern attribute Function changes since ColdFusion 5 The following tables list functions, parameters, and values that have changed since ColdFusion 5 and indicate the specific release in which the change was made. Each change might affect code that was written for a previous release.
  • Page 52 Function Parameter, Added in this Comment value, or ColdFusion change release DateAdd L key of ColdFusion MX 6.1 datepart parameter DateDiff Change ColdFusion MX In ColdFusion 5, there is one less second in a minute when calculating a negative difference. For example, it returns 60 seconds between , but 03:44:23...
  • Page 53 Function Parameter, Added in this Comment value, or ColdFusion change release GetContextRoot ColdFusion MX 7 ColdFusion MX GetEncoding Change ColdFusion MX When the locale has not been GetLocale explicitly set using SetLocale returns the default GetLocale locale of the client computer’s operating system.
  • Page 54 Function Parameter, Added in this Comment value, or ColdFusion change release IsWDDX Change ColdFusion MX This function returns No for arrays and other complex values. ColdFusion 5 returns an error. ColdFusion MX and ColdFusion 5 accept a basic value, such as a string, number, logical value, or date and time value.
  • Page 55 Function Parameter, Added in this Comment value, or ColdFusion change release LSCurrencyFormat Changes ColdFusion MX This function returns a negative number when passed a negative number. With the argument, this local function returns the currency in the locale’s standard format, such as £ for pounds in the English (UK) locale.
  • Page 56 Function Parameter, Added in this Comment value, or ColdFusion change release REFind Changes ColdFusion MX These functions exclude REReplace questionable punctuation, REFindNoCase such as +, $, and =, in the REReplaceNoCase class of regular [[:punct:]] expression functions. These functions recognize accented letters in the appropriate character classes, such as :upper:,...
  • Page 57 Function Parameter, Added in this Comment value, or ColdFusion change release REReplace Changes ColdFusion MX In replacement strings, the REReplaceNoCase following character pairs now represent case conversion codes: \E, \l, \L, \u, and \U. If your ColdFusion 5 application has a replacement string with one of these character pairs, escape it by prefixing it with a backslash;...
  • Page 58: Deprecated Functions, Parameters, And Values

    Function Parameter, Added in this Comment value, or ColdFusion change release XmlElemNew ColdFusion MX 7 namespace parameter ColdFusion MX 7 XmlGetNodeType XmlNew ColdFusion MX ColdFusion MX XmlParse ColdFusion MX 7 XmlParse validator parameter ColdFusion MX XmlSearch ColdFusion MX XmlTransform ColdFusion MX 7 XmlTransform parameters parameter...
  • Page 59: Obsolete Functions, Parameters, And Values

    Obsolete functions, parameters, and values The following functions, parameters, and values are obsolete. Do not use them in ColdFusion applications. They do not work in releases later than ColdFusion 5. As of ColdFusion MX 7, you can create user-defined functions that have the following names: Function Parameter or value Obsolete as of this ColdFusion release...
  • Page 60 Chapter 3: Tag and Function Changes...

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents