I have been visiting lots of customers recently, primarily demonstrating ColdFusion MX 7 functionality. One question that keeps cropping up (particularly from customers who have been looking at Macromedia Flex) is “why would I need Flex if I have Flash Forms in ColdFusion MX 7?”.
I’ve written about this previously, (and Tim Buntel and I even discussed it in our MAX keynote), but apparently there is still some ambiguity about this one, so …
One of the goals of ColdFusion MX 7 was to improve Web page forms; both improving the development of forms, as well as the end-user experience. To this end we introduced in ColdFusion MX 7 additional validation options, support for XForms, and a feature we call Flash Forms. The latter makes it possible to generate sophisticated and engaging Flash based forums using simple CFML tags (and some optional embedded ActionScript), nothing more is needed, just ColdFusion and CFML. ColdFusion uses these tags to dynamically construct ActionScript which is compiled into a Flash SWF which in turn is embedded into your page. In other words, ColdFusion MX 7 allows CFML developers to start to benefit from the power and capabilities of the Flash Player without having to know a whole lot about Flash (and without needing anything more than ColdFusion). ColdFusion does this by taking advantage of Flex technology built right inside of ColdFusion MX 7, ColdFusion is leveraging a small part of Flex to provide Flash Forms functionality.
But it is just a small part of Flex. Using ColdFusion it is possible to create forms that are essentially HTML form replacements. Flex, on the other hand, does a whole lot more. So what is the difference between the capabilities of Flex and that of ColdFusion Flash Forms? Consider the following:
- ColdFusion Flash forms are just that, forms, drop-in replacements for limited HTML functionality. Flex can also be used to create forms, but forms are just a small part of Flex applications. And the word applications is key. Flex is all about complete application front ends which may indeed include forms, but will also include different windows and data grids and all sorts of back-end interaction and different views and sophisticated user interaction and a whole lot more.
- ColdFusion Flash forms are page based, click on the submit button and the form is submitted just like an HTML form. ColdFusion Flash forms cannot make callbacks to the server via SOAP or AMF the way Flex can. Similarly, when ColdFusion forms are submitted they force a page change, unlike forms within Flex applications which allow developers to execute server-side actions in response to client-side events without page refreshes. For example, if you were editing data in a Flex data grid you could submit changes as they were made, or as you moved from row to row within the grid. You cannot do this in Flash Forms, the Flash Forms grid keeps all changes locally until the form is submitted at which time all changes are submitted to ColdFusion for processing. Similarly, if you were using a form with multiple pages (a tab navigator or an accordion control), Flex would allow submission as you moved from page to page, whereas ColdFusion Flash Forms would not. As I already explained, Flash Forms are designed to work like HTML forms, and so they are submitted to an ACTION page just like HTML forms. This makes dropping Flash Forms into existing applications quick and easy, but it does not allow for the sophisticated client-server functionality made possible by Flex.
- ColdFusion Flash forms are limited to the controls made available via ColdFusion. These cannot be subclassed and extended with the way controls in Flex forms could be, nor can you write your own controls from scratch the way Flex developers can.
- Developers cannot control the Flash code generated by ColdFusion, and cannot write their own ActionScript to be included (except for simple inline expressions). Flex developers obviously can do so, and a whole lot more.
In other words, the Flash forms generated by ColdFusion MX 7 expose a small subset of Flex’s capabilities to ColdFusion developers. But ColdFusion MX 7 is in no way an alternative to Flex. If all you need is better forms, and want to take advantage of Flash to deliver a better forms experience, then ColdFusion MX 7 Flash Forms may be exactly what you need. But as soon as you need more, you’ll need to take a look at Flex.
Leave a Reply