Brennan Spies's blog

Ajax for the Lazy: Ajaxify

Tagged:  

From the "good to know" deptartment: a new jQuery plugin for converting existing links on a page to AJAX load and submit requests is available: Ajaxify.

Some examples:

//The easiest way: binds "click" event to existing "href" attribute
//and loads it into the portion of the page specified by the "target"
//attribute
$("#some_id").ajaxify();

//With options
$('#some_id').ajaxify({
        link:'example.php?action=options&ajax=true',
        target: '#container',
        loading_img:'images/orange_loading.gif',
        title:'Setting up options',
        method:'POST'
});

The Ajaxify plug-in also supports partial loads and forms. A demo page is available here.

jQuery 1.3 Beta 1

The first beta release of jQuery 1.3 is out.

Changes since 1.2.x:

  • New CSS selector engine (Sizzle)
  • Rewrite of DOM manipulation
  • Rewrite of namespaced event handling
  • Rewrite of .offset()
  • And more...

See earlier coverage here for more details.

Get jQuery 1.3 beta 1 here.

Opera 10 Alpha Released

Tagged:  

Opera Software has released the first alpha of its Opera 10 browser, the first public release to pass the Acid 3 test. The release marks the debut of version 2.2 of Opera's Presto rendering engine.

New and notable:

  • Up to 30% faster page rendering than previous releases.
  • Support for the web fonts CSS 3 module.
  • RGBA and HSLA opacity, e.g. background-color: rgba(255,0,0,0.5) or background-color: hsla(240, 100%, 50%, 0.5).
  • Support for the Selectors API.
  • Improved support for SVG, including frames-per-second on animations and ability to use SVG web fonts.
  • Improvements to the Opera Dragonfly set of developer tools, including the addition of a network tab (a la Firebug) and live DOM editing (nice!).
  • Built-in browser inline spell checking and auto-updates.

The Opera 10 alpha release can be downloaded here. The current stable release is version 9.6, and is available from the main page.

FireUnit

John Resig has just publicly announced a new extension/framework for unit testing JavaScript code with Firefox/Firebug called FireUnit. The framework provides a simple API for reporting test results within a new tab in Firebug. It also provides some methods for simulating browser events. Developers can use a local HTTP test server for running unit tests that need to simulate a network communication.

FireUnit requires Firefox 3+ and Firebug 1.2+. You can grab the extension and source code here.

There are some examples of how to write a test case here, and there is a blog entry on FireUnit by the other co-author here.

jQuery Patches for 1.3

Offering a sneak peak of what will be in the new version, John Resig has released the first in a series of patches to jQuery in preparation for the 1.3 beta release. They are:

  • A patch to the .domManip method to use DocumentFragments, resulting in manipulation code (append, prepend, etc.) that is about 15x faster.
  • Addition of a .closest(selector) method which starts with the current node and traverses the parents in the DOM tree to match the selector (think "first self or ancestor"):
    closest: function( selector ) {
              return this.map(function() {
                  var cur = this;
                  while ( cur && cur.ownerDocument ) {
                       if ( jQuery(cur).is(selector) )
                          return cur;
                       cur = cur.parentNode;
                  }
               });
    }
  • A patch to the seminal DOM ready() method that backs off attempting to detect the loading of stylesheets (apparently not possible according to Resig) to normal "document ready" functionality.
  • Addition of multiple-namespace support for events.
  • A new internal property that keeps track of the selector chain (mainly for use by plug-in authors).

The new jQuery 1.3 will also feature the Sizzle JavaScript CSS selector engine as well as revamped implementations of all the selector-based methods.

You can read all about the new patches in Resig's original post here.

Update: the new Sizzle engine has been added to the 1.3 trunk.

Tapestry 5 Released

Tagged:  

The 5.0.18 version of Apache Tapestry has been christened as the first release of Tapestry 5. The release is the capstone of long effort to re-write the web application framework from scratch, removing a lot of the complexity of previous releases toward a more POJO and annotations-driven approach (and making it non-backward compatible with version 4, a sore point for some current Tapestry users).

For those who don't know, Tapestry is a component-based web application framework (one of the original) for Java similar to JSF or Wicket.

New features:

  • POJO component classes: no interfaces or base classes required
  • Minimalized configuration via annotations and naming conventions
  • Live class reloading (think JavaRebel)
  • Its own dependency injection framework (Tapestry IoC)
  • Built-in AJAX support via Prototype/Scriptaculous
  • Tapestry template pages are now valid XHTML (with a custom namespace for Tapestry), making them easier to work with, especially when round-tripping between designers and programmers (an approach similar to Wicket's)
  • Automatic REST-style URLs
  • Automatic client-side form input validation
  • Built-in components such as BeanEditForm, BeanDisplay, and Grid
  • Really nice exception handling

You can download the release here, or (for Maven-style dependency management junkies like myself) reference the dependency: org.apache.tapestry:tapestry-core:5.0.18.

Google Chrome Out of Beta

Tagged:  

Google Chrome has just turned the big 1.0, as the browser has met Google's requirements for stability and performance.

Changes from the Beta

A short list of improvements includes:

Of course, the Chrome team isn't done yet. Future enhancements to the browser include form autofill, RSS support, and extensions.

You can download Chrome here.

Firefox 3.1 Beta 2 Available

Tagged:  

The Mozilla team announced on Monday the availability of Firefox 3.1 Beta 2. New and notable:

  • A new Private Browsing mode (a la Google Chrome)
  • Increased language support (54, count 'em).
  • TraceMonkey, the incredibly fast new JavaScript engine, is now enabled by default.
  • Support for web worker threads.
  • Improvements to the Gecko layout engine, including speculative parsing for fast content rendering.
  • Support for <audio> and <video> from HTML 5.
  • Support for the W3C Geolocation API.
  • Numerous other improvement, including JavaScript query selectors, additional CSS 2.1 and 3 properties, SVG transforms, and offline applications.

All in all, Firefox 3.1 is shaping up to be another big home run for Mozilla. You can download the beta here.

Eclipse Plug-In for JavaFX

Tagged:  

Sun has released an early version of an Eclipse plug-in for JavaFX. It's still a bit buggy, but it's an opportunity for developers to kick the tires. The functionality is roughly equivalent to that of the Netbeans plugin.

Instructions on how to use the plug-in are here. You should use the download page here, though, to get the actual plug-in itself.

Ext GWT 1.2 Released

Ext GWT, a library for integrating Ext JS with Google Web Toolkit, has released version 1.2. New features include Drag and Drop (with support for Grids, Trees, and Lists), Form Data Binding, and File Upload.

It can be downloaded here.

Syndicate content