Rob Gonda's Blog

Speaking at CFUnited Express - Atlanta

CFUnited express invited me to speak next month in Atlanta, next to Charlie Arehart, Ben Forta, Hal Helms, and Andrew Powell. It will be a one-day event that you can attend risk free if you're planning to attend the main CFUnited event, since the entire cover price will count towards your CFUnited ticket.

I will be speaking again on Ajax, Charlie on caching and performance, Ben on Apollo, and Hal on large-scale applications. I'm really exited about speaking and attending the other sessions. Hope to see a few familiar faces there.

AjaxCFC for jQuery Alpha3 Release

I just updated the SVN with the 3rd alpha release of AjaxCFC for jQuery. For those of you not familiarized with source control repositories, I included the code into the main AjaxCFC download (thank Rey Bango for reminding me four times a day), available at RIAForge and my blog. You can also just click here.

This release includes several small fixes in the JavaScript and upgrade to the latest CFJSON. Thanks to Larry Reinhard for pointing it out.

The code seems to be really stable; I haven't got many bug reports, au contraire, Jacob Munson, from CFQuickDocs, said he dropped it into his code w/o any complications, maintaining all existing functionality.

I shall wrap up some documentation and officially release it for production.

jQuery 1.1.1 update

If you're using jQuery 1.1, download immediately the 1.1.1 update. There are a few minor bugs that were fixed, but one was major for me. (see the full list here).
The first item: Setting the numerical value of a css property failed, for example: .css(”opacity”,0.5) (also occurred with zIndex, fontWeight), which by the way only affected IE, was causing my interface drag and drop not to work. For those of you not familiar with interface, it's a collection of components made in form of plugins that facilitate the development of Rich User Interfaces.
The particular problem I ran into was defining draggables. The code looks as follows:

$('#drag2').Draggable(
    {
        zIndex:     1000,
        ghosting:    true,
        opacity:     0.7
    }
);


Behind the scenes, this invokes the $().css('zIndex', 1000) function, which for some bizarre reason was translated into setting zIndex to 1000px; go figure. What amazes me with that Firefox, the all standard based web browser, actually ran this code, and IE, the all forgiving-stimulating-bad-code-practice was the one that broke.

Anyways, the jQuery team quickly released an update and I have not experienced any bugs since. Keep it up.



AjaxCFC for jQuery Alpha2 Release

AjaxCFC for jQuery is almost ready and I just uploaded to RIAForge the new Alpha 2 release. You may sync up your SVN repository or if you don't use source control, use RIAForge's zip download utility to fetch the latest version. Once you download the zip file, the jQuery related code is located in the branches/jquery folder.

I am using the just released jQuery 1.1, so if you drop this code on an old site using jQuery, you probably want to download the back-compatibility plugin.

Like I mentioned in my alpha 1 post, I included a plugin to maintain DWR syntax compatibility, and to illustrate it, I updated a few examples to use this code instead of DWR. Thus far, the only significant different I found is when returning a query using JSON serialization method (default on this release). The syntax to access the query columns is a little different, as you will see in the examples and soon-to-come documentation.

Among some other changes, I updated logging, error trapping, security checks, constructor methods, serialization capabilities, and more.

Most of these changes affect the DWR and jQuery version since the Ajax.cfc core file is shared between them.

Constructor method: many of you tried to extend your existing domain model objects and provide remote methods inside them. Although I don't particularly agree with this practice, I don't want to restrict it. AjaxCFC used to rely on it's built-in init method constructor, which interfered with you own component once extended, so I renamed the AjaxCFC to allow your objects to contain an init() method.

Error trapping: AjaxCFC catches most errors in your components and by default, alert you with the error message. I added the file and line number since sometimes the message was not enough. I also added a method to optionally popup a window showing the error dump, which is extremely useful because you can see the full trace... to enable this just invoke the setPopupErrorDump(true) method inside your CFC.

Security Check (for jQuery version only): jQuery sends additional x-header data in the http request, so I added an option to check for it, to prevent access to the CFC if it's accessed by any method other than an XmlHttpRequest. To enable it just invoke the setCheckHttpRequestData(true) method inside your CFC. In fact, by default AjaxCFC ships with all the security methods turned off, for easier debugging. It is advisable to turn them on by calling: setAllowedVerbs('post'); setCheckHTTPReferer(true); setPopupErrorDump(false); setCheckHttpRequestData(true);

Serialization (for jQuery only): The new AjaxCFC is able to serialize using pure JS, JSON, or WDDX. I haven't fully benchmarked the performance differences, so for now just use the one you like the most.

Logging: I updated the log4javascript version, plus I added a little more information in the request logs.

Documentation will be included with the beta release.

Please note that despite some comments out there, this release does not mean that AjaxCFC switched to jQuery. This release is a branch using a different Ajax engine, and both versions will continue to be updated and supported.

That's it for now, please report any issues using RIAForge's bug tracker.

Enjoy.

jQuery 1.1 final released today

Ladies and gents, jQuery 1.1 is out. It's 10-20x faster than 1.0.x due to significant API refactoring, which means that all your 1.0.x may not work; for this, you may use the jQuery 1.0 Compatibility Plugin to keep 1.0-style functionality in 1.1... check it out

Ajax, JavaScript, CSS, DOM: Get Firebug 1.0b8

Quick note for those who jumped ahead and downloaded Firebug 1.0 beta: updates will not show up automatically. For instance, I first downloaded 1.0b1 and it's already up to 1.0b8, with many, yes, many bug fixes.

For those of you new to Firebug, it you do any type of web development, you need this extension. Jack Slocum (mastermind behind YUI-EXT) quote: "Thanks to the FireBug Profiler, I was able to trace the bottlenecks and test different execution plans to see what was the fastest." when he was writing the all new DomQuery.

