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

Lukas Renggli renggli at gmail.com
Sat Sep 1 15:29:30 UTC 2012


Hi Johan,

The proposed rule seems to be very useful.

I would match all cascades with the pattern, and then in the action
block manually test if any of your selectors occurs more than once.

Cheers,
Lukas

On 1 September 2012 16:42, Johan Brichau <johan at inceptive.be> wrote:
> 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_______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside-dev mailing list