Saturday, June 30, 2007

CFUnited Day 4


This is the 4th and final day. Good presentations so far this morning.
Jeff Trapper gives a very good presentation on using CF and Flex.
Nic Tunney's Introduction to OO with CF was ok. Lots if information to present in an hour.
I did the repeat thing and attended Hal Helms again. More OO and programming CFCs.
Coming up is Mark Drew and Advanced CFEclipse.
Lastly today will be Matt Woodward and OO Architecture Back to Front. I should learn much.

Plane leaves about 8. Should be at the airport 3 hours in advance. Plenty of time to read.

I took notes this morning the old-fashioned way.. with paper and pen.

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,

Thursday, June 28, 2007

CFUnited Day 2


What's New in CF8 presented by R. Kumar
This becomes a long list list very nice improvements and additions. I can display a complete list in this space. Most of this has been presented by Ben Forta or others in previous presentations.
* You may now loop over an array or text file
* Interfaces are added to cfcs. Use the tag. The implementation is by component. All methods must be implemented and method signature must match.
* 20x performance improvement in cfc
* CFC can be duplicated. Creates a deep copy of component.
* OnMissingMethod callback to component.
* OnMissingTemplate (URI)
* Per Application Settings by mappings, custom tag paths
* Multi-Threading programming, new threads run asynchronous to the page, you spawn multiple threads. Pass data in thread-safe way as attribute (attribute scope)
* Inter-Thread Communication
* File I/O using . File associated functions for use inside .
*DB related enhancements include auto-generated key retrieval, savepoints with actions setsavepoint and rollback.
* gets tables in data source, table columns, etc.
* can be output to browser, console, or file
* CFObject/CreateObject also supports .NET classes
* manipulates zip/jar files
* Secure FTP support
* File of any size may be uploaded.
* Performance improvements: cfc creation- 20x

Building Secure CF Apps by Pete Freitag
* XXS + SQL injections is number one vulnerability
* Unchecked input is the number cause i.e. invalid email
* Server-side validation is best
* Uploading files can be very dangerous. Use "accept" attribute. This doesn't work!
* Upload to a directory outside of the web root. Always check the File Extension (cffile.serverFileExt. Check File Names as well.
* What's so bad about XSS? Stealing Cookies, Phishing.
*XMLFormat and HTMLEditFormat don't always work.
* Enable ScriptProtect(doesn't always work).
* Make Your own function. Escape: <> ' " () ; #
* Enforce Maximum String Length
* SQL injection. /news.cfm?id=8;DELETE+FROM+news
*Prevention that works is !
* Use in WHERE, SELECT, UPDATE, INSERT, DELETE
* Cross Site Request Forgery. How "samy", a MySpace user got 1M friends in 24 hours. *Whenever a MySpace user visited his profile, it executed a script.




Wednesday, June 27, 2007

CFUnited Day 1



I'm currently listening to Ben Forta and Tim Buntel's keynote address. A big crowd of probably 700+ people are joining us from D.C.. I the past there have been icicles hanging from the chandeliers. The room temp is great this morning. The mind cannot absorb what the butt cannot endure.

Ben is saying that even more new features will be introduced in this presentation.

One of the biggies is CFC creation speed. Now it is much faster! In fact, the overall speed of CF8 is much faster than CF7.

Matt Chotin is delivering the 2nd keynote that is focused on Flex 3.
* new css editor
* import skins into Flex Builder
* Enhanced Constraints Model
* Support for baseline alignment
* Advanced DataGrid
* Charting Enhancements
* New List and Data Effects
* Web Services Introspection
* Data Wizards for PHP, Jave, ASP.NET (ColdFusion was released in Flex 2)

Apollo has vanished in the thin AIR!
Code named product Apollo is now known AIR.
* Native OS drag and drop support
* Multi-windowed apps
* Local Database storage
* Persistent framework caching significantly reduces size of Flex applications. Apps can be as small as 50K!

Next Presentation is Dean Harmon

Benefits of PDF format
* Caputure, process, store, and share electronically
* Retain the layout of the original document
* Online of offine distribution
* Print it
* Encrypt it
* Permission restrictions
* Attach files
* Digital Signatures


is enhanced in CF8. It supports:
* conversion of all HTML and CFML tages to PDF content, with the following exceptions:
1.
2. Flash (swf)
3. Interactive tags like
4. JavaScript (AJAX)

tage used to:
* Manuipulates forms crated in Acrobat and LiveCycle
* Populate PDF forms with CF data
* Manipulate meta data
* Add watermarks
* Merge two documents together
* allows you to do server side printing of PDFs
* User running ColdFusion needs to have access to the prater
* CF Admin will show the printers available
* GetPrinterInfo() will get the capabilities of your printer so you can pass other attributes not supported by the tag.

Ray Camden Presenting Image Handling in CF8

Image is now a data type in CF8. IsImage() now exists.
Formats are JPG, GIF, TIFF, PNG, BMP
There is one tag () and about 50 functions!

Live Cycle Data Services (formally Flex Data Services)
It is now preconfigured by default in an integrated install when CF8 is installed. The express edition is free, but is limited to 1 cpu.
RPC
LCDS Messaging
* Publish and Subscribe
* Asynchronous communication
* Messages have a header and body
* ColdFusion can be a both a Producer and Consumer

Flex Data Management
* Manage Distributed Data in Flex applications (When data is changed, it is propergated to all running clients)
* Performance improvements include cfc creations, can return a CF query directly instead of creating an array of cfcs. Also, you can choose to use structures instead of cfcs to map to AS3 objects.
*Data management notification gateway added. (It is transactional in nature. CFC Assemblers include Fill, Get Sync, and Count. There is a wizard to write this code.)

Hal Helms and OO Programming with CF Components, MVC, and Inheritance
The opposite of a correct statement is a false statement. The opposite of a profound truth may well be another profound truth.
Object orientation encompasses and codifies many of the best practices of preOO programming.
In some cases, OO strengthens these best practices.



Saturday, June 02, 2007

MacBook on my wireless network

I got my new MacBook this week. This afternoon I installed CF8 beta and CFEclipse. No problem install. Runs amazingly fast! Love everything about this great machine. I also set up a wireless NetGear network. Another no problem install. I'm really enjoying computing from my Lay-z-boy!