Matt Gifford aka coldfumonkeh | Consultant Developer
View Github Profile


CFCamp 2014 Day One

Oct 20, 2014

CFCamp 2014

Monkeh Works are at CFCamp in Munich and will be posting notes of sessions attended throughout the day.

Thanks to Bluegras.de for organising this great event and for all of the sponsors for, well, sponsoring it.

Day 1

This is the brain dump from day one of the CFCamp conference and notes taken throughout the sessions attended. Notes from day two (21st October) are available to read here.

Make of them what you will.

There’s also an Oculus Rift here so chances are that will be played with at some point today.


CommandBox - Luis Majano

This, for me, was the standout session of the day. Notes follow.

  • Reasons for CommandBox
    • Lack of standards in CF development
    • Lack of concise tooling for optimal CF development
  • Interactive shell
  • Shell scripting available!
    • #!/usr/bin/env box
    • define the box environment and run CF code from a bash script
  • Creating packages
    • box.json file in root fof your package.
    • The descriptor file that contains meta and dependencies
  • App creation
    • box init to create a local box project
  • --saveDev to install save dependency for development only (not --save-dev as with npm)
  • REPL inclusion
    • repl in command terminal and you are in REPL mode
    • tag or cfscript support
    • multiline statements
    • maintains state (can evaluate functions / closures)
  • embedded server
    • undertow lightweight servlet container underneath as integrated server
    • no WEB-INF needed
  • scaffolding
    • package installation and test management in seconds (thanks to example when trying to run testbox without having testbox installed)
  • automation
    • run executes any OS binary including Grunt, Gulp, ANT etc
    • Commandbox recipes
      • like a batch file which can run multiple commands
      • *.boxr file extension

The embedded server management is very powerful. This may replace Vagrant boxes for my local CF development.

With the inclusion of the Commandbox recipes team development management will be much easier, quicker and simpler to manage.

