[Seaside-dev] slime rule to detect ajax requests that combine multiple primary callbacks

Johan Brichau johan at inceptive.be
Sat Sep 1 14:42:31 UTC 2012


Hi,

I just committed a new Slime rule to find methods that combine multiple primary callbacks on a jQuery ajax object: WADoNotCombineMultiplePrimaryAjaxCallbacks
When I was optimizing all my ajax requests to combine as much secondary callbacks as possible (as opposed to using onComplete:), I made some mistakes and decided a Slime rule would really help detect those mistakes.

Unfortunately, I'm not a hero on the AST pattern spec and it seems a lot of work to complete the rule's detection patterns with all possible combinations of messages (in a cascade) to the JQAjax object. Therefore I thought I would ask some feedback on how to best do that.

The problem is thus that you just want to find out if any message that implements a primary callback is sent more than once in a cascade. Maybe the patterns are not good for that and I should just use some metaprogram? 

Any ideas are welcome.

cheers
Johan


More information about the seaside-dev mailing list