For information on DavisSoft visit our web presence at DavisSoft

JQuery Parsed Ajax Errors

December 15, 2011 Leave a comment

A very cool code fragment I ran into while looking for something else — funny how that happens.

jQuery Deferreds and the jQuery Promise Method

JQXHR AND THE PROMISE INTERFACE

  1. $.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
  2.   if ( options.parseError ) {
  3.     jqXHR.pipe( null, function( jqXHR, statusText, errorMsg ) {
  4.         var parsed = $.parseJSON( jqXHR.responseText );
  5.         return $.Deferred().rejectWith( this, [ jqXHR, statusText, parsed ] );
  6.     }).promise( jqXHR );
  7.     jqXHR.success = jqXHR.done;
  8.     jqXHR.error = jqXHR.fail;
  9.   }
  10. });

http://lithostech.com/2011/04/jquery-deferreds-and-the-jquery-promise-method/

Advertisements
Categories: Uncategorized

JQuery 1.7 Callbacks

October 30, 2011 Leave a comment

Callbacks

The general idea behind pub/sub (the Observer pattern) is the promotion of loose coupling in applications. Rather than single objects calling on the methods of other objects, an object instead subscribes to a specific task or activity of another object and is notified when it occurs.

http://dailyjs.com/2011/10/25/jquery-roundup/

Categories: Uncategorized

ParseResponse({“title” : “Get Your JSON Response Anywhere”})

October 7, 2011 Leave a comment

From Programmable Web

JSONP simply wraps the response in a function call named by the developer. The P stands for “padding,” where the provider needs only pad the results with a bit more information. Supporting JSONP is a cinch.

258 JSONP APIs: Get Your JSON Response Anywhere http://bit.ly/q6Lo4x

Categories: Uncategorized

JQuery Plugin Mechanism

May 11, 2011 Leave a comment

Extending the Library

Another excellent article on extending JQuery.

The jQuery library is centered on a root object, which exposes a number of methods. After doing whatever tasks it was called to do, each method just returns the instance of its parent object. In this way, a new call to another method can be arranged on the same expression.

(function( $ ){
 $.fn.yourPluginName = function() {
 // your code here
 };
})(jQuery)

Read the rest of the article http://drdobbs.com/web-development/229403172

Categories: Code, JQuery

Elements of Design?

April 29, 2011 Leave a comment

An interesting take on what a design is, rather than how to accomplish one.

By exploring these elements individually—and by thinking about design as not just a noun (the design) but also a verb (to design)—we can approach the abstract question of “What is design?” in a productive way.

Read the full article http://www.technologyreview.com/business/37225/?a=f

Categories: Uncategorized

Using the JQuery Cache

April 23, 2011 Leave a comment

Using Client Side Storage

Session duration storage management made not a total pain in the browser.

The jQuery library offers ..  a simple but quite effective API to store data in the browser’s memory for the duration of a session.

Read more http://drdobbs.com/web-development/229402114

Categories: HTML, JQuery

Agility at the Speed of Kwality

April 5, 2011 Leave a comment

The Agile UnManefesto

Dr. Dobb article on Agile umpteen years later. The Agile process is popular but sometimes just doesn’t turn out so well.  Process in general improves the end product, thats the idea anyway.

My own feeling is that Agile tries to capture how a high quality engineer works. Unfortunately, it takes a high quality engineer. Agile really depends on a great team leader and a good team to be successful, more so than other processes.

From the article, link below.

First, let’s jump to what most people will perceive to be the end results. As a group, we agreed on the following four belief statements:

  1. Demand technical excellence
  2. Promote individual change and lead organizational change
  3. Organize knowledge and improve education
  4. Maximize value creation across the entire process

Let’s dive down into what these belief statements imply. The first statement, demand technical excellence, is a reflection both of the general values of the working group and also our frustration with what we’re seeing in practice — or more accurately, not seeing in practice.

Read more here http://drdobbs.com/architecture-and-design/229301128

Agile development explained

Categories: Agile, Methodologies