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 077A59E90 for ; Thu, 22 Mar 2012 13:49:35 +0000 (UTC) Received: (qmail 86823 invoked by uid 500); 22 Mar 2012 13:49:34 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 86800 invoked by uid 500); 22 Mar 2012 13:49:34 -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 86791 invoked by uid 99); 22 Mar 2012 13:49:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 13:49:34 +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 purdrew@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 13:49:28 +0000 Received: by bkcjg15 with SMTP id jg15so1929617bkc.6 for ; Thu, 22 Mar 2012 06:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=6iiNxe8Qceh902lItQIWdnFNRGT7mkk/IWT7Dovlb/M=; b=ZFyPgd2N+jYFUMFdbBCYRFKM8WEbBMfOLLnMhjTC/+3jnvNE3O1sObzgch1cj7boaY Zkt2p7B/j/sfWWeOfRkbkePw6fFrE3U/0rSmrjLXu4xBvARoxD5pCpGL2B1yJOvrCsV8 yp7kVEoOK4qpQ8Hjdn2y4G+FPfbxhVDs5lpGoAooTrrDHsADg2i4/fG6ws7fKvgB8pdH qRi0kvGhijk3BRzb1UupIYcKhVEGqTrhFaICIsizF1CrOpeqXSxlIUf+uVF9+NV2w+s9 dPYkN6x2X7CpyhuMbuX7v3XWlXgwP+TzUglbt1Ca7QfvAxIFAnRXaNG4g43nbhb64JTv FsrA== Received: by 10.204.136.197 with SMTP id s5mr3166337bkt.9.1332424148585; Thu, 22 Mar 2012 06:49:08 -0700 (PDT) MIME-Version: 1.0 Sender: purdrew@gmail.com Received: by 10.204.167.67 with HTTP; Thu, 22 Mar 2012 06:48:48 -0700 (PDT) In-Reply-To: References: From: Drew Walters Date: Thu, 22 Mar 2012 08:48:48 -0500 X-Google-Sender-Auth: eamzQC78MFxBQsXNRFigkGMVYQ0 Message-ID: Subject: Re: CB-280 - Improve layout of cordova-js scripts To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Looking at the '2nd try at file refactoring'. I like this structure much better then the first try. Regarding the following comment from the commit: cp -R lib/common gen/android cp -R lib/android gen/android 'platform specific' files overwrite any 'common' files, per the order of the cp commands above. This makes sense though we need to strive for platforms not overriding 'common' files since that negates the benefit of cordova-js common API. We do however need to provide mechanisms for the following: 1. Platforms should be able to add new modules not in common. Your refactor makes this easy. 2. Platforms need to be able to 'enhance' a common module API. In the short term this is currently accomplished through a platforms "merges" object. Long term we likely need to rethink this. 3. Platforms need to be able to proxy exec to a javascript implementation as opposed to native. This feature does not yet exist, so platforms are using the "merges" object which overrides existing API definition. The reason I am mentioning the above is that if we refactored the code as shown in your commit, then we need to rename files currently using the "merges" approach as they would override common when they are intended to augment common. On Wed, Mar 21, 2012 at 5:26 PM, Patrick Mueller wrote: > On Wed, Mar 21, 2012 at 17:42, Patrick Mueller wrote: > >> 2) additional flattening of removing 'platform' >> >> lib/common >> lib/android >> lib/... >> lib/scripts >> > > I like this. =A0You can try it yourself by running this script in the cor= rect > directory: > > =A0 =A0https://gist.github.com/2153576 > > It's non-destructive - it will add a 'lib2' directory to > incubator-common-js, with the new split. > > It removes the 'cordova noise', and all the files in common and the > platforms are at the same 'level'. > > -- > Patrick Mueller > http://muellerware.org