Ajax

jQuery 1.3.1 Released

jQuery 1.3.1 has been released with a number of bug fixes (23 to be exact).

50+ stunning jQuery applications

You can never get enough useful example of applications written in your favorite JavaScript library. One of my personal favorite JavaScript libraries is jQuery. Well, over at Developer Snippets they have put together a good list of 50+ jQuery applications.

Below is an excerpt from the post.

Color Picker - jQuery plugin – eyecon.ro
A simple component to select color in the same way you select color in Adobe Photoshop, features includes:
* Flat mode - as element in page
* Powerful controls for color selection
* Easy to customize the look by changing some images
* Fits into the viewport
Color Picker - jQuery plugin


Building a better web forms: Context highlighting using jQuery
– jankoatwarpspeed.com
In very complex web forms this enables users to focus only on a current action. By using attractive color schema and jQuery animations, this can be even more interesting.
 Context highlighting using jQuery

Creating accessible charts using canvas and jQuery
– filamentgroup.com
Data visualization in HTML has long been tricky to achieve. Past solutions have involved non-standard plugins, proprietary behavior, and static images. But this has changed with the recent growth in support for the new HTML Canvas element, which provides a native drawing API that can be addressed with simple JavaScript. This article is a proof of concept for visualizing HTML table data with the canvas element.
Accessible Charts

You can read the full post here.

jQuery 1.3 Released

Setting a land speed record for transition from Beta->RC->Release, the jQuery project has released version 1.3 of its popular JavaScript framework. All in all, it is a major release for the project and could have easily been dubbed "jQuery 2.0".

The important features of this release are:

  • A rewritten and very fast CSS selector engine: Sizzle. The Sizzle code base is stand-alone has been donated to the Dojo Foundation in an effort to encourage other JavaScript libraries to adopt it.
  • "Live Events" (also referred to as Event Delegation): a new API for binding events to current and future DOM elements. The live() function is used to bind an event to all matched elements, including future matched elements that are added to the DOM. The die() function removes the bound live event.
  • A rewrite of jQuery's event handling. The introduction of a jQuery.Event wrapper object brings jQuery's event model in line with W3C standards and makes events work smoothly across all browsers; the wrapper also allows arbitrary data to be associated with events. All triggered events now "bubble up" the DOM tree, but progress can be halted via a stopPropagation() function.
  • A rewrite of HTML injection (e.g., the append, prepend, before, and after methods) for much greater speed (heavy use of DOM Fragments).
  • A rewrite of the offset() method for better cross-browser compatibility as well as greater speed.
  • No more browser sniffing. As of 1.3, jQuery no longer uses any form of browser/userAgent sniffing internally. Instead, a technique called "feature detection" is used to simulate a browser feature (or bug) internally to see if it exists or behaves as expected. All of these checks are encapsulated in the jQuery.support object.

Anyone doing an upgrade to 1.3 from previous versions should note there are some backward compatibility issues which are noted here (under "Changes"). The full release notes are here.

In other news, there is a new API browser for jQuery (written by Remy Sharp), which is available online or as an AIR application. The project has also decided to join the Software Freedom Conservancy and will continue to be developed under its auspices. John Resig elaborates on the reasons for the move in his blog entry.

The new release can be downloaded from the main page.

jQuery 1.3 Reaches RC1

jQuery 1.3 has officially reached Release Candidate status. There are no release notes for this release, but for those who haven't been following the beta releases, you can read more about the changes in 1.3 here and here.

RC1 can be downloaded here.

Visual WebGui 6.2.3 SDK Released

Gizmox announces the release of version 6.2.3 of its SDK. This is a further stabilization and enhancement of the revolutionary 6.2 SDK which introduced the Visual WebGui Developer Experience with full Visual Studio integrationin, consolidate installation, incorporation of both the DHTML and the Silverlight in one package, and the ASP.NET wrapper wizard.

The new 6.2.3 SDK solves some issues that contribute to a smoother development experience. These are some of the issues solved in this version:

Issue Summary
VWG-3493 - Theme registration and selection was changed. The developer can select one theme or none. An error provider was added to indicate theme rows with errors. These rows will be saved and can be selected as the current theme.
VWG-3484 - Silverlight theme registration bug fixed.
VWG-3483 - TextBox Max length property bug fixed. Now you can edit part of the text by selecting it after it reached the max length size.
VWG-3402 - RibbonBar - DropDownBox showing a js alert popup with the menu item name fixed.
VWG-3385 - Control drag image was added to all the themes.
VWG-3383 - WGLables.GetLocalizedMonthString null value protection on CurrentUICulture added.
VWG-3389 - ASP.NET Control Wrapper menu item missing problem fixed.
VWG-3481 - DataGridViewComboBoxColumn populates items when it is data binded problem fix.
VWG-3464 - Accessing the scalable service was separated to a different method.
VWG-3359 - DataGridView population problem on form load fixed.
VWG-3460 - DataGridView vertical scrollbar where shown even if not required.
VWG-3463 - Web_OnClick.objSource was not cleaned after click is being raised.
VWG-3378 - Form Box result was null even when value added.
VWG-3367 - FormBox Form property was not saved in Viewstate.
VWG-3348 - SearchTextBox Text property was not shown when set by code.
VWG-3366 - FormBox Form property can now handel string.empty.
VWG-3327 - Crystal report after wrapping had no properties in design time.
VWG-3466 - Double click and click events on datagridview fixed.

