Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFA6CE14C for ; Fri, 23 Nov 2012 20:02:26 +0000 (UTC) Received: (qmail 2807 invoked by uid 500); 23 Nov 2012 20:02:26 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 2773 invoked by uid 500); 23 Nov 2012 20:02:26 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 2765 invoked by uid 99); 23 Nov 2012 20:02:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 20:02:26 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anis.kadri@gmail.com designates 209.85.161.175 as permitted sender) Received: from [209.85.161.175] (HELO mail-gg0-f175.google.com) (209.85.161.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 20:02:20 +0000 Received: by mail-gg0-f175.google.com with SMTP id y1so718624ggc.6 for ; Fri, 23 Nov 2012 12:01:59 -0800 (PST) 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=8H/BT895IwCNMy9bRxlZUuTLd+FKmBCQ5G9wFXR0cwI=; b=kssjyFz0IAwN68h7zJej3dnfSiKrhmrRHeO+rRP5j/MINJlOEdIf9DVn5vmwbh6jlx f8fOETsvG/54os02z1Fb9/uRqo2OfhjYOGcFUp7kYvNsztUdLOdBLqq5E96/0GW5NiC9 LgrLakm9B+T+qZhEzIxOE0p2LrClPHg05dhwen7RQ6jhxFtQGXw0UWA5FHNjPnyMwJXd wrKsNLUaYXG9/dfsoBSPERsuOEd5TSF/gG6wYE7OP8qusfJGpNJGBXMvVvChs49nPDM8 j++KNzdodj6hD1gukUPRg68B4W8/zjTbA5HfsnAleziem6A2iigGpUFzGYW8Sr1xJ6v2 5Xfw== MIME-Version: 1.0 Received: by 10.236.144.165 with SMTP id n25mr5133263yhj.61.1353700919017; Fri, 23 Nov 2012 12:01:59 -0800 (PST) Received: by 10.236.148.41 with HTTP; Fri, 23 Nov 2012 12:01:58 -0800 (PST) In-Reply-To: References: <920580B5-9CC4-4155-9259-CB43F0929EF1@gmail.com> Date: Fri, 23 Nov 2012 12:01:58 -0800 Message-ID: Subject: Re: Fast edit-refresh cycles From: Anis KADRI To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=20cf303ea44069017e04cf2f0e99 X-Virus-Checked: Checked by ClamAV on apache.org --20cf303ea44069017e04cf2f0e99 Content-Type: text/plain; charset=ISO-8859-1 I don't see what the problem is with having all plugins concatenated in one file. I'd even go further and say that we should just concatenate all of it in cordova.js (that is what is happening right now with core plugins). We would not be disallowing people from having multiple script tags if they wanted to. We would just be using one approach to solve the automatic installation of plugins and I believe that re-generating a javascript file is certainly easier and faster than editing script tags in html files. People would still be able to manually install plugins, add script tags for them....etc ITIZDAWEB. On Fri, Nov 23, 2012 at 10:07 AM, Andrew Grieve wrote: > Something else along these lines we should consider - is providing a > grunt.js file in the default template when you run cordova create. It could > have a watch task that copies files from the root www/ into platform www/ > directories whenever a file changes. > > > On Fri, Nov 23, 2012 at 10:29 AM, Gord Tanner wrote: > > > I have always had a vision that the build step for cordova.js would make > it > > into the app build step. > > > > Currently the packager has most of the functionality to bundle in > plugins / > > platform specific code / core modules. > > > > With a little bit of work it could be made to be driven off of the > plugin's > > folder for 3rd party code and the manifest for core modules. > > > > > > > > > > On Fri, Nov 23, 2012 at 10:20 AM, Brian LeRoux wrote: > > > > > just considering this, I suppose we could say that cordova.js is a > build > > > artifact, and the manifest is the 'truth' of the install (from the > issue > > > tracking perspective) > > > > > > > > > On Fri, Nov 23, 2012 at 3:09 PM, Braden Shepherdson < > braden@chromium.org > > > >wrote: > > > > > > > I'm happy adding multiple script tags. We could require plugins to be > > > > wrapped up for AMD, instead, and just include them in the index page. > > > > > > > > I don't think a single file makes the reproducibility any worse: you > > > still > > > > need to have the exact set and versions of plugins that anyone else > > has. > > > > > > > > And it's not strictly a build step, that's being deliberately > avoided. > > > It's > > > > a plugin-install-time step that comes at the end of every plugin add > or > > > rm. > > > > > > > > Braden > > > > > > > > > > > > On Fri, Nov 23, 2012 at 10:02 AM, Brian LeRoux wrote: > > > > > > > > > So, we have a build step no matter what. Currently we concat the > > whole > > > > go. > > > > > When we have the many plugins world doing a fat concat is dangerous > > > > > business for issue tracking. My cordova.js very likely won't be the > > > same > > > > as > > > > > yours. Moving this into a second file has the same problem. > > > > > > > > > > Script loaders are a touchy subject. General consensus is that > > browsers > > > > > prefer AMD but I think most folks really just chuck in a bunch of > > > script > > > > > tags. This is not ideal, but I really feel we should not be > dictating > > > how > > > > > ppl build their apps, and I do want to see a super slim cordova.js > > > > > file---and leave the inclusion of plugins as an exercise for the > > > > > developers. > > > > > > > > > > Now THAT said, we could encourage a sensible default in > > cordova-client. > > > > > > > > > > > > > > > On Thu, Nov 22, 2012 at 9:18 PM, Andrew Grieve < > agrieve@chromium.org > > > > > > > > wrote: > > > > > > > > > > > On Thu, Nov 22, 2012 at 3:36 PM, Gord Tanner > > > > wrote: > > > > > > > > > > > > > This also is feeding into some of the work we are doing with > > > ripple. > > > > > > > > > > > > > > Ripple will serve up the app and host it kind of like how we do > > > > > > > debug.phonegap.com for in browser testing. > > > > > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > > > > On 2012-11-22, at 3:15 PM, Filip Maj wrote: > > > > > > > > > > > > > > > Agree with Jesse. > > > > > > > > > > > > > > > > Automatically adding the plugin's .js to html pages inside a > > www > > > > dir > > > > > > can > > > > > > > > be done by the cordova-client tool anyways. > > > > > > > > > > > > > > > > Agree this should go to vote before we proceed. > > > > > > > > > > > > > > > > On 11/22/12 12:13 PM, "Jesse" > wrote: > > > > > > > > > > > > > > > >> I think all the refresh stuff is super cool, I will share > how > > I > > > > > work, > > > > > > > >> so you can get another perspective. > > > > > > > >> 90% of my code is written on localhost, either running > > directly > > > > in a > > > > > > > >> browser to work out UI stuff. > > > > > > > >> When I need access to actual device APIs, I simply put a > > > redirect > > > > in > > > > > > > >> my index.html. > > > > > > > >> This gets me through 99% of my work, after which I can fine > > tune > > > > an > > > > > > > >> individual device or functional piece in XCode, Eclipse, > > Visual > > > > > > > >> Studio, et al > > > > > > > > > > > > > Awesome! This is the workflow we want to encourage via "cordova > > > serve". > > > > > > > > > > > > > > > > > > > >> > > > > > > > >> When it comes to inclusion of multiple script tags, I do not > > see > > > > > this > > > > > > > >> as a barrier at all. This is the way the internet has > always > > > > > worked, > > > > > > > >> and it ain't broke. > > > > > > > >> I like the explicit declaration of having a script tag, plus > > you > > > > can > > > > > > > >> have multiple pages, with different plugin requirements. > > Adding > > > > an > > > > > > > >> extra build step, + reinventing the internet inside our > > > framework > > > > is > > > > > > > >> madness in my opinion. > > > > > > > > > > > > > madness is maybe a bit of an exaggeration :) > > > > > > > > > > > > Our "cordova plugin add" tool already adds the necessary plugin > > line > > > to > > > > > > your config.xml / cordova.plist *and* edits your xcode project > file > > > to > > > > > add > > > > > > the native files. Why have the tool take care of these manual > steps > > > on > > > > > the > > > > > > native side, but not the HTML side? It's a pain to have to make > > > manual > > > > > > edits to your .html file every time you add or remove a plugin. > > > > > > > > > > > > I see this more as removing a step rather than adding a step. I'm > > not > > > > set > > > > > > on having a single plugins-concat.js file, but it *is* what we > > > already > > > > do > > > > > > for our cordova.js file (we don't list each source file > separately > > in > > > > > this > > > > > > case). > > > > > > > > > > > > From your response, it's not clear to me if you disagree with the > > > > desire > > > > > to > > > > > > remove this manual step in the plugin install/uninstall process, > or > > > if > > > > > you > > > > > > just disagree with the proposed approach of achieving this > through > > > > > > concatenating plugin JS into a single file. > > > > > > > > > > > > You can't have different web-pages with different plugins enabled > > on > > > > the > > > > > > native side, I don't think there would be much benefit to enable > > this > > > > > > use-case for just the HTML side. Do you have any example of when > > > you'd > > > > > want > > > > > > this? > > > > > > > > > > > > Votes are fine, but consensus is much better. I don't want to > move > > > > > forward > > > > > > with this until everyone is on board. > > > > > > > > > > > > > > > > > > > >> > > > > > > > >> This of course does not preclude use of this technique, > > > however, I > > > > > > > >> feel very strongly that we should NOT be building this into > > our > > > > > > > >> framework, and forcing developers to use this approach. I > > think > > > > > this > > > > > > > >> is definitely something that we should vote on before > > developing > > > > > > > >> further if the goal is inclusion in cordova. > > > > > > > >> > > > > > > > >> Cheers, > > > > > > > >> Jesse > > > > > > > >> > > > > > > > >> > > > > > > > >> On Thu, Nov 22, 2012 at 2:34 AM, Brian LeRoux > > > wrote: > > > > > > > >>> super interesting. I like where this is going. > > > > > > > >>> > > > > > > > >>> > > > > > > > >>> On Thu, Nov 22, 2012 at 3:42 AM, Andrew Grieve < > > > > > agrieve@chromium.org > > > > > > > > > > > > > > >>> wrote: > > > > > > > >>> > > > > > > > >>>> On Wed, Nov 21, 2012 at 6:37 PM, Filip Maj > > > > > wrote: > > > > > > > >>>> > > > > > > > >>>>> Dude: awesome! > > > > > > > >>>>> > > > > > > > >>>>> My answers in-line: > > > > > > > >>>>> > > > > > > > >>>>>> 2. Manually adding the