1 / 32

Efficient Coding with CFBuilder 2

Efficient Coding with CFBuilder 2. by Kris Korsmo. The Goals of This Presentation. Familiarize you with the IDE on a basic level Show you a few of the more advanced features Show you some tricks and hidden gems (thanks Charlie) Discuss different developer workflows

kimi
Download Presentation

Efficient Coding with CFBuilder 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Efficient Coding with CFBuilder 2 by Kris Korsmo

  2. The Goals of This Presentation • Familiarize you with the IDE on a basic level • Show you a few of the more advanced features • Show you some tricks and hidden gems (thanks Charlie) • Discuss different developer workflows • Demonstrate creating a simple application

  3. About Me • Live in Seattle area • Began coding w/ BASIC • Washington State University • Using ColdFusion since 2004 • Adobe Certified CF8 • Seattle CFUG member • Wife and three kids • 737 Pilot when not coding kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  4. Who This is For • This presentation is geared toward • Folks with limited experience using an Eclipse-based IDE • Beginner to intermediate-level code writers • People interested in an efficient workflow • People who want to use best practices • I will make no assumptions • If you have questions I’ll do my best to answer as we go, but I may need to speed along at some point • If I don’t know the answer to your question I’ll do my best to find it. I’d rather be honest in not knowing than give you an answer that’s incorrect • There should be time for more questions at the end kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  5. What is ColdFusion Builder 2? • An Eclipse-based IDE • Eclipse is an open-source IDE • Not only a text editor • IDE = Integrated Development Environment – combines a lot of features all in one to help you write code better, faster and easier (although everyone has different preferences) • Tailored by Adobe specifically for CF • Can be installed as standalone or as plugin kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  6. Views & Perspectives • Views show a single aspect of your application – files, data, code snippets, etc. - and can be added to any perspective • Perspectives are groups of related views which together help you work efficiently on one aspect of your application (writing code, debugging, etc.) kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  7. Perspectives There are many different perspectives – six in this case – but others are available kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  8. ColdFusion Perspective kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  9. Help View • Extremely useful if you’re just getting started with CFB • You can easily bookmark help topics by right-clicking and selecting “Add Bookmark” • Handy HTML, JavaScript and CSS references • This is where the CF10 documentation lives kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  10. Navigator View • Shows file structure • Arrows are Forward and Back, not Up/Down in file structure • Right click and choose “Go Into” to navigate file structure • Click to navigate up file structure • Click to collapse file structure • Click to link a file to the editor – keeps the file you’re working on in the editor displayed in navigation view. • Click to focus on a task – this is a Mylyn (Tasktop) feature kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  11. RDS Data View • Click to open RDS configuration dialog • Click to refresh the selected folder • Click to open RDS Query Viewer • Click to go to RDS Data Home • Click to go into selected level • Click to go up a level RDS makes it easy to visualize your data and to add it to the code in your editor. kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  12. RDS File View • Click to open RDS configuration dialog • Click to refresh the selected folder • Click to create a new file • Click to delete a file • Click to create a new folder • Click to delete a folder • Click to go to RDS File View Home • Click to go into selected level • Click to go up a level Allows you to see the files on your remote server kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  13. Snippets View • Click to refresh snippets view • Click to insert the selected snippet • Click to create a new snippet • Click to edit the selected snippet • Click to delete the selected snippet • Click to create a new package • Click to delete the selected package • You can use system variables to automatically populate values such as the current date and filename Allows you to store frequently-used bits of code in an organized fashion. kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  14. Snippets System Variables • $${DATE} • $${MONTH} • $${TIME} • $${DATETIME} • $${CURRENTFILE} – Current file name (just the file) • $${CURRENTFOLDER} – Current folder (The path to the containing folder) • $${CURRENTPATH} – Current path (full file name) • $${CURRENTPRJPATH} – Just the folder • $${USERNAME} – Current user • $${MONTHNUMBER} – Month as a number • $${DAYOFMONTH} – Day of month as a number • $${DAYOFWEEKNUMBER} – Day of week (the week starts on Sunday) • $${DATETIME24} – DateTime24 – a 24 hour clock version of datetime. • $${YEAR} – Current year. • $${YEAR2DIGIT} – Current two digit year kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  15. Tasks View • Shows the description of the task, the resource, path & location • Double-clicking the task opens the resource in the editor, and highlights the line(s) of code that need to be addressed kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  16. Outline View • Makes it very easy to find code • Most useful when working on CFCs because it makes it simple to locate functions by name • Clicking a section of code (such as the function shown here) will move the cursor to that function in the editor • You can expand and collapse individual items or use the buttons at the top to expand or collapse all • Clicking the alphabetical sort is very useful because it groups functions by name, essentially eliminating comments • Click to hide private functions kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  17. Tail View • Displays the contents of your log files without having to log into the ColdFusion Administrator kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  18. Services View • Shows functions, arguments, data type, etc. and allows you to right click to insert cfinvoke or createObject(); kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  19. Server View • Add, stop, start, restart or delete a server • Launch the Server Monitor • Launch the ColdFusion Administrator NEW START RESTART DELETE INOP kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  20. Git Repositories View Basic Functionality: • Collapse All • Link to Editor • Add Local Repository • Clone Repo and Add to View • Create New Repository • Refresh View • Link to Selection • Hierarchical Branch Layout • Display Latest Branch Commit • Branch • Merge • Doesn’t ship with CFBuilder • Not comprehensive • Will do what most of us need • Not supported by Adobe www.eclipse.org/egit/ kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  21. Git History kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  22. Customizing CFBuilder • Can be done by navigating to Window > Preferences kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  23. Code Formatting • Type “formatter” in the filter text kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  24. Code Libraries • You can create a custom CFML dictionary (XML file) and make it available to use for Code Assist and Tag wizard within ColdFusion Builder. • Within the ColdFusion Builder installation, navigate to the following location: • \plugins\com.adobe.ide.coldfusion.dictionary_XXX\dictionary • Create a folder called "Custom" within the Dictionary directory. • Create an XML file to describe the custom tags and functions. • For example, in the XML file, you describe each tag within <tag></tag> elements, and enclose all the tag elements within <dictionary></dictionary> elements as follows: <dictionary> <tags> <!-- cfoanzbeerRequired= “Boolean" --> <tag endtagrequired="false" name="cfoanz" single="true" xmlstyle="false"> <parameter name=“beerRequired" required=“true" type=“Boolean"> <values default="true"> <value option="true"/> <value option="false"/> </values> </parameter> </tag> </tags> </dictionary> kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  25. Theming & Fonts • http://eclipsecolorthemes.org/ • Manually edit colors and fonts • Downloadable themes • Create your own theme • Plugin is available • Requires a lot of work & doesn’t look great • Only changes the editor, not the entire IDE • Adobe Source Code Pro font • New font designed specifically for coding • http://sourceforge.net/projects/sourcecodepro.adobe/ • Differentiates similar characters • O vs 0 • l vs 1 kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  26. Useful Keyboard Shortcuts * Courtesy of Charlie Arehart’s “Hidden Gems in ColdFusion Builder 2” – carehart.org kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  27. Extensions • CFC Generator • CF Wheels • Apptacular • Model Glue • Mach II • CFLib • Build your own kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  28. Plugins • E-Git • http://marketplace.eclipse.org/egit • GitHub Mylyn Connector • http://bit.ly/TW43r1 • Maven • http://bit.ly/TW3tt6 • Cloud Bees Jenkins • http://bit.ly/P3Wp0w • Android Developer Tools • http://developer.android.com/tools/sdk/eclipse-adt.html • Eclipse Marketplace within the IDE • Help > Eclipse Marketplace kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  29. CFBuilder vs. Other Editors kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  30. Developer Workflow Typical Development Process Best Practices Development Process Checks for Updates kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  31. Demo Application • We’ll start with only a database • Generate an application using Apptacular • Use code snippets to add grid functionality • Commit and push to repository • Run unit tests kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

  32. Questions Thank You! All CF.Objective(ANZ) attendees will receive a 20% discount on web hosting with Ayera Technologies. Use the Discount code CFOANZ2012 or mention my name in the referral section. kriskorsmo.com | kriskorsmo@gmail.com | @kriskorsmo

More Related