Parameter
New features & enhancements in Adobe ColdFusion
ColdFusion Administrator now sports a cleaner, more intuitive User Interface. The interface is arranged in tabs for easy navigation. The search experience is also enhanced in this release. When you enter a search string, you can see recommendations for the search term.
For more information, see New UI for Administrator.
The 2018 release of Adobe ColdFusion Enterprise and Standard editions now offer you the Performance Monitoring Toolset, an all-new solution that ensures that your applications are as optimized as the high-performing ColdFusion engine.
For more information, see Performance Monitoring Toolset.
Secure your ColdFusion server against vulnerabilities and other malicious attacks. Run the Auto-Lockdown tool and lock down ColdFusion instances.
For more information, see Server Auto-Lockdown.
ColdFusion (2018 release) introduces Read-Eval-Print-Loop (REPL). REPL, a shell, is an interactive programming environment that takes single user inputs, evaluates them, and returns the result to the user.
For more information, see REPL.
Try out your ColdFusion REST services in the new REST Playground. Use the REST Playground to test, develop, and document web services.
For more information, see REST enhancements in ColdFusion (2018 release).
Boost performance through caching with the newly added engines:
For more information, see Caching enhancements.
ColdFusion Builder (2018 release) includes the following:
For more information, see What's new in ColdFusion Builder.
In this release, we have added support for making semicolons optional in cfscript. For example, the snippet below does not use any semicolon at the end of a statement.
<cfscript> animals = ['cat','dog','fish','bison'] lastAnimal=animals.last() writeOutput("The last element of the array is: " & lastAnimal) </cfscript>
A semicolon is not optional in a FOR loop. However, a semicolon is optional in a while loop.
<cfscript> for(i=1;i<9;i++){ for(j=1;j<=i;j++) writeoutput("*") writeoutput("<br/>") } </cfscript>
A semicolon is optional in generic syntax for ColdFusion tags. For example,
<cfscript> cfhttp(url="http://localhost:8500", timeout="60") </cfscript>
A semicolon is also optional in script-based components. For example,
component{ function myfunc(){ writeoutput("Optional Semi Colon Example") } }
In closures in tags,
A semi-colon is also optional while defining the body of closure functions in tags. For example,
<cfset closureFunc1=function(){ return true }>
In the 2018 release of ColdFusion, there is support for negative index for a string’s left and right functions.
<cfscript> myString='Welcome to ColdFusion' writeoutput( myString.right( -1 ) & "<br>") writeoutput( myString.left( -1 ) & "<br>") writeoutput( myString.right( -8 ) & "<br>") writeoutput( myString.left( -8 ) & "<br>") </cfscript>
Output
elcome to ColdFusion
Welcome to ColdFusio
to ColdFusion
Welcome to Co
You can chain member functions together to produce a desired output.
<cfscript> // Example 1 myarray=ArrayNew(1); new_arr= myarray.clear().Resize(10).set(1,10,"blah"); writedump(new_arr); </cfscript>
<cfscript> // Example 2 ordered_struct=["key1":"val1","key2":"val2"] unordered_struct={"key3":"val3","key4":"val4"} new_struct=unordered_struct.append(ordered_struct).update("key4","updated val4").insert("key5","inserted val5"); writedump(new_struct); writedump(unordered_struct); </cfscript>
Apart from adding these functions, the following member functions return appropriate array or struct values, as required when chaining the functions.
In this release, there is support for new operator/syntax for com, component, CORBA, Java,. Net, webservice. For examples,
For examples,
Employee.cfc
component { public numeric function getPaid() { var salary=40*20; return salary; } }
Manager.cfc
component extends="employee"{ public numeric function getPaid(){ var salary=1.5*Super.getPaid(); return salary; } }
President.cfc
component extends="manager"{ public numeric function getpaid(){ var salary=1.5*Super.getPaid(); return salary; } }
Payday.cfm
<cfscript> // change the paths as required empObj=new component("path/to/employee.cfc"); manObj=new component("path/to/manager.cfc"); presObj=new component("path/to/president.cfc"); writeOutput("Employee earns: " & empObj.getPaid() & "<br/>"); writeOutput("Manager earns: " & manObj.getPaid() & "<br/>"); writeOutput("President earns: " & presObj.getPaid() & "<br/>"); </cfscript>
Named parameters enable you to specify an argument for a parameter by associating the argument with the parameter's name rather than with the parameter's position in the parameter list. You can use named parameters in functions and constructors.
In earlier versions of ColdFusion, named parameters were allowed in user-defined functions and in component constructors.
In ColdFusion (2018 release), you can use named parameters for built in functions.
In previous versions of ColdFusion, the order of parameters in a BIF was necessarily fixed, since it was the only way that ColdFusion could identify which value is intended to be used for which purpose. Now with named parameters, the position or order of parameters does not matter; the arguments are evaluated in the order in which they appear in the list.
For parameter names, refer this document.
<cfscript> myarray= [4,2,1,3] writeoutput(ArrayFind(array=myarray, value="4")) writeoutput(Arrayfind(callback=function(index,item){ if(index == item) return true else return false }, array=myarray)) </cfscript>
ArrayFind can either accept a value to find in an array or a callback that has the searching logic. You can use both value or callback with named parameters as shown in the snippet above.
In this release of ColdFusion, there is support for string literals. For example,
<cfscript> writeOutput("ABCDEFGHIJ".substring(1,7).substring(2,5).lCase().len()); </cfscript>
ColdFusion (2018 release) uses Hibernate 5.2. The following are the highlights:
In the wsconfig tool, there is a new option related to tuning of connectors.
verifyRedisCacheStorageConnection
Description: Verifies connection to the Redis cache storage.
Syntax:
void verifyRedisCacheStorageConnection (sessionStorageHost, numeric sessionStoragePort, sessionStoragePassword)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
sessionStorageHost |
Optional |
Any |
The hostname for Redis cache storage. |
sessionStoragePort |
Optional |
Numeric |
The port number for Redis cache storage. |
sessionStoragePassword |
Optional |
Any |
The password for the Redis cache storage. |
setServerCachingEngine
Description: Changes the caching engine at the server level.
Syntax:
void setServerCachingEngine (required engine)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
engine |
Required |
Any |
|
setJCSClusterDsnName
Description: Set the data source for JCS cluster.
Syntax:
void setJCSClusterDsnName (required dsn, required boolean createTables)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
dsn |
Required |
Any |
Name of the data source. |
createTables |
Required |
Any |
Whether to create a table. |
setCachingRedisServer
Description: Set the caching engine for Redis.
Syntax:
void setCachingRedisServer (required host, required port, required password, required boolean cluster)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
host |
Required |
any |
Host address of the server. |
port |
Required |
any |
Port number of the server. |
password |
Required |
any |
Password of the server. |
cluster |
Required |
Boolean |
Whether a cluster is enabled in Redis. |
getMemcachedServer
Description: Gets the details of the Memcached caching engine.
Syntax:
any getMemcachedServer ()
To see the list of bugs fixed, see Bugs fixed.
To see the list of known issues, see Known issues.
Bei Ihrem Konto anmelden