Rob Gonda's Blog

AjaxCFC & jQuery need Rey Bango

We all know, and if you didn't, you do now ... Rey Bango is a jQuery evangelist, now part of Ajaxian.com, and long time user of AjaxCFC ... Rey and I have previously discussed adding him to the AjaxCFC team, so I'm proud to announce, he's in ... Rey's first task will be to add jQuery 1.1.4 to the AjaxCFC build, which will go into the RIAForge repo. Some people have updated it manually, but it belongs in the core distribution as well ... jQuery 1.1.4 has massive speed improvements over 1.1.3 and 1.1.2, which is the latest in AjaxCFC's distro. I'll fix a couple of memory leak problems with the DWR version and release it soon, hopefully next week. Welcome Rey and stay tuned.

YUI 2.3 is out with Rich Text Editor, now what?

YUI 2.3 has been released with six new components, as well as a skinning architecture and a new look for the components. [from Ajaxian]

Features

  • Rich Text Editor: Cross-browser support has always been a major challenge for RTEs, and we think you’ll be impressed with how well this editor works across the various environments. You can instantiate it with just a few lines of code for simple implementations
  • Base CSS: Nate Koechley continues to extend and refine the YUI CSS foundation. Base CSS itself applies consistent and common style treatments for the foundation
  • YUILoader: A mechanism for loading YUI components (and/or your own custom components) on the page via client-side script.
  • ImageLoader: Allows you to defer the loading of some images to speed initial rendering time on your pages.
  • ColorPicker: The Color Picker provides a powerful UI widget for color selection, featuring HSV, RGB, and Hex input/output and a web-safe color-selection swatch.
  • YUI Test Utility: YUI Test introduces a flexible unit-testing framework for the YUI ecosystem and serves as the foundation for our own unit-test battery.
  • Skins

Now, we all know that CF8 was release this week; it's dhtml goodies are based on YUI & Ext, and it the Rich Text Editing functionality on the fckEditor ... perhaps 8.0.1 should allow you to choose the Rich Text Editor implementation and allow to use the native YUI .... how's with me?

CF8 + Ajax need compression!

As you probably know, ColdFusion 8 came out today and it has tons of Ajax/DHTML goodies. It's based on YUI+EXT, which is a great, powerful, scaleable, documented solution... but it weights just too much. A simple cfwindow requires about a 360k JavaScript download ...

I checked the source code, and it's mostly minimized, which means it's hard to reduce the code-base even more... however, you can gzip it. Most/All modern browsers support gzip data, and the difference is huge.

With Apache you can use mod_gzip, but with IIS is slightly more difficult. The best solution IMO is to install a 3rd party tool such as port80 httpZip.

Check out the following comparisons.

CFWINDOW

<cfwindow
    center="true"
    closable="true"
    modal="false"
    resizable="true"
    initshow="true"
    height="200"
    name="window"
    title="UI Window Example"
    width="200">


UNCOMPRESSED
26 requests
0 cached files
0 errors

372244 total bytes
8114 request bytes
364130 response bytes
the average request was 312 bytes
the average response was 14005 bytes

entire session took 7.641 seconds
on average, responses took 0.336 seconds

COMPRESSED
26 requests
0 cached files
0 errors

116218 total bytes
7985 request bytes
108233 response bytes
the average request was 307 bytes
the average response was 4162 bytes

entire session took 3.672 seconds
on average, responses took 0.144 seconds

CFLAYOUT
<cflayout type="border">

  <cflayoutarea position="top" title="Top Layout Area">
  This is the top layout area.
  </cflayoutarea>

  <cflayoutarea position="center">
  This is the center layout area.
  </cflayoutarea>

  <cflayoutarea position="bottom" title="Bottom Layout Area">
  This is the bottom layout area.
  </cflayoutarea>

</cflayout>

UNCOMPRESSED
15 requests
0 cached files
0 errors

357131 total bytes
4584 request bytes
352547 response bytes
the average request was 305 bytes
the average response was 23503 bytes

entire session took 3.609 seconds
on average, responses took 0.223 seconds

COMPRESSED
15 requests
0 cached files
0 errors

102840 total bytes
4645 request bytes
98195 response bytes
the average request was 309 bytes
the average response was 6546 bytes

entire session took 2.64 seconds
on average, responses took 0.165 seconds

CFMENU
<cfmenu name="myMenu">
    <cfmenuitem name="home" display="home" />
    <cfmenuitem name="support" display="support" />
    <cfmenuitem name="about" display="about" />
</cfmenu>


 8 requests
0 cached files
0 errors

215463 total bytes
2366 request bytes
213097 response bytes
the average request was 295 bytes
the average response was 26637 bytes

entire session took 2.438 seconds
on average, responses took 0.289 seconds


8 requests
0 cached files
0 errors

54543 total bytes
2399 request bytes
52144 response bytes
the average request was 299 bytes
the average response was 6518 bytes

