24
ColdFusion 9 and ColdFusion 9 and Flex 4: Flex 4: Application Application Development Development Ryan Stewart Ryan Stewart Platform Evangelist, Adobe Systems Platform Evangelist, Adobe Systems [email protected] [email protected] Twitter: Twitter: @ryanstewart @ryanstewart

ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems [email protected] Twitter: @ryanstewart

Embed Size (px)

Citation preview

Page 1: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

ColdFusion 9 and Flex ColdFusion 9 and Flex 4:4:Application Application DevelopmentDevelopment

Ryan StewartRyan Stewart

Platform Evangelist, Adobe SystemsPlatform Evangelist, Adobe Systems

[email protected]@adobe.com

Twitter: Twitter: @ryanstewart@ryanstewart

Page 2: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

About RyanAbout Ryan

Adobe Employee: 2 Adobe Employee: 2 yearsyears

CF Developer at CF Developer at WhartonWharton

Interests: Beer, the Interests: Beer, the OutdoorsOutdoors

Page 3: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Agenda for TodayAgenda for Today

Using Flash Builder Using Flash Builder 4 with ColdFusion 94 with ColdFusion 9

Fun new features in Fun new features in Flex 4Flex 4

ColdFusion as a ColdFusion as a Service in your Flex Service in your Flex ApplicationsApplications

Page 4: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Flash Builder for CF Flash Builder for CF DevelopersDevelopers

Both Flash Builder and Both Flash Builder and ColdFusion Builder run on ColdFusion Builder run on EclipseEclipse

Best way to get started:Best way to get started:

Install ColdFusion Builder Install ColdFusion Builder as a plugin into the as a plugin into the standalone version of standalone version of Flash Builder 4Flash Builder 4

Page 5: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Plugging Flash Builder Plugging Flash Builder into CF Builderinto CF Builder

In the current beta you can install the plug-in In the current beta you can install the plug-in version of Flash Builder into the standalone version of Flash Builder into the standalone version of ColdFusion Builderversion of ColdFusion Builder

It requires a change in settings to the CFBuilder.ini It requires a change in settings to the CFBuilder.ini file in the root directory of your installationfile in the root directory of your installation

http://www.adrocknaphobia.com/post.cfm/update-http://www.adrocknaphobia.com/post.cfm/update-your-coldfusion-builder-beta-settings-for-flash-your-coldfusion-builder-beta-settings-for-flash-builder-4-betabuilder-4-beta

Page 6: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Helpful Flex Features in Helpful Flex Features in ColdFusion BuilderColdFusion Builder

ColdFusion Builder supports ColdFusion Builder supports extensionsextensions

Ships with an AS Class Ships with an AS Class GeneratorGenerator

Create AS classes based on a Create AS classes based on a database modeldatabase model

RDS Query ViewerRDS Query Viewer

Create queries right from the Create queries right from the IDEIDE

Snippets PanelSnippets Panel

Save Flex code for reuseSave Flex code for reuse

Page 7: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Working with DataWorking with DataNew Data Features in Flash Builder 4 for New Data Features in Flash Builder 4 for ColdFusion DevelopersColdFusion Developers

Page 8: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Data Centric Data Centric DevelopmentDevelopment

Flash Builder 4 includes new Flash Builder 4 includes new data wizards for ColdFusion data wizards for ColdFusion and other languagesand other languages

Consume or Generate CFCsConsume or Generate CFCs

Inspect methods and Inspect methods and generate return typesgenerate return types

Drag and drop services on to Drag and drop services on to UI components UI components

Generate UI based on a data Generate UI based on a data modelmodel

Page 9: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Map client side data operations to server side operationsMap client side data operations to server side operations

Create, Update, Delete, etc.Create, Update, Delete, etc.

Automate bulk updates & deletionsAutomate bulk updates & deletions

Support for “rollback” of changes to dataSupport for “rollback” of changes to data

One instance of any recordOne instance of any record

Changes reflected wherever data is displayedChanges reflected wherever data is displayed

Paging for large recordsetsPaging for large recordsets

Automatic fetching of X records at a timeAutomatic fetching of X records at a time

Ideal for large datasets in grids, lists, etc.Ideal for large datasets in grids, lists, etc.

Advanced Data FeaturesAdvanced Data Features

Page 10: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Checking the Flow of Checking the Flow of InformationInformation

Were you a Flex 1.5 Were you a Flex 1.5 developer? Do you remember developer? Do you remember the Network Monitor?the Network Monitor?

It’s back!It’s back!

Allows you to see network Allows you to see network traffic between your Flex app traffic between your Flex app and ColdFusion serverand ColdFusion server

See requests and responses See requests and responses in tree or raw viewin tree or raw view

Debug network calls right Debug network calls right from Flash Builderfrom Flash Builder

Page 11: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

