📜 ⬆️ ⬇️

What's new in ColdFusion 9

Free translation of an article by Joshua Curtiss - What's New in ColdFusion 9.

First of all, ColdFusion 9 also introduces a new product - ColdFusion Builder - this is an Eclipse-based IDE, “to manage everything”. Because it works on the Eclipse platform, you can also combine different products, such as Flash Builder, so that one IDE does all the work, be it HTML, CFML, JS, Flex, ActionScript, CSS, etc.

ColdFusion Builder offers some interesting server integration features. You can access ColdFusion Administrator and other features directly from ColdFusion Builder; You can find and view all the databases that ColdFusion has access to. With such functions, you can do such cool things as automatic CFC generation on the basis of ORM, pointing to it in an already existing database table! The only thing he does not create is a CFC bean. It constitutes a full level of service: including DAO and Gateway beans! Well, obviously, this is just the beginning. It is expected that you tweak it based on the foregoing. By integrating Flash Builder, you can go to the next level by generating ActionScript objects, which also helps integrate Flex.
')
Advanced CFML

So, Application.cfc was introduced in CF7, which supports interception of application events. But now in CF9 there is a Server.cfc with an onServerStart () method for working with such an event.

Various other spaces have been filled. You now have nested CFTRANSACTION tags. The error detection block now supports the “finally” keyword. Now cycles support CFCONTINUE .

Improved variables: you can now pass implicit structures / arrays to tags and functions. First you had to assign a structure / array to a variable, and then pass. There is a chain of assignments (a = b = c) . Direct access to the elements of the returned arrays (i.e., myFunction () [x] could not be performed in advance). And finally, the ternary operator! For example, you can do something like this: a = (b ‹c)? B: c

CFSCRIPT optimization. Starting from CF9, you can write 100% scripting code, including classes and components.

Refinement CFC. Now there is an explicit LOCAL area. Instead of var myvar = 1 you can write LOCAL.myvar = 1 . Moreover, you can declare a variable with var anywhere in the code, not just at the beginning. CFC also supports implicit recipients / installers using the CFPROPERTY tag. They should be used if special processing is not used, as they are 7 times faster than your own recipients / installers.

And here's another great feature. You no longer have to use CreateObject () to create a CFC. You can use the IMPORT keyword to specify the directory of CF components and make them elements of a higher order in your program. You can also use the NEW keyword to create CF components, for example, user = new User () . More similarities with Java.

How to convince the boss of the need to upgrade

First of all, CFIMAP helps to access mail with support for IMAP protocols, such as GMail.

Extended PDF support. Creating PDF packages, inserting / deleting headers and notes, optimizing PDF files (for example, reducing the resolution of images), extracting text / images, high-quality thumbnails, converting Word documents to PDF format.

There is the possibility of creating presentations. The CFPRESENTATION tag will create PPT files from CFML / HTML. You can also go another way: convert PPT to HTML or Flash. Microsoft PowerPoint versions from 97 to 08 and Open Office Presentations are supported.

Spreadsheet support. CFSPREADSHEET helps you create, read, and merge Excel spreadsheets. This is not just a CSV file. This is a real Excel spreadsheet with formulas and the ability to specify a format.

SharePoint integration. Native access to SharePoint data and services (sites, templates, sub-sites, modules and workspaces). You can get registries, including data, database breaks and warnings and queries on registries. Users, access rights, dial plans, crossed groups, security groups and distribution groups.
Create modules with CFML. Integrate with SharePoint Single sign-on. You may ask: “Why is this necessary, because SharePoint has web services and presents information as XML?” Because it is difficult. ColdFusion makes it much easier and faster.

Server Manager ColdFusion. The AIR application on the Flex platform helps you manage multiple ColdFusion servers. In addition, it receives system alerts and warnings of a possible error. It helps to apply the installation on multiple servers.

Next generation applications

Coldfusion 9 ORM functionality. Developed using the Java Hibernate framework, it is therefore an industry standard. The various functions of ormXXX () and entityXXX () provide you with functionality. With such components, SQL is no longer needed, so the application development process is accelerating (and the number of errors is theoretically reduced). CF components will be inexplicably saved. But the point is not only to reduce development time, but also that your application no longer depends on the database. Just point to any database server, and it should just work.

Improved caching. ColdFusion is already quite optimized for accelerated work (especially versions CF7 and CF8). Therefore, for even greater acceleration, developers need to use these new features. Using cacheGet () , cachePut () and cacheGetMetaData () , you can save / load data from the embedded cache. Caching page fragments allows you to combine static and dynamic content on a page. This provides a HUGE increase in performance depending on what you are doing. For example, you want to create a menu dynamically for the first time, but another area of ​​the page is dynamic all the time.

Productivity growth. ColdFusion 9 is only 40% faster than ColdFusion 8, with no changes in the code, but only an upgrade to ColdFusion. Creating CFC is 8 times faster, calling the method 3 times, and creating a UUID 100 times. Some huge problems have been fixed. There is also a short list of performance improvements that Adobe will release in the near future with respect to ColdFusion 9.

Search engine ColdFusion 9 now includes Apache Solr. Verity is still enabled, as is Solr, which is actually faster than Verity. So you can just upgrade to Solr! CF9 includes a migration utility from Verity to Solr.

ColdFusion Server API. You can get direct access to ColdFusion services for CFCHART , CFDOCUMENT , CFPDF , CFIMAGE and others. It becomes even easier to get access to ColdFusion mail services / pdf / images directly in Flex without having to write ColdFusion code.

In addition, Flash Remoting is 9 times faster. It is possible that this is the fastest server flash technology.

There are various JavaScript / Ajax tags, such as CFMAP for Google Maps, CFMESSAGEBOX , CFSLIDER , etc. The Ajax functionality in CF is developed on ExtJS 3.0 (which is good, since ExtJS is no longer free, so by purchasing CF9, you get a copy of ExtJS), and also supported by jQuery.

This presentation was very short-lived and was only evidence of how rich the functions of the updated version of ColdFusion 9 are.

Source: https://habr.com/ru/post/73425/


All Articles