ColdFusion Builder Extensions<br />Terry Ryan<br />Adobe ColdFusion Evangelist<br />http://terrenceryan.com<br />@tpryan<b...
Google Translator<br />
Builder Stats<br />
Riaforge Download<br />
Getting Started Using<br />
Installation<br />Install<br />Packaged Zip files<br />Import<br />
Using Extensions<br />Available as Context Menus (Right Click thingies) for:<br />RDS View<br />Project View<br />Outline ...
RDS VIEW<br />EDITOR VIEW<br />PROJECT VIEW<br />OUTLINE VIEW<br />
Getting Started Writing<br />
Extension Components<br />Ide_config.xml<br />CFML Handlers<br />Supporting Code<br />
<application><br />[Metadata]<br />[Menu Contributions]<br />[Handlers]<br /></application><br />ide_config.xml<br />
ide_config.xml<br /><application><br /><name>DemoExtensions</name><br /><author>Terrence Ryan</author><br /><version>1.0</...
Licensing<br />Add License agreement to metadata.<br />
ide_config.xml<br /><application><br />[Metadata]<br /><menucontributions><br /><contribution target="rdsview" ><br />	<me...
ide_config.xml<br /><application><br />[Metadata]<br />[Menu Contributions]<br /><handlers><br />	<handler id="databaseVer...
ide_config.xml<br /><application><br /><name>DemoExtensions</name><br /><author>Terrence Ryan</author><br /><version>1.0</...
Handlers<br />[Parse IDE input]<br />[Do something]<br />[Respond to IDE]<br />
Parse IDE Input<br /><event><br /><ide version="2.0"><br /><callbackurl><br />     http://192.168.180.208:53301/index.cfm?...
Parse IDE Input<br /><cfsetXMLDoc= XMLParse(form.ideeventInfo) /><br /><cfsetdb.dbname=XMLDoc.event.ide.rdsview.database[1...
Do Something<br />[Parse IDE input]<br /><cfdbinfodatasource="#db.dbname#" name="version" type="version" /><br />[Respond ...
Respond to IDE<br />[Parse IDE input]<br />[Do something]<br /><cfheader name="Content-Type" value="text/xml"><br /><respo...
Put it all together<br /><cfsetXMLDoc= XMLParse(form.ideeventInfo) /><br /><cfsetdb.dbname=XMLDoc.event.ide.rdsview.databa...
Interacting with IDE<br />
Collecting Input <br /><menucontributions><br /><contribution target="rdsview" ><br /><menu name="Database Info"><br /><ac...
User input<br /><event><br /><user><br /><input name="showPK" value="true"/><br /><input name="showFK" value="true"/><br /...
Collecting Input <br />Types<br />String<br />Dir<br />Boolean<br />File<br />Password<br />List<br />Name<br />Label<br /...
Workspace Keywords<br />Leverage Workspace Values<br />projectlocation<br />projectname<br />serverhome<br />wwwroot<br />...
Workspace Keywords - Gotchas<br />Does not work in RDSview<br />Keywords are case sensitive<br />
Menu Filters<br />Add Context-Menus only to specific items<br />Folders<br />Projects<br />Files<br />Outline Nodes<br />P...
Menu Filters - Gotchas<br />*.cfc does not work<br />It’s a regular expression<br />.*.cfc<br />
Menus<br />RDS View<br />Project View<br />Outline View<br />Editor<br />
RDS View<br /><event><br /><ide version="2.0"><br /><callbackurl><br />http://192.168.180.208:53301/index.cfm?extension=Co...
Project View<br /><event><br /><ide version="2.0"><br /><callbackurl><br />     http://192.168.180.208:53301/index.cfm?ext...
Outline View<br /><event><br /><ide version="2.0"><br /><callbackurl><br />     http://192.168.180.208:53301/index.cfm?ext...
Editor View<br /><event><br /><ide version="2.0"><br /><callbackurl><br />     http://192.168.180.208:53301/index.cfm?exte...
Getting information via callbacks<br /><event><br /><ide version="2.0"><br /><callbackurl><br />     http://192.168.180.20...
Getting information via callbacks<br /><cfsetcallbackURL= XMLParse(form.ideeventinfo).event.ide.callbackurl.XMLText/><br /...
Callback results<br /><?xml version="1.0" encoding="UTF-8"?><br /><event><br /><ide version="2.0"><br /><callbackurl><br /...
Callbacks data fetches<br />getServers<br />getDatasources<br />getTables<br />getTable<br />searchFile<br />getFunctionsA...
Callbacks can perform operations<br />refreshProject<br />refreshFolder<br />refreshFile<br />insertText<br />openFile<br />
Callbacks- Gotchas<br />IDE has to have them enabled (it does by default)<br />
Creating Dynamic Extensions<br />ColdFusion Builder Extensions Responses<br />XML<br />HTML<br />Flash<br />Eclipse SWT<br />
XML Response to Create Dynamic UI<br /><response status="success" type="default"><br /><idemessage=""><br /><dialog height...
XML Response to Create HTML UI<br /><response status="success" showresponse="true"><br /><ide><br /><dialog width="600" he...
Two Browsers<br />Internally, ColdFusion Builder utilizes two different browsers to render extensions<br />Internal browse...
IDE Browser<br />Pros<br />Crappy CSS Support<br />Cons<br />Call backs for more interaction with the IDE<br />
Native Browser<br />Pros<br />Full CSS	<br />Cons<br />No Callbacks<br />
XML Response to Native Browser<br /><response status="success" showresponse="true"><br /><ide url="#attributes.messageURL#...
Responding to views<br /><cfheader name="Content-Type" value="text/xml"><br /><response status="success" showresponse="tru...
<codeassistcontribution><br /><functions><br /><function name="linkTo" variableName="event" componentName=""  <br />handle...
<codeassist_response><br /><proposal display="display_value" insert="insert_this_value" inquotes="true/false"/><br /></cod...
Development Tips<br />
Development Tips<br /><cfsettingsshowdebugoutput=“false” /><br />
Development Tips<br />Reload / Import ExtensionsPreferences > ColdFusion > Extensions<br />Have to do when you alter ide_c...
Development Tips<br />Errors output to Eclipse error logsWindow > Show View > Other > General > Error Log<br />
Development Tips<br />Simulate submissions<br />Capture IDE input to text file<br />Read IDE input from text file<br />Dev...
Testing and Debugging<br />
Run ColdFusion from command line and dump to the console<br />
Use a custom tag to dump to the IDE window<br />
Use ColdFusion Builder Tester Extension<br />
Demo<br />ColdFusion Builder Tester<br />
Skinning<br />
HTML/CSS/JS<br />Pros<br />Easy to write<br />Compliments other things you do<br />Cons<br />Some Concepts aren’t well exp...
Flex<br />Pros<br />Can do some cool stuff<br />Cons<br />Harder to just throw together an extensions<br />
Logo<br />You can place a logo in the upper right hand corner<br />
<response showresponse="true" ><br /><ide ><br /><dialog title="Apptacular" <br />image="handlers/logo.png" <br />width="7...
Menu Spacer<br />You can add spacers to menu items.<br />They’re clickable, but do nothing<br />
<menucontributions><br /><contribution target="rdsview" ><br /><menu name="Apptacular"><br /><action name="---------------...
Like an app put ui in Custom tags <br />
Instant Code Review<br />
Follow up?<br />Feel free to contact me<br />terry.ryan@adobe.com<br />http://terrenceryan.com<br />Twitter: @tpryan<br />
Upcoming SlideShare
Loading in...5
×

ColdFusion Builder Extensions

1,705

Published on

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,705
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

ColdFusion Builder Extensions

  1. 1. ColdFusion Builder Extensions<br />Terry Ryan<br />Adobe ColdFusion Evangelist<br />http://terrenceryan.com<br />@tpryan<br />
  2. 2. Google Translator<br />
  3. 3. Builder Stats<br />
  4. 4. Riaforge Download<br />
  5. 5. Getting Started Using<br />
  6. 6. Installation<br />Install<br />Packaged Zip files<br />Import<br />
  7. 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. 8. RDS VIEW<br />EDITOR VIEW<br />PROJECT VIEW<br />OUTLINE VIEW<br />
  9. 9. Getting Started Writing<br />
  10. 10. Extension Components<br />Ide_config.xml<br />CFML Handlers<br />Supporting Code<br />
  11. 11. <application><br />[Metadata]<br />[Menu Contributions]<br />[Handlers]<br /></application><br />ide_config.xml<br />
  12. 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. 13. Licensing<br />Add License agreement to metadata.<br />
  14. 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. 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. 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. 17. Handlers<br />[Parse IDE input]<br />[Do something]<br />[Respond to IDE]<br />
  18. 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. 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. 20. Do Something<br />[Parse IDE input]<br /><cfdbinfodatasource="#db.dbname#" name="version" type="version" /><br />[Respond to IDE]<br />
  21. 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. 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. 23. Interacting with IDE<br />
  24. 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. 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. 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. 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. 28. Workspace Keywords - Gotchas<br />Does not work in RDSview<br />Keywords are case sensitive<br />
  29. 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. 30. Menu Filters - Gotchas<br />*.cfc does not work<br />It’s a regular expression<br />.*.cfc<br />
  31. 31. Menus<br />RDS View<br />Project View<br />Outline View<br />Editor<br />
  32. 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. 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. 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. 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. 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. 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. 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. 39. Callbacks data fetches<br />getServers<br />getDatasources<br />getTables<br />getTable<br />searchFile<br />getFunctionsAndVariables<br />
  40. 40. Callbacks can perform operations<br />refreshProject<br />refreshFolder<br />refreshFile<br />insertText<br />openFile<br />
  41. 41. Callbacks- Gotchas<br />IDE has to have them enabled (it does by default)<br />
  42. 42. Creating Dynamic Extensions<br />ColdFusion Builder Extensions Responses<br />XML<br />HTML<br />Flash<br />Eclipse SWT<br />
  43. 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. 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. 45. Two Browsers<br />Internally, ColdFusion Builder utilizes two different browsers to render extensions<br />Internal browser<br />System default browser<br />
  46. 46. IDE Browser<br />Pros<br />Crappy CSS Support<br />Cons<br />Call backs for more interaction with the IDE<br />
  47. 47. Native Browser<br />Pros<br />Full CSS <br />Cons<br />No Callbacks<br />
  48. 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. 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. 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. 51. <codeassist_response><br /><proposal display="display_value" insert="insert_this_value" inquotes="true/false"/><br /></codeassist_response><br />Extension Code Assist<br />
  52. 52. Development Tips<br />
  53. 53. Development Tips<br /><cfsettingsshowdebugoutput=“false” /><br />
  54. 54. Development Tips<br />Reload / Import ExtensionsPreferences > ColdFusion > Extensions<br />Have to do when you alter ide_config.xml<br />
  55. 55. Development Tips<br />Errors output to Eclipse error logsWindow > Show View > Other > General > Error Log<br />
  56. 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. 57. Testing and Debugging<br />
  58. 58. Run ColdFusion from command line and dump to the console<br />
  59. 59. Use a custom tag to dump to the IDE window<br />
  60. 60. Use ColdFusion Builder Tester Extension<br />
  61. 61. Demo<br />ColdFusion Builder Tester<br />
  62. 62. Skinning<br />
  63. 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. 64. Flex<br />Pros<br />Can do some cool stuff<br />Cons<br />Harder to just throw together an extensions<br />
  65. 65. Logo<br />You can place a logo in the upper right hand corner<br />
  66. 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. 67. Menu Spacer<br />You can add spacers to menu items.<br />They’re clickable, but do nothing<br />
  68. 68. <menucontributions><br /><contribution target="rdsview" ><br /><menu name="Apptacular"><br /><action name="------------------------------" /><br /></menu><br /></contribution><br />
  69. 69. Like an app put ui in Custom tags <br />
  70. 70. Instant Code Review<br />
  71. 71. Follow up?<br />Feel free to contact me<br />terry.ryan@adobe.com<br />http://terrenceryan.com<br />Twitter: @tpryan<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×