Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F3919B09 for ; Sat, 28 Jul 2012 01:11:52 +0000 (UTC) Received: (qmail 455 invoked by uid 500); 28 Jul 2012 01:11:51 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 433 invoked by uid 500); 28 Jul 2012 01:11:51 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 425 invoked by uid 99); 28 Jul 2012 01:11:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 01:11:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of purplecabbage@gmail.com designates 209.85.212.171 as permitted sender) Received: from [209.85.212.171] (HELO mail-wi0-f171.google.com) (209.85.212.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 01:11:46 +0000 Received: by wibhq4 with SMTP id hq4so122291wib.0 for ; Fri, 27 Jul 2012 18:11:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=YxRL18hQmHO4WsQ0Tem4T07yhoIOJzQXJZ4V8X1LJuw=; b=qFW5FRnBp6nL020T1LGEfZDQM403sC/DvcTWyayKZbI3VzXprZuSetz6VmwF9lbq1x aLUuH/4eR5I6zoKG3Z4f4dYFhZIbE/JzlydxomgpnBLdlDjzmrUR2NANl0c/cVIDXswS nuGWh12cGO3trLCHUG14uhVWTobOOs+1r/77+GV46Em9+pahGN216+2EKdn5ckPwhblN r9WR/REwILj4x48FjgLXmd+ab9wdOiDE+6IGiH0kghCRkQGsnegBgYSIfJ0SHv7XGSu9 2Em6fwSPORnQWhA72ZIkl9/JIwXsmBf4CjC9VYBrwWwHP43F2PsYRzc9IHvz7I316fih C6Dw== MIME-Version: 1.0 Received: by 10.216.181.67 with SMTP id k45mr2037276wem.17.1343437885712; Fri, 27 Jul 2012 18:11:25 -0700 (PDT) Received: by 10.216.134.213 with HTTP; Fri, 27 Jul 2012 18:11:25 -0700 (PDT) In-Reply-To: <-4444435740945124446@unknownmsgid> References: <-4444435740945124446@unknownmsgid> Date: Fri, 27 Jul 2012 18:11:25 -0700 Message-ID: Subject: Re: Changing iOS's exec bridge From: Jesse To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Windows 8, WP8 at least .net only supports basic JSON serialization without the inclusion of the 300KB JSON.net lib. On Fri, Jul 27, 2012 at 6:05 PM, Shazron Abdullah wrote: > Thanks Jesse - seems like a doc issue we need to write for cross > platform plugins. Would you know if this is a concern for other > platforms as well besides WP7? > > On 2012-07-27, at 6:00 PM, Jesse wrote: > >> Okay, that all looks/sounds fine. >> However, we have to be careful not to encourage passing multiple >> objects in the array, in addition to multiple different object types. >> We should continue to strive to make sure that everything outside of >> exec is portable, so even though in iOS, exec can receive args of >> [{name:value}, {name:value}] the JS calling code will NOT be portable. >> >> I worry (just a little) we are opening a door we may have to close later. >> >> >> >> >> >> On Fri, Jul 27, 2012 at 5:37 PM, Shazron wrote: >>> These changes transfer the decision that was done in JS to the Objective-C side. >>> The arguments are passed in as-is, if an object is passed in as an >>> array element, it is converted to a NSDictionary in objective-C. So if >>> you use the new plugin signature, you can pass in as many objects as >>> you want to the plugin method, they will be in order in the arguments >>> array as NSDictionary-s. >>> >>> The "extraction" occurs when we compare the plugin method signature - >>> if its a legacy signature, we extract the first NSDictionary from the >>> arguments, like we did in JS. If its not a legacy signature, we pass >>> the arguments unchanged. >>> >>> re: https://github.com/agrieve/incubator-cordova-ios/compare/legacy_exec#L3R63 >>> >>> >>> On Fri, Jul 27, 2012 at 5:26 PM, Jesse wrote: >>>> Wait! >>>> >>>> Can we discuss the EXACT nature of the command array? >>>> I have had to work through a similar issue on WP7, it would be >>>> extremely valuable if we could agree on what the args to exec looks >>>> like. >>>> >>>> It looks like your changes are all inside and beyond exec, but I want >>>> to make sure. >>>> >>>> In the past we discussed removing the array altogether and passing >>>> named objects as args. >>>> On WP7 it is extremely difficult to interpret arrays that do not >>>> contain the same types of object. >>>> For example, if the command has args of ['what',23,{obj:literal},[1,2,3]] >>>> >>>> Do we still have a limitation of only passing 1 object literal? >>>> >>>> >>>> >>>> On Fri, Jul 27, 2012 at 5:08 PM, Andrew Grieve wrote: >>>>> Committed. >>>>> Sounds good! You update the dev guide, and I'll work to update the existing >>>>> core plugins. >>>>> >>>>> >>>>> On Fri, Jul 27, 2012 at 6:22 PM, Shazron wrote: >>>>> >>>>>> Thanks Andrew, this looks good! >>>>>> >>>>>> Once you merge it in, I'll add the doc issues, especially the Plugin >>>>>> Dev Guide, we don't want people to start using the old way. I was >>>>>> thinking, a deprecation NSLog would be great if they are using the old >>>>>> way, but that will just be too much noise at this point... >>>>>> >>>>>> On Fri, Jul 27, 2012 at 2:06 PM, Andrew Grieve >>>>>> wrote: >>>>>>> Shaz, >>>>>>> >>>>>>> I mentioned doing such a change during PGD, but was hoping you could >>>>>> give it >>>>>>> a sanity check over: >>>>>>> >>>>>>> https://issues.apache.org/jira/browse/CB-1150 >>>>>>> https://github.com/agrieve/incubator-cordova-ios/compare/legacy_exec >>>>>>> https://github.com/agrieve/incubator-cordova-js/tree/better_exec >>>>>>> >>>>>>> I ensured mobile-spec and unit tests pass, so should be good to go I >>>>>> think. >>>>>>> >>>>>>> Andrew >>>>>> >>>> >>>> >>>> >>>> -- >>>> @purplecabbage >>>> risingj.com >> >> >> >> -- >> @purplecabbage >> risingj.com -- @purplecabbage risingj.com