HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 7346 thumbnail
User 111696 avatar

By bloid
via celtickane.com
Published: Nov 21 2006 / 00:08

There are already plenty of Ajax libraries available to the public; however, many of them are quite bloated and will slow down your website's performance. I've created an Ajax library, dubbed Feather Ajax, that is designed to be light-weight, customizable, and easy to use.
  • 11
  • 0
  • 1722
  • 0

Comments

Add your comment
User 209001 avatar

deBSefyer replied ago:

1 votes Vote down Vote up Reply

quote: "There are already plenty of Ajax libraries available to the public; however, many of them are quite bloated and will slow down your website's performance. I've created an Ajax library, , that is designed to be light-weight, customizable, and easy to use"

I believe all of them (other frameworks) say exactly the same thing.

The one thing I don't like about your approach is the (forced) coupling between your client and server side code. Server side doesn't needs to know about client side html element IDs. There many ways this can (potentially) cause very nasty bugs. Plus, (some/most)times it's not only set innerHTML or set value you want to do with your AJAX response...
It's very easy to avoid, just add an extra step:

var ao = new AjaxObject101();
ao.sndReq('get','myajax.php','action=gettext', myAsyncCallback);

function myAsyncCallback(featherResponse) {
FeatherUtils.setInnerHTML('myDiv', featherResponse.getString('myElement'));
// or
FeatherUtils.setValue('myTextBox', featherResponse.getString('myElement'));
// or
FeatherUtils.populateDropDown('mySelect', featherResponse.getAsArray('myElement'));
// etc.
}

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.