CFUNITED – The premier ColdFusion conference Flex 2.0 and ColdFusion Integration – 101 Nahuel Foronda Laura Arguello
Flex 2 Tool to build GUIs No server required
Flex 2 Composed of: SDK (Compiler and framework) Flex Builder (IDE) Flex Data Services (Server product) Charting components Flex-ColdFusion connectivity
Flex SDK Compiler Languages: MXML and ActionScript 3 Flex Framework Class Library Components Layout managers No server required Free!
Flex Builder IDE based on Eclipse WYSIWYG ColdFusion wizards
Flex Data Services Server product Messaging and Publish/Subscribe Push data Data synchronization
MXML, ActionScript and CSS MXML XML-based language that defines user interface ActionScript 3.0 scripting language that processes logic on the client CSS styles to define look and feel
MXML
MXML: What it defines
CSS
CSS
CSS: What it makes it look like
ActionScript
ColdFusion + Flex Flex replaces user interface (HTML) only, we still need server-side logic ColdFusion provides database interfacing and other services
HTTP Services Send HTTP GET and POST requests Consume simple XML/Rest-style/XML- RPC services
Web Services Flex applications can Interact with web services that define their interfaces in a WSDL document Connect to a SOAP-compliant web service
Remote Objects Access the methods of server-side objects, such as ColdFusion CFC objects Data is transferred in the binary Action Message Format (AMF)
My To-do list sample application CF Wizards (Flex Builder extensions) Generate a complete application to add/edit/remove database records Generate CFCs (DAO, Bean, Gateway objects) only
Class Mapping Flex-ColdFusion class mapping
Bean & DAO
Active Record
Home Locator case study
Organization of an application We must separate it in pieces We can use events to communicate between components
XML namespaces xmlns=“*” for the same folder components xmlns=“myFolder” for components in custom location <mx:Application xmlns:mx=" xmlns="*" xmlns:views="com.homelocator.views.*">
Resources Frameworks ARP: Cairngorm: cairngorm.html Presentation Slides