Share a recipe with your team so they can fire up a local environment (including app creation with one file and one command.

If you havent checked out CommandBox yet, do so now. Awesome stuff (once again) form Luis, Brad and the team at Ortus Solutions.

http://www.ortussolutions.com/products/commandbox

Slides


OO with ColdFusion - Kris Korsmo

A very detailed talk from Kris as an introduction into OOP development with CFCs and ColdFusion. It was good to see encapsulation, inheritance and IoC covered in one (short) intro session.

I really enjoyed Kris’s talk and presentation style - it was very casual, friendly and communicative - and having the interactive slides with running CF code on the localhost meant that examples were available to show attendees. Nice touch.

There is also a FANTASTIC book out there to help you with your understanding of OOP:

http://www.objectorientedprogrammingincoldfusion.com


Preside CMS - Alex Skinner

  • Preside CMS - originally commercially sold (still is) but also now open source
  • Built purely against Railo, but can and will work against Adobe ColdFusion
  • Does not use ORM, uses an in-house CRUD system
  • Built-in Web CLI using the Quake key (~)
  • Preside Commands available as an installation through CommandBox
    • start and scaffold currently available
  • Powerful scaffolding tool available through the CLI.
  • Reload cached forms, handlers widgets etc using reload command

https://github.com/pixl8/Preside-CMS


Trust Nothing: a simple guide to debugging ColdFusion code - Gerry Gurevich

  • First rule of debugging development environment - enable robust exception handling in CF Administrator
  • Windows CF install run via the console (presenters preference).
  • Useful for dumping to the console and not browser.
    • Windows -> Services -> right click -> properties
    • Set service to manual
    • From command line: < cfroot >\cfusion\bin\cfstart.bat
  • First port of call when debugging in CF:
    • cfdump and cfabort
    • Dont forget extra attributes for these tags such as show, hide and top
    • Still returns all records from query / object, just saves a little time by restricting / filtering what it renders in the browser
  • Custom debug templates (extending default CF templates)
  • Trace output
    • Must have enabled request debugging output
    • trace(text="", var="")
  • Logging
    • use in production for debugging assistance
    • useful attributes: text, type, application and file
    • writeLog()
  • Try / Catch
    • Good for isolating bugs buried in layers of code
    • Use for exception handling
    • Use the catch block to at least log the error; don’t swallow the error
  • External tools:
    • CFBuilder debugging
    • Chrome Dev Tools
    • Fusion Reactor
    • Colleagues (speak to people… communicate!)
  • Good practice looks like:
    • TDD, BDD, Selenium, Continuous Integration, version control, agile practices (even for a team of one)
    • Orthogonality
  • Trust nothing
    • Optimise your time, use your instincts and look for the obvious

This was a great session. It may have seemed as though it was stating the obvious with some of the techniques but ALL of this is important and not really used in the most effective way possible by a good number of developers.

Use your CF framework to help debug your CF application.


Monitor, Troubleshoot & Protect Your CF/Railo Servers with FusionReactor 5 - Charlie Arehart

  • Why use FusionReactor?
    • Can watch current activity as well as historical activity
    • Can watch for certain problems and alert you accordingly
    • Helps to pre-empt the faults before they occurr and make your server unreachable
    • Monitor Adobe ColdFusion, Railo, OpenBD
    • Monitor ANY JEE server or Java app on your server

The more I see of FusionReactor the more impressed I am with it. It’s level of logging and detail available to view is very impressive.

If only there was a cloud version too… ahem

  • FusionReactor Cloud will display real-time metrics for your requests
    • Not available (yet)

http://fusion-reactor.com


The next Javascript, ECMAScript 6 for those still using 3.1 and awaiting 4.0 - Matt Bourke

  • Why is JS so exciting?
    • Write once, run everywhere
    • Create games (Phaser.js)
    • Automated regression testing (casper.js)
  • JavaScript is the assembly language of the web
  • JS doesn’t have classes - prototype based
  • ECMAScript 6 WILL have classes
  • Ways to use ECMAScript 6 now:
    • Transpile with tools like Traceur or Mascara
    • Use latest Chrome / Firefox
  • Beware function hoisting - add var scopes to the top of your functions
  • Generators
  • Promises
  • WeakMap - setting and getting object properties
  • Proxies - intercept operations performed on objects
    • get()
    • set()
    • deleteProperty()
    • enumerate()
    • and many more…
  • ECMAScript 7 - approx. one year away (apparently)
    • Object observations (no more dirty checking)
      • object.observer(objectname, function(changes)) { // code here }

Railo - Gert Franz

  • Railo 4.2 released at cf.Objective() 2014
  • The future of Railo 5
    • Focus on:
      • Performance
      • Stability
      • Language improvements
      • Ease of use
  • LARGE structural rewrite of the underlying engine to use OSGi
    • manages libraries (bundles and versions)
    • allows you to load libraries in different versions all at the same time
    • helps to eliminate clashes with JAR libraries
  • OSGi
    • enterprise market requirement
    • EVERYTHING in Railo is OSGi
    • All libraries used by Railo are bundles
    • Possible to load / start only the libraries used
    • dtf=JavaProxy(class=:"org.foo.bar", version="2.1.0", bundle:"org-joda-time");
    • If no local library exists for that version Railo will attempt to download it for you from their update site
  • JSR 223
    • a framework for embedding scripts into Java source code
    • >jrunscript something.js
    • >jrunscript -f cfml myFiles/foobar.cfm
  • Syntax Changes
    • Lambda functions introduced
    • access modifiers for component data members:
      component {
        this.displayName = "fooBar";
        private this.version = "1.0";
      }
      
      • dumping the this scope will not return the version property.
    • Component iterators
      • _next(), _hasNext(), _reset()
    • new component keyword static
      • define static constructor
      • static data shared amongst instances of same component
    • abstract and final components and functions
    • inline components
    • sub components using : separator
      • more to come on this later

Not attended but wanted to follow up on:

Asynchronous Processing with CF and RabbitMQ - Markus Schneebeli

  • Message Queues

http://www.rabbitmq.com/

Notes taken by Nolan Erck


So, you want to “put Facebook on your site” (or app)? - Kai König

  • Kai is now lead developer on the Facebook SDK open source project (since July 2014)


Latest Blog Posts

Jul 16, 2020
Github Actions with CommandBox and TestBox
Read More
Jul 9, 2020
Azure pipelines with CommandBox and TestBox
Read More
Dec 23, 2019
CFML content moderation detection component library
Read More