An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries Tagged as jquery

CFUI Tags - Just Say No!

January 25, 2014 ·

Don't be a "bloody wanker", just don't use those CFUI tags!

[

Tags: cfunited07 · coldfusion · javascript · jquery

Getting Started with ClojureScript and jQuery (and FW/1)

February 11, 2012 ·

About a week ago, I blogged about how to get started with ClojureScript and FW/1 and I showed some basic DOM manipulation functions that go down to the JavaScript metal. In any real world project, you're not going to want to do that - you'll want to leverage a battle-tested, industrial-strength library for that... something like jQuery for example. Using an external JavaScript library with ClojureScript isn't entirely straightforward, unfortunately, mostly due to how names are exported and how the Google Closure compiler munges them in its efforts to produce minified code.

[

Tags: clojure · fw1 · jquery

My cf.Objective() 2009 Schedule

May 11, 2009 ·

In the absence of a printable schedule - sorry, Joe Rinehart says it's a problem with the Media3 hosting and he's been trying to get them to fix it for months! - here is my schedule for cf.Objective() 2009:

[

Tags: adobe · air · architecture · cfobjective · coldbox · coldfusion · coldspring · flex · iphone · j2ee · jquery · machii · orm · oss · ria · saas · swiz · tdd

A quick jQuery sortable tip

March 11, 2009 ·

[Originally published in a slightly different format on the Broadchoice ArgumentCollection blog]
The Broadchoice Community Platform has a number of "modules" (applications) that you can add to a page and one of those is a list of documents for download (or external links). You add the module to the page and then select documents (from your document library) to add to that module. In previous releases, authors had to add documents in the order that they wanted them to appear on the (generated) web page. We looked at a number of UI options for allowing authors to "rank" the documents within the module but felt most of them were fairly clunky, involving entering ranking numbers to reorder things or up/down arrows requiring authors to move documents one position at a time. Ugh! Ray pointed me at one of the cool jQuery UI interactions: sortable. It allows you to mark a "container" tag (e.g., a div) as sortable and then users can drag'n'drop the "child" elements into the order they want. You can attach event handlers that fire at various points in the drag'n'drop operation. Here's how we do it:
<div id="sortable">
<cfloop query="documents">
<div id="" onMouseOver="setCursor(this,'move')" onMouseOut="setCursor(this,'auto')"> ... etc ...
That's all you need in the HTML. Then you add the following JavaScript:
update: function(event,ui) {
jQuery.get('/updateRank.cfm?' + $('#sortable').sortable('serialize'));
This causes two things to happen:
  1. jQuery marks the sortable div contents as being, well, sortable!
  2. jQuery adds an event handler for update - when the drag'n'drop operation completes - that invokes a URL on the server, passing in the serialized data from the children of the sortable div, i.e., the id values as a list in the new order: doctag[]=1,3,4,2. It assumes an underscore as a separator.
The server side code simply updates the module data to put the documents in the specified order.

Tags: coldfusion · jquery

My MAX Schedule

September 09, 2008 ·

I just made another pass over my MAX schedule to finalize my choices and thought I'd post my planned list of sessions so folks will know where to find me:
  • Monday
    • Opening General Session
    • Adobe Roadmap: Enterprise
    • Flex Architecture Face-Off - panel
    • Real-Time Collaboration Apps with Flex and Cocomo - Nigel Pegg
  • Tuesday
    • Mixing Open Source and Commercial Software
    • General Session
    • Adobe@Adobe: IT Innovation
    • Developing Rich Applications with jQuery and Adobe AIR - John Resig
    • The REST of SOA
  • Wednesday
    • Advanced Patterns for ColdFusion Test Automation - Bill Shelton / Marc Esher (MXUnit)
    • Building Real-Time and Collaborative Applications with Flex and BlazeDS
    • Event-Driven Programming in ColdFusion - an updated version of my session from Scotch on the Rocks and CFUNITED
    • Cocomo Deep Dive: Building Social RIAs with Flex + Adobe Hosted Services - Nigel Pegg
    • Developing Enterprise ColdFusion Applications - Joe Rinehart
As I was updating my schedule, I noticed that several of the ColdFusion and Flex workshops are already sold out - good to see so much interest in those! I was originally going to Dave Watts' "High Performance ColdFusion" but decided to give up my seat when I saw it was sold out (hopefully someone else will get in now!). There's a lot of excellent ColdFusion sessions at MAX this year but my focus right now is on Flex, AIR and real-time collaboration so that has driven most of my session choices. Also a reminder that BACFUG meets on the Wednesday evening immediately after MAX ends and I am pleased to announce that we are having a double session with some MAX speakers:
  • Bill Shelton and Marc Esher will present on Unit Testing in ColdFusion with MXUnit
  • Joe Rinehart will present on Model-Glue 3: Gesture
We hope to have a good turn out with MAX attendees taking advantage of this (free) user group meeting in the evening! Since the meeting is inside the Adobe building, you will need to RSVP for security purposes. See you there!

Tags: adobe · adobemax08 · air · bacfug · broadchoice · coldfusion · connect · edmund · flex · jquery · modelglue · oss · ria · saas · tdd

Nice jQuery-based CF_AJAX widgets

August 29, 2008 ·

Michael Sprague has created a nice set of custom tags that use jQuery to provide alternatives for cfgrid, cfwindow and cftooltip. Currently a "prerelease", this will become a RIAforge project in due course. Another example of the power and simplicity of jQuery. (via Vince Bonfanti's blog)

Tags: bluedragon · coldfusion · jquery

jQuery and closures

July 04, 2008 ·

Most of my readers will know that I'm a big fan of closures - the ability to create anonymous functions with bound variables (bound in the context of the closure). David Harris has a brief post about the joys of jQuery where he comments on what, to him, was an unexpected feature that allowed binding of variables, i.e., JavaScript (and ActionScript) support closures. I find it interesting that he thinks this binding "somehow feels wrong" and I've seen the same reaction from a number of people when first confronted with closures. This binding is what gives closures their power and why they are more than just "anonymous functions". They carry with them the context in which they were created. It's also an interesting contrast with ColdFusion where variable binding is done at the last minute at runtime and thus you can take a UDF function that references (which might be a page scope variable) and add that function to a CFC instance and now will refer to foo in the variables scope of the CFC itself. I think that's why my Closures for CFMX library has proved so puzzling for a lot of folks :)

Tags: coldfusion · jquery

John Resig speaking at MAX 2008!

June 25, 2008 ·

I was just looking through the list of speakers and noticed that John Resig, creator of jQuery, is speaking at MAX this year:
In this session, you'll learn from John Resig, the creator of the jQuery library, how to build a desktop application with Adobe AIR and jQuery. jQuery is a fast, concise JavaScript library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. Although jQuery is typically used inside a web browser, it's now possible to use jQuery to build rich desktop applications.
Should be a great (and extremely popular) talk!

Tags: adobemax08 · air · jquery

Interesting jQuery multicolumn dropdown menu plugin

June 20, 2008 ·

A client I have been working with just released their first open source project: a multicolumn dropdown menu plugin for jQuery. Their use case is to allow users to easily navigate complex hierarchical menus of options either via the mouse or via the keyboard. I had nothing to do with this project but given my recent interest in jQuery, I felt it was worth blogging about. I think it really shows the power and simplicity of jQuery.

Tags: coldfusion · jquery · oss