jQuery v1.1 beta released today

jQuery v1.1 beta was released today and final release is scheduled for this w/e -- how exciting! Since they streamlined the API to massively improve speed, they also released a back-compatibility plugin so you can easily just drop this new API to upgrade.

John Resig also blogged about the new selector speed and compared it to Jack Slocum's new DOMQuery.

jQuery 1.1 alpha released today

jQuery v1.1 alpha was just released. Among the major changes, you would find that

  • Its selectors are 10-20x faster than those in jQuery 1.0.4.
  • The documentation has been completely revamped.
  • The complexity of the API has dropped by 47%.
  • It has a ton of bug fixes.
  • It has a bunch of great new features.
Download

The following methods have been renamed/reorganized in this version, here is how you can continue to use them, as you would expect:

Old Way (1.0.x) New Way (1.1)
.ancestors() .parents()
.width() .css(”width”)
.height() .css(”height”)
.top() .css(”top”)
.left() .css(”left”)
.position() .css(”position”)
.float() .css(”float”)
.overflow() .css(”overflow”)
.color() .css(”color”)
.background() .css(”background”)
.id() .attr(”id”)
.title() .attr(”title”)
.name() .attr(”name”)
.href() .attr(”href”)
.src() .attr(”src”)
.rel() .attr(”rel”)
.oneblur(fn) .one(”blur”,fn)
.onefocus(fn) .one(”focus”,fn)
.oneload(fn) .one(”load”,fn)
.oneresize(fn) .one(”resize”,fn)
.onescroll(fn) .one(”scroll”,fn)
.oneunload(fn) .one(”unload”,fn)
.oneclick(fn) .one(”click”,fn)
.onedblclick(fn) .one(”dblclick”,fn)
.onemousedown(fn) .one(”mousedown”,fn)
.onemouseup(fn) .one(”mouseup”,fn)
.onemousemove(fn) .one(”mousemove”,fn)
.onemouseover(fn) .one(”mouseover”,fn)
.onemouseout(fn) .one(”mouseout”,fn)
.onechange(fn) .one(”change”,fn)
.onereset(fn) .one(”reset”,fn)
.oneselect(fn) .one(”select”,fn)
.onesubmit(fn) .one(”submit”,fn)
.onekeydown(fn) .one(”keydown”,fn)
.onekeypress(fn) .one(”keypress”,fn)
.onekeyup(fn) .one(”keyup”,fn)
.oneerror(fn) .one(”error”,fn)
.unblur(fn) .unbind(”blur”,fn)
.unfocus(fn) .unbind(”focus”,fn)
.unload(fn) .unbind(”load”,fn)
.unresize(fn) .unbind(”resize”,fn)
.unscroll(fn) .unbind(”scroll”,fn)
.ununload(fn) .unbind(”unload”,fn)
.unclick(fn) .unbind(”click”,fn)
.undblclick(fn) .unbind(”dblclick”,fn)
.unmousedown(fn) .unbind(”mousedown”,fn)
.unmouseup(fn) .unbind(”mouseup”,fn)
.unmousemove(fn) .unbind(”mousemove”,fn)
.unmouseover(fn) .unbind(”mouseover”,fn)
.unmouseout(fn) .unbind(”mouseout”,fn)
.unchange(fn) .unbind(”change”,fn)
.unreset(fn) .unbind(”reset”,fn)
.unselect(fn) .unbind(”select”,fn)
.unsubmit(fn) .unbind(”submit”,fn)
.unkeydown(fn) .unbind(”keydown”,fn)
.unkeypress(fn) .unbind(”keypress”,fn)
.unkeyup(fn) .unbind(”keyup”,fn)
.unerror(fn) .unbind(”error”,fn)

However, before you get too alarmed, I know they will release a 'back-compatibility' plugin, which would help you transition from 1.0.x to 1.1.

I am really excited, benchmarks will come soon, but this release is way faster and supperior, so go ahead, spread the word. I will probably release the beta version of AjaxCFC for jQuery with the official 1.1 release.

AjaxCFC for jQuery Alpha Release

I finished today the implementation of AjaxCFC for jQuery. It's the same Ajax <-> CF integration you already know, but using the jQuery Ajax engine. It supports full JSON and WDDX serialization, has improved error handling, improved log4javascript integration, still supports named and unnamed arguments, and just so you can use it right away, it's back compatible with the DWR syntax. The only incompatibility is the change of the $() function, which you can actually override if you wish, but I didn't on my release.

This is great news folks, because jQuery is extensible and allows for easily dropping plugins into your code...
I will work in documenting it for beta release, but those of you who wish to use the bleeding edge version just add a comment and I'll send you the code. I'd appreciate comments and suggestions from those who wish to check it out.

Public Beta release should come sometime next week.

JSEclipse now at Adobe Labs

JSEclipse is a new plugin for the Eclipse environment that helps developers code JavaScript faster and with no errors. With JSEclipse, you can complete a variety of tasks, from editing small sections of code to working with the next big AJAX library or developing plug-ins for a product that embeds JavaScript snippets.

Download and install JSEclipse and improve your JavaScript coding experience with:

  • Contextual code completion & shortcuts.
  • Project outline and quick navigation through function declarations.
  • Syntax highlighting.
  • Error reporting.
  • Customizable code templates to get you started.
  • Support for popular JavaScript libraries (Dojo, Prototype, YUI, Qooxdoo).
  • Support for JavaDoc documentation and multi-line comments.

More Entries

This blog is running version 5.9.003. Contact Blog Owner