entire session took 1.562 seconds
on average, responses took 0.168 seconds


Pretty impressive huh?

So in conclusion, you must compression your scripts to make it half-decent for your users... ColdFusion provided a very powerful tool, now it's up to you to make the best of it.

RIA traffic debugging

Quick note on debugging a Rich Internet Application. As you probably know, RIAs usually don't refresh and communicate to the server in the background. You can't easily see the traffic, so I usually recommend using Firebug for Firefox, Live HTTP Headers, Fiddler, and my recommendation, Service Capture.... Well, there's a new kid on the block ... not so new perhaps, but I just finally tried it and I'm loving it. Charles is another http/amf monitoring application with many more capabilities than service capture ... actually, forget about the capabilities, the fact that I can open it with Firefox with no problems should be enough ... but if that's not enough, you can see the traffic is a structured view instead of sequential, which allows you to see the requests by domain, then folder, then file, and it even groups all the flash remoting calls together ... it's a beautiful thing. In addition it does have more capabilities such as seeing cookies, request / response sizes, mirror responses to disk, analyze cache, bandwidth throttle, spoof dns, and port forwarding. I'm very impressed.

jQuery and AjaxCFC News

jQuery 1.1.3.1: 800%+ Faster, still 20KB

  1. Improved speeds, with DOM traversal over 800% faster than in 1.1.2.
  2. A re-written event system, with more graceful handling of keyboard events.
  3. A re-written effects system (with an accompanying fx test suite), featuring faster execution and better cross-platform support.
Guess who's getting an upgrade soon?

ColdFusion 8 Public Beta is Live on Labs

I know it's been in the blogsphere for a few days, but if you missed it, ColdFusion 8 Public Beta is Live on Labs; it will let you develop next-generation Internet experiences faster and more easily than ever before. Here are just a few of the key features that you'll discover in the public beta:

  • Significant performance improvements - up to 5Xfaster than ColdFusion MX7.
  • Server monitoring identifies server bottlenecks, allowing for tuning and improved performance.
  • Code debugging speeds your development with set breakpoints, variables monitoring, and step through ColdFusion code with an Eclipse plug-in debugger.
  • Integration with Adobe Flex(tm) and AJAX features let ColdFusion power personalized, multimedia-rich applications to enhance your users' experiences on the web.
  • High-quality, on-demand presentations can be created dynamically on the server.
  • Applications can interact with PDF documents and forms for a printable, portable way to intelligently capture and share information.
  • Create and manipulate images with more than 50 new CFML tags and functions
  • Native support for .NET objects to easily integrate all of your enterprise data and infrastructure services.
  • Server-side printing

AjaxCFC fastSerialize example

Due to popular request, I added an example showing how to easily submit an entire form through Ajax with the fastSerialize jQuery plugin.

All you require to do is to include this plugin:

$.AjaxCFC({require:'json,dDumper,blockUI,jquery.fastSerialize'});


and use it to send them form:
onSubmit="return send( $(this).fastSerialize() );"


the send() function looks like this:
    function send(frmData) {
        $.AjaxCFC({
          url: "echoTest.cfc",
          method: "echo",
          data: frmData,
          success: function(data) {
              sDumper(data);
          }
        });
    return false;
    };

simple huh?

Again, I updated the SVN repo and project download files. Enjoy.

AjaxCFC for jQuery JSON Update

Jeff Borisch point out that the cfjson v1.6b that I was using for the jQuery AjaxCFC was buggy. I updated it to v1.7 in the SVN and the project download file... I strongly suggest you get this update.

Cheers.

jQuery-ext announced

The jQuery team announced that the jQuery Project and Jack Slocum’s Ext Project, mostly know as YUI-EXT, have partnered to integrate the amazingly lightweight and powerful jQuery framework with Ext’s awesome UI library.

This collaboration will greatly enhance the capabilities of both projects and expand the functionality available to developers using the jQuery JavaScript Library and the Ext UI component suite.

For those of you new to the Ext project, it includes a wide and powerful UI library, such as dialogs, grids, layouts, resizables, tab panels... This is great news for the jQuery community. Now you would be able to extend jQuery with powerful widgets from interface and Ext.

IMified powered by ColdFusion and AjaxCFC

Imified is an instant messenger buddy that offers access to productivity tools like notes, reminders, and todo's. The site is powered by ColdFusion and their IM bot is done through CFMX7 Event Gateways. However, the most important business aspect is that their back-end / account management is all AjaxCFC! :->
The concept is great because it's simple, yet very handy... I wish them luck and hope they add many more features.

I also wrote a few bots before, but quickly ran into licensing issues with the networks. All networks restrict the amount of messages a single user can send/receive per day, and some networks charge up to $50,000 simply to allow your bot to live.

More Entries

This blog is running version 5.9.003. Contact Blog Owner