Rob Gonda's Blog

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?

Firebug Security Update

If you're a web developer, you should use Firefox. If you use Firefox, you should use Firebug. If you use Firebug, you should install the latest security update. You can read more at the official site, or simply update your plugins through the Firefox interface.

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.

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.

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