Your SlideShare is downloading. ×
0
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
ColdFusion Builder Extensions
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

ColdFusion Builder Extensions

1,688

Published on

How to get started doing extension development for ColdFusion Builder

How to get started doing extension development for ColdFusion Builder

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,688
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
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. ColdFusion Builder Extensions<br />Terry Ryan<br />Adobe ColdFusion Evangelist<br />http://terrenceryan.com<br />@tpryan<br />
  • 2. Google Translator<br />
  • 3. Builder Stats<br />
  • 4. Riaforge Download<br />
  • 5. Getting Started Using<br />
  • 6. Installation<br />Install<br />Packaged Zip files<br />Import<br />
  • 7. Using Extensions<br />Available as Context Menus (Right Click thingies) for:<br />RDS View<br />Project View<br />Outline View<br />Editor<br />
  • 8. RDS VIEW<br />EDITOR VIEW<br />PROJECT VIEW<br />OUTLINE VIEW<br />
  • 9. Getting Started Writing<br />
  • 10. Extension Components<br />Ide_config.xml<br />CFML Handlers<br />Supporting Code<br />
  • 11. <application><br />[Metadata]<br />[Menu Contributions]<br />[Handlers]<br /></application><br />ide_config.xml<br />
  • 12. ide_config.xml<br /><application><br /><name>DemoExtensions</name><br /><author>Terrence Ryan</author><br /><version>1.0</version><br /><email>terry.ryan@adobe.com</email><br /><description>Simple Extension</description><br />[Menu Contributions]<br />[Handlers]<br /></application><br />
  • 13. Licensing<br />Add License agreement to metadata.<br />
  • 14. ide_config.xml<br /><application><br />[Metadata]<br /><menucontributions><br /><contribution target="rdsview" ><br /> <menu name="Database Info"><br /><action name=“DBVersion" handlerid="databaseVersion" /><br /> </menu><br /></contribution><br /></menucontributions><br />[Handlers]<br /></application><br />
  • 15. ide_config.xml<br /><application><br />[Metadata]<br />[Menu Contributions]<br /><handlers><br /> <handler id="databaseVersion" type="CFM" filename="databaseVersion.cfm" /><br /></handlers><br /></application><br />
  • 16. ide_config.xml<br /><application><br /><name>DemoExtensions</name><br /><author>Terrence Ryan</author><br /><version>1.0</version><br /><email>terry.ryan@adobe.com</email><br /><description>Simple Extension</description><br /><menucontributions><br /><contribution target="rdsview" ><br /> <menu name="Database Info"><br /><action name=“DBVersion" handlerid="databaseVersion" /><br /><action name="Inspect Table" handlerid="inspectTables" /><br /> </menu><br /></contribution><br /></menucontributions><br /><handlers><br /> <handler id="databaseVersion" type="CFM" filename="databaseVersion.cfm" /><br /></handlers><br /></application><br />
  • 17. Handlers<br />[Parse IDE input]<br />[Do something]<br />[Respond to IDE]<br />
  • 18. Parse IDE Input<br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br /><rdsview><br /><database name="cfartgallery"><br /><table name="APP.ART"><br /><fields><br /><field name="ARTID" type="INTEGER" length="10"/><br /><field name="ARTISTID" type="INTEGER" length="10"/><br /><field name="ARTNAME" type="VARCHAR" length="50"/><br /><field name="DESCRIPTION" type="CLOB" length="2147483647"/><br /><field name="PRICE" type="DECIMAL" length="19"/><br /><field name="LARGEIMAGE" type="VARCHAR" length="30"/><br /><field name="MEDIAID" type="INTEGER" length="10"/><br /><field name="ISSOLD" type="SMALLINT" length="5"/><br /></fields><br /></table><br /></database><br /></rdsview><br /></ide><br /></event><br />
  • 19. Parse IDE Input<br /><cfsetXMLDoc= XMLParse(form.ideeventInfo) /><br /><cfsetdb.dbname=XMLDoc.event.ide.rdsview.database[1].XMLAttributes.name /><br />[Do something]<br />[Respond to IDE]<br />
  • 20. Do Something<br />[Parse IDE input]<br /><cfdbinfodatasource="#db.dbname#" name="version" type="version" /><br />[Respond to IDE]<br />
  • 21. Respond to IDE<br />[Parse IDE input]<br />[Do something]<br /><cfheader name="Content-Type" value="text/xml"><br /><response status="success" showresponse="true"><br /><ide><br /><dialog width="600" height="400" /><br /><body><br /><![CDATA[<br /> <cf_versionDisplayversionQuery = "#version#" /><br />]]><br /></body><br /></ide><br /></response><br />
  • 22. Put it all together<br /><cfsetXMLDoc= XMLParse(form.ideeventInfo) /><br /><cfsetdb.dbname=XMLDoc.event.ide.rdsview.database[1].XMLAttributes.name /><br /><cfdbinfodatasource="#db.dbname#" name="version" type="version" /><br /><cfheader name="Content-Type" value="text/xml"><br /><response status="success" showresponse="true"><br /><ide><br /><dialog width="600" height="400" /><br /><body><br /><![CDATA[<br /> <cf_versionDisplayversionQuery = "#version#" /><br />]]><br /></body><br /></ide><br /></response><br />
  • 23. Interacting with IDE<br />
  • 24. Collecting Input <br /><menucontributions><br /><contribution target="rdsview" ><br /><menu name="Database Info"><br /><action name="Database Version" handlerid="databaseVersion" /><br /><action name="Inspect Table" handlerid="inspectTables"><br /><input name="showPK" label="Show Primary Key" type="boolean"/><br /><input name="showFK" label="Show Foreign Key" type="boolean"/><br /></action> <br /></menu><br /></contribution><br /></menucontributions><br />
  • 25. User input<br /><event><br /><user><br /><input name="showPK" value="true"/><br /><input name="showFK" value="true"/><br /></user><br /></event><br />
  • 26. Collecting Input <br />Types<br />String<br />Dir<br />Boolean<br />File<br />Password<br />List<br />Name<br />Label<br />Tooltip<br />Required<br />Default<br />Checked<br />Pattern<br />ErrorMessage<br />HelpMessage<br />
  • 27. Workspace Keywords<br />Leverage Workspace Values<br />projectlocation<br />projectname<br />serverhome<br />wwwroot<br /><input name=“outputDir" label=“Output Folder" default="{$projectlocation}" type="dir"/><br />
  • 28. Workspace Keywords - Gotchas<br />Does not work in RDSview<br />Keywords are case sensitive<br />
  • 29. Menu Filters<br />Add Context-Menus only to specific items<br />Folders<br />Projects<br />Files<br />Outline Nodes<br />Pattern match against name or RegEx<br /><filters><br /> <filter type="file" pattern=“index.cfm" /><filter type=“cffunction" /><br /></filters><br />
  • 30. Menu Filters - Gotchas<br />*.cfc does not work<br />It’s a regular expression<br />.*.cfc<br />
  • 31. Menus<br />RDS View<br />Project View<br />Outline View<br />Editor<br />
  • 32. RDS View<br /><event><br /><ide version="2.0"><br /><callbackurl><br />http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br /><rdsview><br /><database name="cfartgallery"><br /><table name="APP.ART"><br /><fields><br /><field name="ARTID" type="INTEGER" length="10"/><br /><field name="ARTISTID" type="INTEGER" length="10"/><br /><field name="ARTNAME" type="VARCHAR" length="50"/><br /><field name="DESCRIPTION" type="CLOB" length="2147483647"/><br /><field name="PRICE" type="DECIMAL" length="19"/><br /><field name="LARGEIMAGE" type="VARCHAR" length="30"/><br /><field name="MEDIAID" type="INTEGER" length="10"/><br /><field name="ISSOLD" type="SMALLINT" length="5"/><br /></fields><br /></table><br /></database><br /></rdsview><br /></ide><br /></event><br />
  • 33. Project View<br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br /><projectviewprojectname="DemoExtensions" projectlocation=”[Project Path]"><br /><resource path=”[File Path]" type="file"/><br /></projectview><br /></ide><br /></event><br />
  • 34. Outline View<br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br /><outlineviewprojectname="FlexGumboDemo" projectlocation="[Project Path]"><br /><source filename="artists.cfc" path="[FilePath]"><br /><node type="cffunction"><br /><function name="getIDName" returntype=" void"><br /></function><br /></node><br /></source><br /></outlineview><br /></ide><br /></event><br />
  • 35. Editor View<br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br /><editor><br /><file location="/Users/terryr/Sites/centaur.dev/translator/test.cfm" name="test.cfm" project="Translator" <br />projectlocation="/Users/terryr/Sites/centaur.dev/translator" projectrelativelocation="test.cfm" /><br /><selection endcolumn="86" endline="4" startcolumn="1" startline="1"><br /><text><br /> Editor content<br />Editor content<br />Editor content<br />Editor content<br /></text><br /></selection><br /></editor><br /></ide></event><br />
  • 36. Getting information via callbacks<br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=ColdFusion Builder Test Creator<br /></callbackurl><br />…<br /></event><br />
  • 37. Getting information via callbacks<br /><cfsetcallbackURL= XMLParse(form.ideeventinfo).event.ide.callbackurl.XMLText/><br /><cfsavecontent variable="postData"><br /><response><br /><ide><br /><commands><br /><command type="getdatasources"><br /></command><br /></commands><br /></ide><br /></response><br /></cfsavecontent> <br /><cfhttp method="post" url="#callbackURL#"><br /><cfhttpparam type="body" value="#postData#" ><br /></cfhttp><br />
  • 38. Callback results<br /><?xml version="1.0" encoding="UTF-8"?><br /><event><br /><ide version="2.0"><br /><callbackurl><br /> http://192.168.180.208:53301/index.cfm?extension=Storm Extensions<br /></callbackurl><br /><command_results><br /><command_resulttype="getdatasources"><br /><datasources><br /><datasourcename="max2010" server="centaur.dev"/><br /><datasourcename="webdu" server="centaur.dev"/><br /><datasourcename="indy" server="centaur.dev"/><br /><datasourcename="inventory" server="centaur.dev"/><br /> ...<br /></datasources><br /></command_result><br /></command_results><br /></ide><br /></event><br />
  • 39. Callbacks data fetches<br />getServers<br />getDatasources<br />getTables<br />getTable<br />searchFile<br />getFunctionsAndVariables<br />
  • 40. Callbacks can perform operations<br />refreshProject<br />refreshFolder<br />refreshFile<br />insertText<br />openFile<br />
  • 41. Callbacks- Gotchas<br />IDE has to have them enabled (it does by default)<br />
  • 42. Creating Dynamic Extensions<br />ColdFusion Builder Extensions Responses<br />XML<br />HTML<br />Flash<br />Eclipse SWT<br />
  • 43. XML Response to Create Dynamic UI<br /><response status="success" type="default"><br /><idemessage=""><br /><dialog height="400" width="400" ><br /><input name="location" default="${projectlocation}" /><br /><input name="Generate View" type="boolean" checked="yes" /><br /></dialog><br /></ide><br /></response><br />
  • 44. XML Response to Create HTML UI<br /><response status="success" showresponse="true"><br /><ide><br /><dialog width="600" height="400" /><br /><body><br /><![CDATA[<br /> <p>This is an HTML Response</p><br />]]><br /></body><br /></ide><br /></response><br />
  • 45. Two Browsers<br />Internally, ColdFusion Builder utilizes two different browsers to render extensions<br />Internal browser<br />System default browser<br />
  • 46. IDE Browser<br />Pros<br />Crappy CSS Support<br />Cons<br />Call backs for more interaction with the IDE<br />
  • 47. Native Browser<br />Pros<br />Full CSS <br />Cons<br />No Callbacks<br />
  • 48. XML Response to Native Browser<br /><response status="success" showresponse="true"><br /><ide url="#attributes.messageURL#" ><br /><dialog width="600" height="400" /><br /></ide><br /></response><br />
  • 49. Responding to views<br /><cfheader name="Content-Type" value="text/xml"><br /><response status="success" showresponse="true"><br /><ide ><br /><view id="stormExtensions" title="Storm Extensions Test" icon="" /><br /><body><br /><![CDATA[<br />…<br />]]><br /></body><br /></ide><br /></response><br />
  • 50. <codeassistcontribution><br /><functions><br /><function name="linkTo" variableName="event" componentName="" <br />handlerId="CodeAssistHandler"><br /><parameterindex="1" /><br /></function><br /></functions><br /></codeassistcontribution><br />Extension Code Assist<br />
  • 51. <codeassist_response><br /><proposal display="display_value" insert="insert_this_value" inquotes="true/false"/><br /></codeassist_response><br />Extension Code Assist<br />
  • 52. Development Tips<br />
  • 53. Development Tips<br /><cfsettingsshowdebugoutput=“false” /><br />
  • 54. Development Tips<br />Reload / Import ExtensionsPreferences > ColdFusion > Extensions<br />Have to do when you alter ide_config.xml<br />
  • 55. Development Tips<br />Errors output to Eclipse error logsWindow > Show View > Other > General > Error Log<br />
  • 56. Development Tips<br />Simulate submissions<br />Capture IDE input to text file<br />Read IDE input from text file<br />Develop like a webapp, until you are ready for full testing with IDE<br />
  • 57. Testing and Debugging<br />
  • 58. Run ColdFusion from command line and dump to the console<br />
  • 59. Use a custom tag to dump to the IDE window<br />
  • 60. Use ColdFusion Builder Tester Extension<br />
  • 61. Demo<br />ColdFusion Builder Tester<br />
  • 62. Skinning<br />
  • 63. HTML/CSS/JS<br />Pros<br />Easy to write<br />Compliments other things you do<br />Cons<br />Some Concepts aren’t well expressed<br />
  • 64. Flex<br />Pros<br />Can do some cool stuff<br />Cons<br />Harder to just throw together an extensions<br />
  • 65. Logo<br />You can place a logo in the upper right hand corner<br />
  • 66. <response showresponse="true" ><br /><ide ><br /><dialog title="Apptacular" <br />image="handlers/logo.png" <br />width="710" height="690"/><br /></ide><br /></response><br />
  • 67. Menu Spacer<br />You can add spacers to menu items.<br />They’re clickable, but do nothing<br />
  • 68. <menucontributions><br /><contribution target="rdsview" ><br /><menu name="Apptacular"><br /><action name="------------------------------" /><br /></menu><br /></contribution><br />
  • 69. Like an app put ui in Custom tags <br />
  • 70. Instant Code Review<br />
  • 71. Follow up?<br />Feel free to contact me<br />terry.ryan@adobe.com<br />http://terrenceryan.com<br />Twitter: @tpryan<br />

×