Title: ColdFusion 9 and Flex 4: Application Development
1ColdFusion 9 and Flex 4Application Development
- Ryan Stewart
- Platform Evangelist, Adobe Systems
- ryan_at_adobe.com
- Twitter _at_ryanstewart
2About Ryan
- Adobe Employee 2 years
- CF Developer at Wharton
- Interests Beer, the Outdoors
3Agenda for Today
- Using Flash Builder 4 with ColdFusion 9
- Fun new features in Flex 4
- ColdFusion as a Service in your Flex Applications
4Flash 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
5Plugging 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-you
r-coldfusion-builder-beta-settings-for-flash-build
er-4-beta
6Helpful 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
7Working with Data
- New Data Features in Flash Builder 4 for
ColdFusion Developers
8Data 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
9Advanced 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.
10Checking the Flow of Information
- Were you a Flex 1.5 developer? Do you remember
the Network Monitor? - Its 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
11Demo
- Using the Data Centric Development Workflow with
Flex and ColdFusion
12Flex 4
- Fun New Features for Creative ColdFusion
Developers
13- Improved States Syntax
- 2-way Data Binding
- Advanced CSS
- New Animation
- New Layout Model
14New 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
15MXML Graphics and FXG
- Creative Suite Tools Support FXG Graphics
- XML-based
- Map closely to the Flash Player Model
- Supports
- Gradients
- Fills
- Shapes and Paths
- Filters
ltsstrokegt ltsSolidColor /gt lt/sstrokegt
ltsPath /gt
ltsfillgt ltsLinearGradient /gt lt/sfillgt
ltsfiltersgt ltsDropShadowFilter /gt lt/sfiltersgt
16Demo
17ColdFusion As a Service
- Using ColdFusion Inside of your Flex and AIR
Applications
18Working 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
19There is a Better Way
- Consume ColdFusion services from right within a
Flex/AIR application - Use similar syntax and properties
- Take advantage of ColdFusions more powerful
features
20Supported 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 (
21Using 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
22Configuring ColdFusion Services cfInternalConfig
- 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 cfInternalConfig to set up the URL, port,
and user for the ColdFusion Services - That cfInternalConfig tag applies to all other
ColdFusion services called
CF Administrator
Configured Users and IP Addresses
AMF
Web Service
Flex Application
cfInternalConfig Information
cf Services
23Demo
- Using ColdFusion as a Service in Flex
24QA