DemoDemoUsing the Data Using the Data Centric Centric Development Development Workflow with Flex Workflow with Flex and ColdFusionand ColdFusion

Page 12: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Flex 4Flex 4Fun New Features for Creative ColdFusion Fun New Features for Creative ColdFusion DevelopersDevelopers

Page 13: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Improved States SyntaxImproved States Syntax

2-way Data Binding2-way Data Binding

Advanced CSSAdvanced CSS

New AnimationNew Animation

New Layout ModelNew Layout Model

Page 14: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

New Component ModelNew Component Model

Referred to as the Referred to as the “Spark” Component set“Spark” Component set

Clean separation Clean separation between logic between logic (ActionScript) and (ActionScript) and visual elements (MXML)visual elements (MXML)

Visual elements stored Visual elements stored in a separate filein a separate file

Designs are swappable Designs are swappable at runtimeat runtime

Component (AS)Component (AS) Skin (MXML)Skin (MXML)

BehaviorBehaviorLogicLogicDataData

GraphicsGraphicsLayoutLayout

AnimationAnimationStatesStates

Page 15: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Creative Suite Tools Support Creative Suite Tools Support FXG GraphicsFXG Graphics

XML-basedXML-based

Map closely to the Flash Map closely to the Flash Player ModelPlayer Model

SupportsSupports

GradientsGradients

FillsFills

Shapes and PathsShapes and Paths

FiltersFilters

MXML Graphics and FXGMXML Graphics and FXG

<s:Path /><s:Path /><s:fill><s:fill><s:LinearGradient /><s:LinearGradient /></s:fill></s:fill>

<s:stroke><s:stroke><s:SolidColor /><s:SolidColor /></s:stroke></s:stroke>

<s:filters><s:filters><s:DropShadowFilter /><s:DropShadowFilter /></s:filters></s:filters>

Page 16: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

DemoDemoComponents in Components in Flex 4Flex 4

Page 17: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

ColdFusion As a ServiceColdFusion As a ServiceUsing ColdFusion Inside of your Flex and Using ColdFusion Inside of your Flex and AIR ApplicationsAIR Applications

Page 18: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Working with ColdFusion Working with ColdFusion and Flex Todayand Flex Today

Create a CFC with ColdFusion service Create a CFC with ColdFusion service functionality built into itfunctionality built into it

Make sure to expose that CFC remotelyMake sure to expose that CFC remotely

Use the RemoteObject tag to call CFC from FlexUse the RemoteObject tag to call CFC from Flex

Rinse, Wash, Repeat for every ServiceRinse, Wash, Repeat for every Service

Page 19: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

There is a Better WayThere is a Better Way

Consume Consume ColdFusion services ColdFusion services from right within a from right within a Flex/AIR applicationFlex/AIR application

Use similar syntax Use similar syntax and propertiesand properties

Take advantage of Take advantage of ColdFusion’s more ColdFusion’s more powerful featurespowerful features

Page 20: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

PDF generation and access (cfpdf)PDF generation and access (cfpdf)

Chart generation (cfchart)Chart generation (cfchart)

Document creation (cfdocument)Document creation (cfdocument)

Send mail (cfmail)Send mail (cfmail)

Retrieve POP3 (cfpop)Retrieve POP3 (cfpop)

Create and alter images (cfimage) - no captcha Create and alter images (cfimage) - no captcha :(:(

Supported ServicesSupported Services

Page 21: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Using CFAAS in FlexUsing CFAAS in Flex

Add the cfservices.swc Add the cfservices.swc to your Flex projectto your Flex project

Scope the cfservices Scope the cfservices classes to the cf: classes to the cf: namespacenamespace

Create a configuration Create a configuration tagtag

Start consuming Start consuming servicesservices

Page 22: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Configuring ColdFusion Configuring ColdFusion Services: Services: cf:InternalConfigcf:InternalConfig

In the CF Administrator, In the CF Administrator, create a user and expose create a user and expose specific servicesspecific services

Enable specific IP addresses Enable specific IP addresses (the one your Flex application (the one your Flex application will be served from)will be served from)

Use cf:InternalConfig to set Use cf:InternalConfig to set up the URL, port, and user for up the URL, port, and user for the ColdFusion Servicesthe ColdFusion Services

That cf:InternalConfig tag That cf:InternalConfig tag applies to all other ColdFusion applies to all other ColdFusion services calledservices called

CF AdministratorCF Administrator

Configured Users and IP AddressesConfigured Users and IP Addresses

AMFAMF Web ServiceWeb Service

Flex ApplicationFlex Application

cf:InternalConfig Informationcf:InternalConfig Information

cf: Servicescf: Services

Page 23: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

DemoDemoUsing ColdFusion Using ColdFusion as a Service in as a Service in FlexFlex

Page 24: ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems ryan@adobe.com Twitter: @ryanstewart

Q&AQ&[email protected]@adobe.com