The new SDK is available for Download.

Visual WebGui RAD AJAX Framework

Migration of desktop applications to the web using Visual WebGui

The following is the first part of a 3 parts series of articles ppublished on VisualWebGui website describing the various available migration options of desktop/smart client applications to the web using Visual WebGui migration tool.

In order to discuss the migration process of legacy desktop applications to the web, we should first agree on 3 different types of desktop applications:

  1. WinForms based desktop application (C#/VB.NET). The UI layer is coded using .NET languages – the business can be .NET, COM+ or any other interop.
  2. VB 6.0 based applications. The UI layer is coded with VB 6.0.
  3. Other desktop or smart client technologies (C++ MFC/ATL, Delphi, Java etc). Any other smart client technology based applications.

WinForms based desktop applications to Web
Background
Normally, without Visual WebGui the migration process of a WinForms desktop application to the web will require a full re-engineering of the UI layer to fit the web architecture and capabilities.

If we take WinForms migration to ASP.NET for example using any AJAX 3rd party controls in order to provide a rich UI experience, we will have to consider:

  • Entirely new API.
  • Entirely new update approach.
  • Entirely new look & feel – or work hard to customize the UI to look the same.
  • Lighten the amount of data transferred to the client and presented at any given time to avoid severe latency.
  • Compromise on features list due to the web limitations.
  • Handling security holes created as a result of opening services consumed by client side AJAX and transferring business logics to the client.

Visual WebGui SDK is fully integrated with Visual Studio and provides the exact same API and set of tools/capabilities which are provided out-of-the-box with WinForms 1.0 and 2.0. This fact enables the native capability of simply copying any existing WinForms source code to a VWG project and providing a fully functional equivalent web application.

The Process
The basic 3 steps of migration (view a walkthrough tutorial):

  1. Open a new Visual WebGui application.
  2. Copy the code from your WinForms project into this new web application.
  3. Replace any reference to WinForms API namespace (“System.Windows.Forms”) within the code to Visual WebGui API reference (“Gizmox.WebGUI.Forms”).

Any standard WinForms application which is using the 58 WinForms out-of-the-box controls will then compile and execute as a plain web application.

The outcome of this short process is an ASP.NET based solution in terms of deployment and runtime and has the following properties:

  • Deployment is copy & paste equivalent to an ASP.NET web site.
  • Server infrastructure requires an IIS and .NET CLR only.
  • The application can be consumed from any plain browser - no installation is made on the client.
  • Minor static and cached footprint on the client ~200kb of plain JS and HTML code due to the Empty Client concept.
  • Support for multiple presentation layers with the same code base (DHTML/Silverlight or Smart Client).
  • Maintain a single layer of code – no need to write or maintain JavaScript, HTML and services.
  • Highly secured due to the Empty Client concept.

Considerations & Exceptions
There are 3 major setbacks you might have on the process which you can quantify in advance and estimate the amount of work that has to be done in order to migrate your application:

  1. Minor differences between the VWG API and WinForms which are mainly caused by architecture differences.
  2. The amount of 3rd party controls that are used in your application. This section describes a situation of using some non-WinForms out-of-the-box controls (for example Infragistics or DevExpress controls etc). In those cases you can select the most suitable solution from the following 3 options:
    • Choose a similar control from the WinForms out-of-the-box, adjust your code to use it and then perform the migration process.
    • Select an equivalent 3rd party ASP.NET control (Infragistics, Telerik, DevExpress etc.) which provides the same functionality, wrap it by a click of a button in VWG and adjust your code to use it.
    • Write your own VWG custom control which will perfectly suit your needs and then adjust your code after the migration process to use this control.
  3. Adjustments of a single user desktop application to a multiuser web environment. This section summarizes some of the major issues of transforming a single user application to a multiuser application sharing the same CPU, Memory space and other resources.
    • Thread safety – since a WinForms application can contain static members which are accessible to a single user, you should now consider one of the following:
      • Replacing those static members to a synchronized multi-thread safe data structures.
      • Lock critical read/write sections to protect concurrent multi user access.
      • Remove the statics and find instance or DB based solutions.
    • Memory load – in a desktop application, there might be places when the original consideration of the amount of memory in use was based on the assumption that the executing machine is local. therefore, many items are loaded to memory simultaneously without limitation.

Now, on a shared memory environment, when the server does the heavy lifting, the amount of memory consumed by each user will set the number of concurrent users that can be served by each server.

The following steps are recommended:

  • Consider loading items to memory on demand (keep only the headers and the identifiers in memory).
  • Remove any large objects read to memory – for example, don’t save binary objects to memory, instead write the binary to the response stream directly to the client.
  • Prefer DB based paging on entire prefaces and memory based paging. Visual WebGui provides mechanisms to enable it easily.

Summery
Migration of any WinForms application to the web using Visual WebGui has the following advantages:

  1. In 3 simple steps you will be able to get very close to a working web application.
  2. The effort you have to make in order to accomplish a fully functional web application is measurable.
  3. The application can keep using the existing BL and DL layers, and only the UI is either migrated automatically or adjusted.

Click to read the remaining articles:
VB 6.0 to Web
Smart Client and other Technologies to Web

or to view the tutorial:
How to Migrate WinForms to the Web

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.

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.

Syndicate content