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

Summary of COLFUSION MX 7-MIGRATING APPLICATIONS TO COLDFUSION MX 7

  • Page 1

    Coldfusion ® mx 7 migrating applications to coldfusion mx 7.

  • Page 2

    Trademarks 1 step robopdf, activeedit, activetest, authorware, blue sky software, blue sky, breeze, breezo, captivate, central, coldfusion, contribute, database explorer, director, dreamweaver, fireworks, flash, flashcast, flashhelp, flash lite, flashpaper, flex, flex builder, fontographer, freehand...

  • Page 3: Contents

    3 contents chapter 1: migrating applications from coldfusion 5 . . . . . . . . . . . . . . . . . . . . . 5 migrating to coldfusion mx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 planning your migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 4

    4 contents tag and function examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 using listsort in coldfusion mx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 using the cfindex tag in coldfusion mx . . . . . . . . . . . . . . . . . ...

  • Page 5: Chapter 1

    5 chapter 1 migrating applications from coldfusion 5 this chapter describes migration and known compatibility issues between coldfusion server 5 and later versions, including coldfusion mx 6.1 and coldfusion mx 7 (referred to in this chapter as coldfusion mx). Contents migrating to coldfusion mx . ....

  • Page 6

    6 chapter 1: migrating applications from coldfusion 5 before planning your migration, make sure that you understand the coldfusion mx configuration options: server configuration lets you install one instance of coldfusion mx 7 with an embedded j2ee server. This configuration most closely resembles t...

  • Page 7

    Planning your migration 7 when running in the server configuration, coldfusion mx uses the built-in web server, as follows: • the coldfusion mx administrator is located under the cf_root/wwwroot directory in a directory named cfide; cfm pages are located within the cf_root/wwwroot directory. • to ac...

  • Page 8

    8 chapter 1: migrating applications from coldfusion 5 5. Install coldfusion mx on the test computer. The install wizard detects the previous version of coldfusion and prompts you for the following: ■ location of previous coldfusion directory. ■ location of cfide directory. ■ whether to switch your w...

  • Page 9

    Using the configuration and settings wizard 9 4. Define data sources in the coldfusion mx administrator. If possible, do not run tests against a production database. 5. Copy cfm files to the cf_root/wwwroot (server configuration) or jrun_root/servers/coldfusion/ cfusion-ear/cfusion-war (multiserver ...

  • Page 10

    10 chapter 1: migrating applications from coldfusion 5 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 compati...

  • Page 11

    Database operations 11 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 ...

  • Page 12

    12 chapter 1: migrating applications from coldfusion 5 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 curren...

  • Page 13

    Localization and character handling 13 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 m...

  • Page 14

    14 chapter 1: migrating applications from coldfusion 5 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 lseuroc...

  • Page 15

    Localization and character handling 15 lsdateformat in coldfusion mx, lsdateformat returns the appropriate date for the set locale. For example, lsdateformat(12/01/02) returns jan-12-2002 if the locale is set to english (uk), and dec-01-2002 if the set locale is english(us). In coldfusion 5, lsdatef...

  • Page 16

    16 chapter 1: migrating applications from coldfusion 5 for more information, see cfml reference for the relevant function. Other locale-specific changes following are other locale-specific issues that could cause an incompatibility in your coldfusion 5 applications: • for the japanese version, sort ...

  • Page 17

    Other changes 17 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...

  • Page 18

    18 chapter 1: migrating applications from coldfusion 5 cfml data types coldfusion mx preserves the case of a struct key, whereas coldfusion 5 sets every struct key to uppercase. However, you cannot use dot notation with different case to create more than one key. For example, the following code prod...

  • Page 19

    Other changes 19 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 ...

  • Page 20

    20 chapter 1: migrating applications from coldfusion 5 log files coldfusion mx does not support the following coldfusion 5 log files: • executive.Log • remote.Log • proxy.Log • cfadmin.Log • install.Log • server.Stdout • rdsservice.Stdout using cfform in a multihomed environment in coldfusion 5, the...

  • Page 21

    Tag and function examples 21 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 the cfregistry tag is deprecated for unix and linux platforms. Therefore, you must remove it o...

  • Page 22

    22 chapter 1: migrating applications from coldfusion 5 using the cfindex tag in coldfusion mx to populate a collection with the contents of the query results, you can now use the cfindex tag with the query attribute and type = "file" or type = "path" , for all actions that require information from t...

  • Page 23: Chapter 2

    23 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

    24 chapter 2: changes in coldfusion mx 7 using cfform in a multihomed environment in coldfusion 5, the cfform tag used inline javascript code for validation. In coldfusion mx, cfform includes the cfide/scripts/cfform.Js file, which contains all javascript. However, if your application runs in a host...

  • Page 25

    Other changes in coldfusion mx 7 25 forms and validation enhancements if your application uses the cfform tag or server validation, ensure that you review the enhancement discussions in the release notes. In particular, rich forms (using macromedia flash) and skinnable forms (using xml) provide majo...

  • Page 26

    26 chapter 2: changes in coldfusion mx 7 • 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 ve...

  • Page 27

    Other changes in coldfusion mx 7 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 in...

  • Page 28

    28 chapter 2: changes in coldfusion mx 7 support for strong encryption algorithms additional parameters were added to the encrypt and decrypt functions after the coldfusion mx 7 manuals went sent to the printer. These changes make it possible to interact with password-based encryption algorithms and...

  • Page 29

    Other changes in coldfusion mx 7 29 coldfusion mx 7 includes the following new or modified xml functions, parameters, and attribute: • isxml • isxmlattribute • isxmldoc • isxmlelem • isxmlnode • isxmlroot • xmlgetnodetype • xmlnew • xmlparse validator attribute • xmlvalidate additionally, coldfusion...

  • Page 30

    30 chapter 2: changes in coldfusion mx 7 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 c...

  • Page 31

    Other changes in coldfusion mx 7 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 • e...

  • Page 32

    32 chapter 2: changes in coldfusion mx 7 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...

  • Page 33: Chapter 3

    33 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 ...

  • Page 34

    34 chapter 3: tag and function changes new tags, attributes, values, and changes this table lists tags, attributes, and attribute values that have been added since the coldfusion mx release: tag attribute or value added in this coldfusion release comment cfapplication scriptprotect attribute coldfus...

  • Page 35

    Tag changes since coldfusion 5 35 cfcache (continued) action="flush" attribute coldfusion mx the action="flush" 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. Cfcalendar all coldfus...

  • Page 36

    36 chapter 3: tag and function changes cfchart style , title attributes coldfusion mx 7 xaxistype , yaxistype attributes coldfusion mx 6.1 all coldfusion mx cfchartdata all coldfusion mx cfchartseries datalabelstyle attribute coldfusion mx 7 column value of type attribute all coldfusion mx cfcol hea...

  • Page 37

    Tag changes since coldfusion 5 37 cfcomponent style , namespace , serviceportname , porttypename , wsdlfile , and bindingname attributes coldfusion mx 7 extended functionality for the hint and displayname attributes when publishing document-literal style web services all coldfusion mx cfcontent vari...

  • Page 38

    38 chapter 3: tag and function changes cffile result attribute for upload action coldfusion mx 7 fixnewline attribute for action="append" and action="write" change coldfusion mx when assigning the attributes, the file’s archive attribute is always set. Cfform name and action attributes coldfusion mx...

  • Page 39

    Tag changes since coldfusion 5 39 cfformgroup all coldfusion mx 7 the cfformgroup discussion in cfml reference does not include the id attribute, which you use for accordion, tabnavigator, and repeater cfformgroup types. For more information, see the release notes . Cfformitem all coldfusion mx 7 cf...

  • Page 40

    40 chapter 3: tag and function changes cfhttp result attribute coldfusion mx 7 changes coldfusion mx 6.1 the timeout attribute requires the java development kit (jdk) version 1.4. Otherwise, coldfusion mx ignores this attribute. The cfhttp tag had many enhancements in coldfusion mx 6.1. For more inf...

  • Page 41

    Tag changes since coldfusion 5 41 cfindex custom3 , custom4 , category , and categorytree attributes for update and refresh actions coldfusion mx 7 status attribute for update, refresh, delete, purge actions language attribute new values. For more information, see cfml reference. Change coldfusion m...

  • Page 42

    42 chapter 3: tag and function changes cfinput (continued) src attribute (image only) coldfusion mx 7 cfinvoke serviceport attribute for web services coldfusion mx 7 all coldfusion mx cfinvokeargument omit attribute coldfusion mx 7 all coldfusion mx cfldap returnasbinary attribute coldfusion mx 7 ch...

  • Page 43

    Tag changes since coldfusion 5 43 cfldap (continued) referral attribute coldfusion mx if the referral attribute is selected, cfldap returns the name of the referred server before the results. For example, if the referred server is server1.Rnd.Anytown.Anyc orp.Com:123 , the results could look like th...

  • Page 44

    44 chapter 3: tag and function changes cfmail spoolenable attribute coldfusion mx charset , failto , replyto , username , password , wraptext attributes coldfusion mx 6.1 the cfmail tag had many enhancements in coldfusion mx 6.1. For more information, see the coldfusion documentation. Change coldfus...

  • Page 45

    Tag changes since coldfusion 5 45 cfprocparam changes coldfusion mx the maxrows attribute is obsolete in coldfusion mx. If you have ref cursors in packages or stored procedures, use cfprocresult instead. This causes datadirect jdbc to place the oracle ref cursors into a result set. Note: you cannot ...

  • Page 46

    46 chapter 3: tag and function changes cfquery result attribute coldfusion mx 7 change when running in a locale other than us or japanese, cfquery always returns date fields in numeric format; for example, 12.13.52 or 3:30pm. Changes coldfusion mx coldfusion mx disallows sql reserved words as variab...

  • Page 47

    Tag changes since coldfusion 5 47 cfreport template , format , name , filename , query , overwrite , permissions , encryption , ownerpassword , and userpassword attributes coldfusion mx 7 changes coldfusion mx this tag no longer manages the data connection for a crystal report. The tag passes dataso...

  • Page 48

    48 chapter 3: tag and function changes cfswitch change coldfusion mx you can no longer have code inside a cfswitch tag that is not in a cfcase or cfdefaultcase tag. Coldfusion 5 erroneously ignores the code, whereas coldfusion mx correctly throws a compiler error. Cftable header attribute changed co...

  • Page 49

    Tag changes since coldfusion 5 49 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. Tag attribute or value depre...

  • Page 50

    50 chapter 3: tag and function changes obsolete tags, attributes, and values the following tags, attributes, and attribute values are obsolete. Do not use them in coldfusion applications. They do not work, and might cause an error, in releases later than coldfusion 5. Cfsearch external , language at...

  • Page 51

    Function changes since coldfusion 5 51 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 re...

  • Page 52

    52 chapter 3: tag and function changes dateadd l key of datepart parameter coldfusion mx 6.1 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 03:44:23 and 03:45:23 , but -59 seconds ...

  • Page 53

    Function changes since coldfusion 5 53 getcontextroot all coldfusion mx 7 getencoding all coldfusion mx getlocale change coldfusion mx when the locale has not been explicitly set using setlocale , getlocale returns the default locale of the client computer’s operating system. In coldfusion 5, getloc...

  • Page 54

    54 chapter 3: tag and function changes 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. Isxml all coldfusion m...

  • Page 55

    Function changes since coldfusion 5 55 lscurrencyformat changes coldfusion mx this function returns a negative number when passed a negative number. With the local argument, this function returns the currency in the locale’s standard format, such as £ for pounds in the english (uk) locale. With the ...

  • Page 56

    56 chapter 3: tag and function changes refind rereplace refindnocase rereplacenocase changes coldfusion mx these functions exclude questionable punctuation, such as +, $, and =, in the [[:punct:]] class of regular expression functions. These functions recognize accented letters in the appropriate ch...

  • Page 57

    Function changes since coldfusion 5 57 rereplace rereplacenocase changes coldfusion mx in replacement strings, the 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, escap...

  • Page 58

    58 chapter 3: tag and function changes deprecated functions, parameters, and values the following functions, parameters, and 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. Xmlelemnew namespace pa...

  • Page 59

    Function changes since coldfusion 5 59 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 functio...

  • Page 60

    60 chapter 3: tag and function changes.