240 likes | 421 Views
ColdFusion 9 and Flex 4: Application Development. Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart. About Ryan. Adobe Employee: 2 years CF Developer at Wharton Interests: Beer, the Outdoors. Agenda for Today. Using Flash Builder 4 with ColdFusion 9
E N D
ColdFusion 9 and Flex 4:Application Development • Ryan Stewart • Platform Evangelist, Adobe Systems • ryan@adobe.com • Twitter: @ryanstewart
About Ryan • Adobe Employee: 2 years • CF Developer at Wharton • Interests: Beer, the Outdoors
Agenda for Today • Using Flash Builder 4 with ColdFusion 9 • Fun new features in Flex 4 • ColdFusion as a Service in your Flex Applications
Flash Builder for CF Developers • Both Flash Builder and ColdFusion Builder run on Eclipse • Best way to get started: • Install ColdFusion Builder as a plugin into the standalone version of Flash Builder 4
Plugging Flash Builder into CF Builder • In the current beta you can install the plug-in version of Flash Builder into the standalone version of ColdFusion Builder • It requires a change in settings to the CFBuilder.ini file in the root directory of your installation • http://www.adrocknaphobia.com/post.cfm/update-your-coldfusion-builder-beta-settings-for-flash-builder-4-beta
Helpful Flex Features in ColdFusion Builder • ColdFusion Builder supports extensions • Ships with an AS Class Generator • Create AS classes based on a database model • RDS Query Viewer • Create queries right from the IDE • Snippets Panel • Save Flex code for reuse
Working with Data • New Data Features in Flash Builder 4 for ColdFusion Developers
Data Centric Development • Flash Builder 4 includes new data wizards for ColdFusion and other languages • Consume or Generate CFCs • Inspect methods and generate return types • Drag and drop services on to UI components • Generate UI based on a data model
Advanced Data Features • Map client side data operations to server side operations • Create, Update, Delete, etc. • Automate bulk updates & deletions • Support for “rollback” of changes to data • One instance of any record • Changes reflected wherever data is displayed • Paging for large recordsets • Automatic fetching of X records at a time • Ideal for large datasets in grids, lists, etc.
Checking the Flow of Information • Were you a Flex 1.5 developer? Do you remember the Network Monitor? • It’s back! • Allows you to see network traffic between your Flex app and ColdFusion server • See requests and responses in tree or raw view • Debug network calls right from Flash Builder
Demo • Using the Data Centric Development Workflow with Flex and ColdFusion
Flex 4 • Fun New Features for Creative ColdFusion Developers
Improved States Syntax • 2-way Data Binding • Advanced CSS • New Animation • New Layout Model
New Component Model • Referred to as the “Spark” Component set • Clean separation between logic (ActionScript) and visual elements (MXML) • Visual elements stored in a separate file • Designs are swappable at runtime Component (AS) Skin (MXML) Graphics Layout Animation States Behavior Logic Data
MXML Graphics and FXG <s:stroke> <s:SolidColor /> </s:stroke> • Creative Suite Tools Support FXG Graphics • XML-based • Map closely to the Flash Player Model • Supports • Gradients • Fills • Shapes and Paths • Filters <s:Path /> <s:fill> <s:LinearGradient /> </s:fill> <s:filters> <s:DropShadowFilter /> </s:filters>
Demo • Components in Flex 4
ColdFusion As a Service • Using ColdFusion Inside of your Flex and AIR Applications
Working with ColdFusion and Flex Today • Create a CFC with ColdFusion service functionality built into it • Make sure to expose that CFC remotely • Use the RemoteObject tag to call CFC from Flex • Rinse, Wash, Repeat for every Service
There is a Better Way • Consume ColdFusion services from right within a Flex/AIR application • Use similar syntax and properties • Take advantage of ColdFusion’s more powerful features
Supported Services • PDF generation and access (cfpdf) • Chart generation (cfchart) • Document creation (cfdocument) • Send mail (cfmail) • Retrieve POP3 (cfpop) • Create and alter images (cfimage) - no captcha :(
Using CFAAS in Flex • Add the cfservices.swc to your Flex project • Scope the cfservices classes to the cf: namespace • Create a configuration tag • Start consuming services
Configuring ColdFusion Services: cf:InternalConfig • In the CF Administrator, create a user and expose specific services • Enable specific IP addresses (the one your Flex application will be served from) • Use cf:InternalConfig to set up the URL, port, and user for the ColdFusion Services • That cf:InternalConfig tag applies to all other ColdFusion services called CF Administrator Configured Users and IP Addresses AMF Web Service Flex Application cf:InternalConfig Information cf: Services
Demo • Using ColdFusion as a Service in Flex
Q&A • ryan@adobe.com