Friday, June 29, 2007

CFUnited Day 3

It's already day 3. Last night attendees were entertained by Adobe at an outing held at the National Zoo Big Cat Pavilion. Lots of fun. The rains came and broke up the party early.

Apple iPhone is available today.

Session 1 CF8: Advanced AJAX Development by Rakshith N.

*In AJAX model, User interface talks to Javascript and Javascript then talks to the server, vice-versa.
* In CF8, there are UI Widgets, AJAX plumbing, and JSON Support.
* CF data types available in JSON format
* cfwindow, cftree, cfgrid
* JavaScript Object Notation (JSON), representation of data in Javascript, It is a native format in Javascript
* JSON is fat free XML. { books: [
{isbn:'0002000', title:'xyz'}
,{isbn:'000358', title: 'abc'}
]
* SerializeJSON() converts ColdFusion object to JSON data format
* DeserializeJSON() converts JSON into CF objects
* IsJSON()
* CFML to JSON type mapping for string, number array struct, query row format, and query column format.
* AJAX Plumbing in CF. tag works by fetching data for the region using BIND expessions. This binds to a cfm page.
* Only what is inside the cfdiv is submitted asynchronously
*Binds.
bind="cfc:bookData.getBookDetails({bookForm:isbn.value@change})"
Four types of binds. CFC, Javascript, URL, Plain
bind="javascrip:getBookDetails('{bookForm:isbn.value@change}')"
* Creates a JavaScript proxy for a CF component. Generates a proxy function for every remote function on the cfc.
var b = new jsbooks();
var details = b. get....
*cfajaxproxy has the following built=in functions: setHttpMethod, set AsyncMode, set SyncMode, setCallBackHandler,setErrorHandler,setQueryFormat,setReturnFormat,setForm
*ColdFusion.navigate(url,id,callback,errorHandler,httpMethod,formId)
*AjaxLink(url)
Refreshes the contents of window, not page.
*AjaxOnLoad(functionName) : Calls a JS function when markup is loaded, after all CF components are initialized
* ColdFusion.getElementValue(elementname,formname,attribute)
*Enable debugging for ajax then ?cfdebug appended to Logger url will produce debug window.
*AJAX Widgets. Demos a cool email app written with AJAX technology in CF8.

presentation and sample apps at http://www.rakshith.net/blog/

Test-Driven Development by Paul Kenney
* Testing is not usually comprehensive enough. Test are usually written last in the development process. Sometimes written by people not writing the code. Test are based on documentation that is usually out of date. Testing is not automated. One fix may cause other problems that go unseen.
*Test-Driven Development is a method where no code is written without test being written first.
* Test exhibited behavior of code
* Written by the developer who writes the code
* Provides a safety net that provides confidence in the current functionality and courage to refactor.
* Tests are written as pass/fail
* Failing tests make great to do lists.
* Refactoring. The process of changing changes to existing working code without changing its external behavior. Changing how it does it, not what it does.
* When to refactor? Duplication, Unclear intent, Code smell - comments, etc.
* cfcUnit is written for CF. There is Junit, Sunit, AsUnit, FlexUnit, and more...
* cfcUnit consists of Test, TestCase, TestSuite, Assert, TestFailure, etc.....
* Writing a Testcase. Extends "org.cfcunit.framework.TestCase. Contains methods, each of which is a single test. etc...
* Example:



* Demo....


http://www.pjk.us/paul/

CF8 and Microsoft Exchange and .NET Integration

CFExchange tags use WebDAV to connect to Exchange Server. Can connect over HTTP or HTTPS. Other tags are CFExchange Connection, CFExchangeMail, CFExchangeTask, CFExchangeCalendar, CFExchange,

No comments: