Home Contact

PD Versus-inspired Logophilduba.com

Adventures in Web Application Develompent by Phil Duba

Recent Entries

Popular Entries

Top Commenters

  • Nathan Mische (12)
  • CFFusionDev (6)
  • CFdevfusion (6)
  • Peter Bell (4)
  • Sean Corfield (3)
  • Rey Bango (3)
  • Terrence Ryan (3)
  • ah7866 (3)
  • Scott (2)
  • Jim Priest (2)

Slideshows

Dresser/Changing Table...
Images related to the lay...
Nursery renovations...
Pool Surprises...

Sponsored Links

Text Link Ads

CFUnited: jQuery/CF Integration

Posted On June 19, 2008 9:19 AM By Phil in CFUnited

This morning I attended John Farrar's jQuery/CF Integration presented by John Farrar. I was a little late, but thank goodness for technical difficulties I didn't miss much. That was a double edge sword also, as John tried to make up time during his presentation. Overall, it was a good introduction and I have realized I really need to get into jQuery to make a little more usable/rich applications. Here are my notes from the presentation:


Reasons to like jQuery
- Less, simpler code to execute functions
- Easy to extend
- Growing libraries
- Established platform

jQuery
- Founder: John Resig
- JavaScript Foundation for Mozilla Foundation (formerly) - this was the reason it was very mature out of the box

jQuery Popularity
- almost quadruple in popularity in Google trends
- Books: Learning jQuery (Packt), UPDATE: jQuery in Action

jQuery Overview/Examples
- Core
- Selectors
- Attributes
- Transversing
- Manipulation
- CSS
- others I didn't catch

CF'afying JavaScript
- CFJS - cfjs.riaforge.org, Chris Jordan
- library of over 60 functions to be like a lot of CF functions

jQuery Examples
- create a proxy for your Custom CFCs with jQuery AJAX functions
- recommends using jQuery.ready() and jQuery.noConflict() and move away from the onload function. Also, doing ready() will help to eliminate the "flicker" of items being displayed then hidden.
- went through selector examples (click(), toggle(), etc.)
- I didn't know about the use of jQuery() instead of $. Note to self: go back and change the one application I did using jQuery and make that change, :)
- Best practice is to use CSS classes as opposed to using .css() - if you have CSS classes
- Using DOM manipulation would allow interactivity with DOM elements that aren't buttons like list items, without putting in an anchor tag, etc.
- Lots of documentation at jQuery site
- Recommends the jQuery UI library for UI elements

Specific to CF Integration
- Use AJAX library functions, can wrap in CF tags
- Always empty areas before reloading

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

Rey Bango's Gravatar I'm glad that John did the preso. As a long time CF developer and jQuery Team member, I'm always pushing people to check out jQuery. John's just made my job easier :)
# By Rey Bango | 6/19/08 10:27 AM
Michael Brennan-White's Gravatar Did John say when his book will be released? I want the e-book now.

I will be very interested to see his examples of creating the proxy through jquery functionality. is it different than using cfajaxproxy ?
# By Michael Brennan-White | 6/19/08 10:51 AM
Rey Bango's Gravatar @Michael: I would venture to say that he's using a simple CF stub CFM file with some param passed to it to instantiate the CFC. That's how most folks have done it.

@Phil: Could you also add jQuery In Action to the list of books you mentioned (http://www.manning.com/bibeault/)
# By Rey Bango | 6/19/08 10:58 AM
Phil Duba's Gravatar @Rey - I updated it. John went by some of the slides quicker than I could type my notes up, :). That's essentially how he described the process but didn't have much in the way of explicit CF examples. He concentrated on the client and use of jQuery iteself.
# By Phil Duba | 6/19/08 11:07 AM
Rey Bango's Gravatar @Phil: Thx for doing that. I'll see if I can get some time to start putting up more jQuery/CF blog posts. Ray Camden has just jumped on the jQuery train so he may start doing blog posts as well.

What would you like to see in terms of posts?
# By Rey Bango | 6/19/08 11:18 AM
Phil Duba's Gravatar I'm sure Ray will get a bunch of stuff out as he goes through his learning process. I guess to get myself started, I'm looking for maybe where jQuery could be used in a typical CF application. I think part of what I struggle with sometimes is where to use AJAX and were not to.
# By Phil Duba | 6/19/08 2:46 PM
Post Your Comments

Captcha

If you subscribe, any new posts to this thread will be sent to your email address.