Your SlideShare is downloading. ×
Accessing ColdFusion Services From Flex Applications
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Accessing ColdFusion Services From Flex Applications

862
views

Published on

Published in: Technology, Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
862
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Accessing ColdFusionServices From FlexApplicationsMatt Gifford aka @coldfumonkehAdobe ColdFusion Developer Week 2011
  • 2. Who?Lead RIA DeveloperAdobe Community ProfessionalUser Group Manager - Hertfordshire, UKAuthorCoffee Lover@coldfumonkehwww.mattgifford.co.ukwww.fuzzyorange.co.uk
  • 3. Integrating ColdFusion services into non- ColdFusion systems and applicationsWhat? Utilise powerful features whilst minimising coding and maximising functionality Improving workflow and developer collaboration across language divides
  • 4. Because ColdFusion is incredibly powerfulWhy? Rapid Application Development It’s awesome fun
  • 5. COLDFUSION CODE NINJAS // ALL OF YOU
  • 6. Object-relational mapping (ORM) Enhanced Document Manipulation Enhanced AJAX controlsCF9 Sharepoint integration (portals)gave us... ColdFusion Builder Exposed Service Layer (CFaaS) and much more...
  • 7. Remote Services
  • 8. LET’S DEMONSTRATE // DATA CENTRIC DEVELOPMENT
  • 9. Exposed Service Layer
  • 10. WHAT IS AVAILABLE? // EXPOSED FUNCTIONALITY
  • 11. ColdFusionas a Service(or how to share the awesome-ness withother developers and other languages)
  • 12. http://[server]:[port]/CFIDE/services/ http://localhost:8500/CFIDE/services/mail.cfc?wsdl http://localhost:8500/CFIDE/services/document.cfc?wsdl http://localhost:8500/CFIDE/services/chart.cfc?wsdlACCESSING SERVICES // WEB SERVICE
  • 13. Chart Mail generate send Document PDF generate addWatermark convertArrayOfStructToPDFPageDetailArray [private] deletepages Image extractImage AddBorder extractPages batchOperation extractText Blur getInfo Crop mergeFiles Flip mergespecificpages GetEXIFMetaData processDDX GetEXIFTAG protect GetHeight removewatermark GetIPTCMetaData setinfo GetIPTCTag thumbnail GetWidth GrayScale Info POP Negative delete Overlay getAll Resize getHeaderOnly Rotate ScaletoFit Sharpen ShearAVAILABLE SERVICES // WHAT YOU CAN DO WITH IT
  • 14. RestrictedAccessto exposed services through theColdFusion Administrator
  • 15. ActionScript Proxy Classes
  • 16. ColdFusion: <cfmail to="requests@guitar-hero.com" from="me@my_email_address.com" subject="More Kenny Loggins" />AS Proxy in Flex: <cf:Mail to="requests@guitar-hero.com" from="me@my_email_address.com" subject="More Kenny Loggins" />
  • 17. Import the cfservices.swc file (from ColdFusion 9 install): typically in /CFIDE/scripts/AIR/ directory Add ColdFusion namespace to your Flex application xmlns:cf=”coldfusion.service.mxml.*” Write some code That bit’s over to you...HOW EASY IS IT? // VERY
  • 18. LET’S DEMONSTRATE // BUILDING AN APPLICATION
  • 19. USEFUL REMINDERS ColdFusion Connection: <cf:Config id="conf" cfServer="localhost" cfPort="8500" serviceUserName="demoUser" servicePassword="demoPassword" /> Define a Method: <cf:Image id="getImageInfo" action="info" source="{dragImage.source}" result="imageInfoResult(event)" fault="onFault(event)" /> Execute (in a nice way): getImageInfo.execute();
  • 20. STRESS-FREE UPLOADS // UTIL CLASS MAGIC
  • 21. USEFUL REMINDERS Upload URL: uploadUrl.url = "http://"+conf.cfServer+":"+conf.cfPort+"/"+Util.UPLOAD_URL; uploadUrl.method = "POST"; uploadUrl.contentType = "multipart/form-data"; Util Class Generates: http://localhost:8500/CFIDE/services/upload.cfc?METHOD=uploadForm Get Remote Location: uploadedFileUrl = Util.extractURLFromUploadResponse(event.data.toString());
  • 22. WHY SHOULD YOU CARE? // BECAUSE YOU’RE AWESOME
  • 23. Full code on github: https://github.com/coldfumonkeh/ColdFusion-Dev-Week-Demos CFaaS method cheat sheet: http://www.mattgifford.co.uk/updated-cfaas-method-cheat-sheetTRY IT YOURSELF // THINGS TO HELP YOU
  • 24. Accessing ColdFusion Services From Flex ApplicationsMatt Gifford aka @coldfumonkeh Adobe ColdFusion Developer Week 2011

×