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 877C117CF3 for ; Tue, 24 Mar 2015 19:56:13 +0000 (UTC) Received: (qmail 57187 invoked by uid 500); 24 Mar 2015 19:56:10 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 57152 invoked by uid 500); 24 Mar 2015 19:56:10 -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 57136 invoked by uid 99); 24 Mar 2015 19:56:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 19:56:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of purplecabbage@gmail.com designates 209.85.214.174 as permitted sender) Received: from [209.85.214.174] (HELO mail-ob0-f174.google.com) (209.85.214.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 19:56:05 +0000 Received: by obdfc2 with SMTP id fc2so2894763obd.3 for ; Tue, 24 Mar 2015 12:55:45 -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=aRqzdqW292l291lFcP2KjThr7XOQK38uXY/WNpeP2nA=; b=zSwWUuJN3ExkGqBJwbQEQwk/hd6a5en07ypxRzBjrkgFa597VRILX4Dd6Bq0eMrSjw rh9ZU+Kj2UB/qLET4yiKML4Uo1MXOKg3AQQX8aKFEBBVqByDXuE4LS4wKxmYf33pqTmz Mvo12aX3w2GCrFrqaCyQfB2RGpxbvV2OiiAz1MqE0xmB85fyudQJUcnEGvDBQVhE2ucE iwNZrdpUAhdsVmi9cTmbyoX3yMgM1S3uV/6260hj+lRi0+hI4pnYtFK/SgC+URmi+L1G cuWice3lTxE8//2Lho/z0yRo9jlbkq/jmFixiPmzWGY9aFTgwQk8BO/k5MX9U4LOu7YL yJEg== MIME-Version: 1.0 X-Received: by 10.202.228.201 with SMTP id b192mr4452625oih.40.1427226945234; Tue, 24 Mar 2015 12:55:45 -0700 (PDT) Received: by 10.76.13.102 with HTTP; Tue, 24 Mar 2015 12:55:45 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Mar 2015 12:55:45 -0700 Message-ID: Subject: Re: Simulating Cordova plugins and device capabilities From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a1141c71615acc805120e2b04 X-Virus-Checked: Checked by ClamAV on apache.org --001a1141c71615acc805120e2b04 Content-Type: text/plain; charset=UTF-8 Thank you Tim for the brief explanation! ;) I agree with all your summary points. Some more questions: What value does Ripple if the basic functionality becomes part of a generic simulation interface? Ripple currently will simulate screen sizes based on device choice. Chrome dev tools support picking different device viewports also. Where should something like this live? Is this feature valuable enough to warrant this lengthy discussion? I have no idea how useful this will actually be. As someone who has released apps for most of our supported platforms I have never needed ripple of any other simulation, short of stubbing cordova-exec and working out all my UI/UX in a browser. Is there some way we can measure the need? Given that this does not appear to impact cordova, just supplement it, you should probably just go for it. Fixing cordova-serve and getting cordova-browser to use it are already in discussions, so moving forward with another module 'cordova-platform-sim'? sounds good to me. Cheers, Jesse @purplecabbage risingj.com On Mon, Mar 23, 2015 at 7:08 AM, Tim Barham wrote: > Hey Jesse - thanks for the feedback! > > First I'd like to address why we think this belongs in Cordova rather than > Ripple: > > *. The functionality described is closely tied to how Cordova works, and > we feel is a capability that should be built into Cordova - specifically, > that Cordova provide the hooks necessary for any arbitrary "simulation > host" to connect to. > *. We don't see this as being a Ripple replacement, per se. Rather, is > this model, Ripple would become one of any number of "simulation hosts" > built on top of this. > > Cordova might include a very basic "simulation host" out of the box, while > Ripple would remain a much richer, but separate, project built on top of > the same functionality. > > Why do we see the need for this when we already have Ripple? Reasons > include: > > * We want to make it easy to embed a "simulation host" in other > environments. Ripple is just one example.. Also within an IDE, or within a > browser's dev tools, or whatever. > * As mentioned below, we want to separate the simulation UI from the app > itself to simplify the debugging experience. > * We want to make it easily extensible - specifically allow plugins to > define their simulation UI and have it work in any simulation host. > > Regarding the "browser vs Ripple" thread - yeah, I remember it :). We were > following it at the time, and it definitely influenced what we are > proposing. Some points on this: > > * We don't think it should be "browser vs Ripple"... We think it should be > "Ripple on top of browser" :) ... but most importantly we don't limit this > to Ripple. May simulation hosts proliferate! > * If I recall there was also discussion about whether the browser platform > is primarily a debugging tool or a real production delivery platform. Our > firm belief is that it is both. We can easily provide the hooks (the 'app > host' and 'server' pieces) so a rich debugging environment like Ripple can > be built on top of it (and, of course, also open the door to other > simulation hosts) without taking anything away from it being a real > delivery platform. > > So, in summary, this is how I'm thinking about it: > > * The browser platform continues to be a production delivery platform. It > doesn't provide any UI for simulating plugins. Plugins should always just > do the "real thing", and never provide mock data or anything like that. > * The browser platform, when run from the Cordova CLI, is modified to > launch from a server. Something we'd want to do regardless. > * That server provides the hooks a simulation host needs to do its thing > (but, most likely, those hooks would only be available if the application > was launched in a mode to expect plugin simulation). > * The simulation host itself is completely separate from the browser > platform. Completely separate from Cordova, in fact, though personally I'd > also love to see a basic simulation host available as part of Cordova (but > in its own module). > > Tim > > ________________________________________ > From: Jesse [purplecabbage@gmail.com] > Sent: Thursday, March 19, 2015 2:44 AM > To: dev@cordova.apache.org > Subject: Re: Simulating Cordova plugins and device capabilities > > Hi Tim, > > Nice work. I was going to point you towards Ripple[1], until I saw you have > the most recent commit. Can you elaborate on why/how you feel this fits > into cordova and not into the ripple project? > > Personally, I think it is a better fit in ripple, or at the minimum, as a > separate module/repo in cordova that can function and be added > independently. > > There is a lengthy discussion on browser vs ripple here [2] > > [1] https://github.com/apache/incubator-ripple > [2] http://callback.markmail.org/thread/mxwnjp4lnz7kfzrr > > > > @purplecabbage > risingj.com > > On Wed, Mar 18, 2015 at 2:04 AM, Tim Barham > wrote: > > > Hey everyone... I would like to introduce a proposal and proof-of-concept > > prototype that we have been working on. The proposal is to provide a > > tool/feature that allows you to simulate Cordova plugins and device > > capabilities when a Cordova app is launched in your desktop browser. > > > > The goals for this proposal were: > > > > 1. Keep the simulation UI out of the app's window. > > 2. Provide an extensible model for simulating plugins and device > > capabilities. > > > > I've created some resources to introduce the proposal: > > > > * Document describing the proposal and the proof-of-concept prototype: > > http://goo.gl/XJ25vL > > * Short video demonstrating the prototype: http://goo.gl/Nf8UBp > > * Document describing how to install the prototype to try it for > yourself: > > http://goo.gl/MyiNas > > > > I'd like to emphasize that the prototype was developed purely as a > > proof-of-concept, and is not intended to suggest the final > implementation. > > > > We'd greatly appreciate it if members of the Cordova community could take > > a look and provide feedback - any and all feedback is welcome! But as a > > starting point: > > > > * What do you think of the idea in general? > > * Where should it live? In cordova-browser (like the prototype)? A > > separate Cordova module? Entirely external to Cordova? > > * What are the must-have features for an initial release? How would we > > like to see it evolve in the future? > > * Any thoughts on implementation details? > > > > Thanks, and looking forward to your input! > > > > Tim > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > For additional commands, e-mail: dev-help@cordova.apache.org > > --001a1141c71615acc805120e2b04--