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

More Related Content

Viewers also liked (7)

Implementation and Optimisation of Queries in XSPARQL
Implementation and Optimisation of Queries in XSPARQLImplementation and Optimisation of Queries in XSPARQL
Implementation and Optimisation of Queries in XSPARQL
 
Xml Demystified
Xml DemystifiedXml Demystified
Xml Demystified
 
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic CommunicationIQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
IQPC Canada XML 2001: How to Use XML Parsing to Enhance Electronic Communication
 
1 +óptica+e+reflexão+da+luz
1 +óptica+e+reflexão+da+luz1 +óptica+e+reflexão+da+luz
1 +óptica+e+reflexão+da+luz
 
Projeto valores sustentabilidade
Projeto valores sustentabilidadeProjeto valores sustentabilidade
Projeto valores sustentabilidade
 
Ecommerce 2012
Ecommerce 2012Ecommerce 2012
Ecommerce 2012
 
Teste para curso
Teste para cursoTeste para curso
Teste para curso
 

Similar to ColdFusion Builder Extensions

Krazykoder struts2 ui_tags
Krazykoder struts2 ui_tagsKrazykoder struts2 ui_tags
Krazykoder struts2 ui_tags
Krazy Koder
 

Similar to ColdFusion Builder Extensions (20)

Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
 
Using Forms in Share
Using Forms in ShareUsing Forms in Share
Using Forms in Share
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
 
Alfresco Forms Service Deep Dive
Alfresco Forms Service Deep DiveAlfresco Forms Service Deep Dive
Alfresco Forms Service Deep Dive
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
 
Intro Html
Intro HtmlIntro Html
Intro Html
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
Forms 2010
Forms 2010Forms 2010
Forms 2010
 
Presentation log4 j
Presentation log4 jPresentation log4 j
Presentation log4 j
 
Presentation log4 j
Presentation log4 jPresentation log4 j
Presentation log4 j
 
Dan Holevoet, Google
Dan Holevoet, GoogleDan Holevoet, Google
Dan Holevoet, Google
 
Component and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPComponent and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHP
 
Lecture3
Lecture3Lecture3
Lecture3
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
Krazykoder struts2 ui_tags
Krazykoder struts2 ui_tagsKrazykoder struts2 ui_tags
Krazykoder struts2 ui_tags
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 

More from Terry Ryan

Making the Mobile Web Work
Making the Mobile Web WorkMaking the Mobile Web Work
Making the Mobile Web Work
Terry Ryan
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Terry Ryan
 
cf.Objective ANZ Keynote
cf.Objective ANZ Keynotecf.Objective ANZ Keynote
cf.Objective ANZ Keynote
Terry Ryan
 
HTML5 Semantic Web
HTML5 Semantic WebHTML5 Semantic Web
HTML5 Semantic Web
Terry Ryan
 

More from Terry Ryan (20)

Making the Mobile Web Work
Making the Mobile Web WorkMaking the Mobile Web Work
Making the Mobile Web Work
 
The Users are Restless
The Users are RestlessThe Users are Restless
The Users are Restless
 
HTML Design for Devices
HTML Design for DevicesHTML Design for Devices
HTML Design for Devices
 
The Future of HTML5 Motion Design
 The Future of HTML5 Motion Design The Future of HTML5 Motion Design
The Future of HTML5 Motion Design
 
Adobe and Modern Web Development
Adobe and Modern Web DevelopmentAdobe and Modern Web Development
Adobe and Modern Web Development
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
 
The Future of HTML Motion Design
The Future of HTML Motion DesignThe Future of HTML Motion Design
The Future of HTML Motion Design
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap Build
 
D2WC Keynote
D2WC KeynoteD2WC Keynote
D2WC Keynote
 
WebDU Keynote
WebDU KeynoteWebDU Keynote
WebDU Keynote
 
Beautiful PhoneGap Apps
Beautiful PhoneGap AppsBeautiful PhoneGap Apps
Beautiful PhoneGap Apps
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
The Future of HTML5 Motion Design
The Future of HTML5 Motion DesignThe Future of HTML5 Motion Design
The Future of HTML5 Motion Design
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
Design for Developers
Design for DevelopersDesign for Developers
Design for Developers
 
cf.Objective ANZ Keynote
cf.Objective ANZ Keynotecf.Objective ANZ Keynote
cf.Objective ANZ Keynote
 
Flex Mobile Skinning Workshop
Flex Mobile Skinning WorkshopFlex Mobile Skinning Workshop
Flex Mobile Skinning Workshop
 
HTML5 Semantic Web
HTML5 Semantic WebHTML5 Semantic Web
HTML5 Semantic Web
 
Intro to Coldfusion
Intro to ColdfusionIntro to Coldfusion
Intro to Coldfusion
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 

ColdFusion Builder Extensions

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