jQuery: The Write Less, Do More JavaScript Library

Ticket #217 (closed 1: invalid)

Opened 2 years ago

Last modified 1 year ago

Sabrina

Reported by: joern Assigned to: joern
Type: 1 Priority: 1
Milestone: 1 Component: 1
Version: 1 Keywords: Sabrina
Cc: Sabrina Needs:

Description

This is a summary for all things related to the work on the ajax module. There is quite a lot to do...

Related reports:

http://jquery.com/dev/bugs/bug/196/ - Is this really a problem jQuery needs to care about? Klaus: "In my opinion, jQuery shouldn't be responsible for others bad code."

http://jquery.com/dev/bugs/bug/210/ - Should be handled by merging the form plugin

http://jquery.com/dev/bugs/bug/159/ - Should be applied before merging form plugin, after adding all necessary tests

http://jquery.com/dev/bugs/bug/216/ - much later

http://jquery.com/dev/bugs/bug/195/ - allow local timeout, see handlers below

http://jquery.com/dev/bugs/bug/165/ - catch lastModified exception: start testing logging statements here!

Global and local handlers: Add a global global flag, defaults to true: This will, by default, call all global ajax handlers; Can be changed global (eg. $.ajaxGlobal = false) or per request, eg. $.ajax({..., global: false, ...});

Attaching global handlers to DOM elements doesn't make much sense in most cases, but it is nice to be able to chain them. Check if it is possible to do this:

var start = function() {...};
var stop = function() {...};
$.ajaxStart(start).ajaxStop(stop)

Maybe we should stop putting all and everything into $ namespace:

$.ajax.start(start).stop(stop);

Whatever change is made, complete the tests first and make sure that backwards compability is not broken. Maybe mark methods or functions as deprecated, but delay there "official" removal for a 2.x release. To prevent bloating the code, do this only if it is really useful.

Attachments

Change History

Changed 2 years ago by klaus.hartl@…

regarding http://jquery.com/dev/bugs/bug/196/

Maybe I was a little too harsh here. After all it may be good thing to not break others code, if at all possible. I think it shouldn't be the goal to be compatible to any library out there, especially if these libraries are doing bad regarding coding best-practices (like enhancing the objects prototype), but maybe we can have a look into the issue (low prio if you ask me).

regarding http://jquery.com/dev/bugs/bug/216/

I thought there was already the dataType "html", so with it I expected scripts to be evaluated... If not forget that!

To override the ajax handlers via a global options makes sense to me and is good solution.

The chaining would also be a good thing, as one gets used to it.

$.ajaxStart(start).ajaxStop(stop);

As for the namespace thing, I'm not sure. Could make sense, but we should be careful with changing the API too much. That can be frustrating.

Changed 2 years ago by joern

The form plugin has currently some performance issues (see http://jquery.com/discuss/2006-September/012559/ and followups). There are quite some ideas how to improve it, would be best to merge an improved version to core.

Changed 2 years ago by joern

Update on form serialize: The current implementation maintains the order of the elements, which can be important in certains cases.

One could use a "fastNoOrder: true" option in case it is not possible to maintain order whith better performance.

Changed 2 years ago by joern

Tests are ready and running, still lots of work

Changed 2 years ago by joern

  • status changed from new to closed
  • resolution set to fixed

All important points have been solved.

Changed 2 years ago by joern

  • priority set to blocker
  • status changed from reopened to closed
  • component set to ajax
  • resolution set to invalid
  • type set to bug

SPAMPOLICE

Changed 2 years ago by Sabrina

  • cc changed from "" to Sabrina
  • component changed from ajax to 1
  • summary changed from ajax summary / todo list to Sabrina
  • priority changed from blocker to 1
  • version set to 1
  • milestone set to 1
  • keywords changed from "" to Sabrina
  • type changed from bug to 1
Note: See TracTickets for help on using tickets.