Skip to content

Category Archives: CFUnited 2009 Notes

#cfunited Notes – “Intro to jQuery”

Javascript is NOT the enemy. You can find peace.
Why jQuery?
powerful, wide support, works for me (after initial period of grumpy old man whining)
History

3 years old
high compatibility
free
minified, gziped or full fat
available on Google CDN

What does it do?

finds stuff
changes stuff
loads stuff
and more stuff

Signs that you may be looking at jQuery

$ is jQuery
lots and lots and lots of [...]

#cfunites Notes – “Advanced Custom Tags”

What is a custom tags?

CF custom tags are user created tags to extend the tag set
written in CF
executed on CF server
used along side standards tags
locally available

Why use them?

code reuse
encapsulation
abstraction
simplification
customized control flow
packaging

What about CFC?

yes everything you can do everything in CFCs but sometimes cust tags can sometimes offer a more natural feeling

Basics

stored anywhere the server has [...]

#cfunited Notes – “Create a Public Facing API”

APIs – The Basics

application programming interface
2 types – RESTful and RPC
offers ability to share data and functionality
centralize functionality

Possible Problems

poor planning can cause poor usability
needs to be accessible across multiple langauges
variable scope may not exist / be accurate
documentation needs to be extensible
security can be tested/attacked

The biggest security threat to your API

you!

Documentation
description, parameters, example call, example response, [...]

#cfunited Notes – “Extending CFBuilder w/ CFML”

http://labs.adobe.com/technologies/coldfusion9/
What can extensions do?
Anything CF can!
•    written w/ CFML and XML
•    runs on a CF server
Common Uses
•    code generation
•    framework scaffolding
•    server management / probes
•    code analysis
•    reporting
Add New Context Menus
•    RDS View (databasees and tables)
•    Outline View
•    Resource View (projects and files)
Workspace Events
Installing a CFBuilder Extension
Preferences -> CF -> Extensions
Good practice to put extensions [...]

#cfunited Notes – “Facebook applications with a CF Backend”

Workings of a Facebook App

Facebook -> your website -> Facebook API -> your website -> Facebook
They scan for “bad” stuff before displaying it.
Good though because its all secure for you.

Setup

name your application (read the terms – good bathroom reading)
make note of your API key and secret (needed for all API calls)
setup a facebook URL (unique) [...]

#cfunited Notes – “CF Developer’s Guide to Mate Flex Framework”

Sample Application
Uses upcoming.org REST API to show events
ColdFusion End

basic CFC to call API (getCountryList, getStateList, getEvent, search, etc)

Mate

easily handle flex events
tag-based
dependency injection
supports modules
flex messaging support
extensible (extensions available)

Typical Process

view — event –> main.mxml -> eventMap (remote objects to CF) -> manager
result is then injected into the view

Terminology
EventMap:

EventHandlers
RemoteObjectInvoker
ResultHandlers
MethodInvoker
EventAnnouncer
Injectors

Manager
Setting up your Flex App

Enable CF remoting
Include mate.swc
Typical folder structure

Mate [...]

#cfunited Notes – “CF & PDF: Improving Your Workflow”

What’s the problem?
Normally, lots of steps in the process involving lots of different people at different levels.
What’s the solution?
After noticing the problem for some time, most organizations will finally address the problem.
CF + PDF!
Accelerates form creation that has server side connections.
Tools

LiveCycle Designer – Windows only!?!?!? Comes free with Acrobat Professional.
ColdFusion

Demos

Loads in browser (machine dependent) and [...]

#cfunited Notes – “Code Reviews and Team Dynamics”

What is code quality?
Not talking about the little things like “you missed a cfQueryParam there” but more “is it going to stand up to the test of time” so that things last.
Steve McConnell
1 of 3 most influential people in the software industry (Bill Gates and Linus Torvald as the other two)
“Testing does not along make [...]

#cfunited Notes – “CF9 and AIR: Developing Offline Applications”

The same 3 ways (WebService, HTTPService and RemoteObject) to connect to CF from AIR that existed in CF8 will continue in 9.
New things in Centaur
Fast Remoting

made several times faster
direct data translation between ActionScript and CF types
circular ref bug is fixed
no code changes required
support the old style remoting for backwards compatibility

ActionSript proxies to access CF tags

access [...]

#cfunited Notes – “CF911: Tools and Techniques for CF Server Troubleshooting”

When the stuff hits the fan:

you want to know what went wrong and why
diagnostics to track errors and other info – in CF, web server, DB and whole OS.
available tools for monitoring CF – free/commercial/cf/generic
presentations at http://www.carehart.org/presentations

Typical Scenario
CF stops responding
What do you do?

Restart CF – doesn’t find root cause
Diagnostics logs – finding the right logs [...]