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 71611186BF for ; Thu, 18 Feb 2016 16:47:14 +0000 (UTC) Received: (qmail 23173 invoked by uid 500); 18 Feb 2016 16:46:58 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 23131 invoked by uid 500); 18 Feb 2016 16:46:58 -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 22651 invoked by uid 99); 18 Feb 2016 16:46:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2016 16:46:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BFA1C1805D4 for ; Thu, 18 Feb 2016 16:46:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.021 X-Spam-Level: X-Spam-Status: No, score=-0.021 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id a5-cP2H9AhDT for ; Thu, 18 Feb 2016 16:46:55 +0000 (UTC) Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id E5BAA5FB94 for ; Thu, 18 Feb 2016 16:46:54 +0000 (UTC) Received: by mail-vk0-f41.google.com with SMTP id e6so49740052vkh.2 for ; Thu, 18 Feb 2016 08:46:54 -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:content-transfer-encoding; bh=v3MAHfyOjkZyWIEdwjk7SvfHYF6NeWQ1mpQs5FjlFJI=; b=aS3HrkpU9A3biZg9XB66P2fy3+Zg+5jDkhuNpl+jLTVYKPT5efJjvjgOqHTXh5e43t zNSQhZ7E1svHx1ufzktnOga04mch4GJQM4vKN3mrGd/6ot+s3UdXwCcvvAe3V4ZTljBS n7uEtn2ml6ovAQkzyJJv6L71y4dHc1Fs+YCMEEfXjkN2NfE+pMRv+JN0FDovQEfPI1VJ PvItK9lhKJ5bxcrtmcNKVwBO3jNQ+v029Jukj4XdG7Vg6owcBVE5BN7oZnikZNgAae+Q Lsb/RAlGYtZRZ1Jptk94S4NN5lu7nh/1ceIT6mm1RiwCQliyAYKp+l7X2LZbIM42qQOA bTpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=v3MAHfyOjkZyWIEdwjk7SvfHYF6NeWQ1mpQs5FjlFJI=; b=hNO32JFWz41V/zQB0QrspG3SKfU/5CaKH1HZ6TouT08ft4EyBTZ1FYaJBwX91pK2GT mKKnpQHqmYYv7qazQr4TC+F0bAK7he019eAOD/vckTZ/5tHGtyMt/43238B9O1EUabHE ShK6bVY4RVIWzE09IbzwtIEOEpHpVKZUlpphgX3D9s+fvCq7Oa1t9wK5Bu4AMFoxLI8s lyZ6FE2mexMwuroMBzHEvH9im61j7xdh/Eyj0v5EkvkJdwFVF20WwIuSU4u9uQ4F/gwz /Oi0/Gox4oikIStepujwRPatcvH9AIEmQbDun3/FEU2vR0FOY/ckMOjUtZQe7Kqre/9l Vt6g== X-Gm-Message-State: AG10YOQuyvucnGON8t9ZSzRQ2Y46xwhZ+XIFya4zC3hUrrve/Vc3y3SifbWB6iab0zfJtD0gg+SYxO8caT0/NQ== MIME-Version: 1.0 X-Received: by 10.31.8.83 with SMTP id 80mr6975258vki.105.1455814013833; Thu, 18 Feb 2016 08:46:53 -0800 (PST) Received: by 10.176.3.161 with HTTP; Thu, 18 Feb 2016 08:46:53 -0800 (PST) In-Reply-To: References: <92D789D9-B047-47EA-9856-330F63EC7AD2@microsoft.com> Date: Thu, 18 Feb 2016 10:46:53 -0600 Message-ID: Subject: Re: [DISCUSS] Update to starter template From: Raymond Camden To: dev@cordova.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Big plus one to Jesse's comment. I've felt like the template is too over complex for quite some time. On Tue, Feb 16, 2016 at 3:21 PM, Ryan J. Salva wrote= : > Check out the default template we use in TACO-CLI. > > Index.js is a lot simpler and we adopted the new Cordova typeface. If fol= ks like this template, we could issue a PR for it. > > rjs > > > Ryan J. Salva | Principal PM Manager > Visual Studio Tools for Apache Cordova > rsalva@microsoft.com > 425 706 5270 office > 206 612 5079 mobile > > -----Original Message----- > From: Parashuram N [mailto:panarasi@microsoft.com] > Sent: Tuesday, February 16, 2016 12:46 PM > To: dev@cordova.apache.org > Subject: RE: [DISCUSS] Update to starter template > > I do agree that our starter app needs to change. However, we encountered = this when we were looking at documenting, and our object of concern was the= way events are bound. My suggestion would be to simply fix the event bindi= ng so that the docs are less confusing. > > We could then look at re-writing the starter-app itself. > > -----Original Message----- > From: Jesse [mailto:purplecabbage@gmail.com] > Sent: Tuesday, February 16, 2016 12:28 PM > To: dev@cordova.apache.org > Subject: Re: [DISCUSS] Update to starter template > > Personally, I think we should rewrite/simplify that template ALOT. > The app binding stuff is confusing to users, but not potentially any less= confusing with PR#15. The use of an object is the issue in my mind. > > Also, if this is the starting point for a new developer, they will soon w= onder why everything they add to the page is UPPERCASE, part of the css, bu= t potentially confusing. > > Ultimately, I think the whole starting point is over-organized with it's = multiple folders. PR#5 is closer to the goal I think, although I would sti= ll leave js in an external file, and not directly in index.html and I would= leave quotes on html tag attributes. > > > > > > @purplecabbage > https://na01.safelinks.protection.outlook.com/?url=3Drisingj.com&data=3D0= 1%7c01%7cpanarasi%40microsoft.com%7ca55c7ca45ac24069c54708d337118610%7c72f9= 88bf86f141af91ab2d7cd011db47%7c1&sdata=3D%2bCP4GywoLaqppsEXaqZxo%2br%2baBb0= %2b%2babaAImEmW4ZMg%3d > > On Tue, Feb 16, 2016 at 11:07 AM, Parashuram N > wrote: > >> Will do. >> >> -----Original Message----- >> From: Steven Gill [mailto:stevengill97@gmail.com] >> Sent: Tuesday, February 16, 2016 10:44 AM >> To: dev@cordova.apache.org >> Subject: Re: [DISCUSS] Update to starter template >> >> LGTM >> >> Could you also add the keyword 'cordova:template' to package.json? >> >> On Tue, Feb 16, 2016 at 9:58 AM, Parashuram N >> wrote: >> >> > :) Sounds good >> > >> > Anyone else have any objections to the change ? >> > >> > -----Original Message----- >> > From: Carlos Santana [mailto:csantana23@gmail.com] >> > Sent: Monday, February 15, 2016 7:51 PM >> > To: dev@cordova.apache.org >> > Subject: Re: [DISCUSS] Update to starter template >> > >> > I'm always in favor of having simple answers and guidelines, and we >> > can take this as a good convention/practice >> > >> > "Always bind/attach after deviceready even and you will be in a >> > happy place" >> > >> > But between you and me you know that we can attach before, will >> > leave that little secret between us :-) >> > >> > >> > On Mon, Feb 15, 2016 at 10:44 PM Parashuram N >> > >> > wrote: >> > >> > > The reason to say that all events are fired after device ready is >> > > just to make it simpler. As you say, events by webviews are indeed >> > > fired before that, but I think it is safe to say that if we attach >> > > listeners after deviceready, we are guaranteed to have the plugins >> > > also initialized. This makes for a more consistent story. >> > > >> > > >> > > >> > > On 2/15/16, 7:25 PM, "Carlos Santana" wrote: >> > > >> > > >Why do you think that binding is required after "deviceready" ? >> > > > >> > > >Attaching before "deviceready" fires is still supported for >> > > >events like resume, pause, offline, online, etc.. At least that's >> > > >always being my impression for a long time >> > > > >> > > >The only thing I would think it could be a potential confusion >> > > >that would benefit to attached after "deviceready" is that if >> > > >there is an "online" or "offline" event fire by webview [1], [2] >> > > >and not plugin those handlers >> > > will >> > > >fire but will not be from the network plugin. >> > > > >> > > >One thing I like thought about the PR is making index.js less >> > > >verbose and simpler to follow +1 >> > > > >> > > >[1]: >> > > https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3a%2f%2fd >> > > ev >> > > el >> > > oper.mozilla.org%2fen-US%2fdocs%2fWeb%2fEvents%2foffline&data=3D01%7 >> > > c0 >> > > 1% >> > > 7cpanarasi%40microsoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72 >> > > f9 >> > > 88 >> > > bf86f141af91ab2d7cd011db47%7c1&sdata=3D8%2b4NzK8zAB%2ffqryeM%2fN9XYn >> > > mu >> > > lm >> > > bzlAeIogT9H1b4ic%3d >> > > >[2]: >> > > https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3a%2f%2fd >> > > ev >> > > el >> > > oper.mozilla.org%2fen-US%2fdocs%2fWeb%2fEvents%2fonline&data=3D01%7c >> > > 01 >> > > %7 >> > > cpanarasi%40microsoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72f >> > > 98 >> > > 8b >> > > f86f141af91ab2d7cd011db47%7c1&sdata=3DVLBX15Tz2VxbDC1JuS0H3qm1KGuRv7 >> > > Cd >> > > IA >> > > XaRnZbqR4%3d >> > > > >> > > > >> > > >On Mon, Feb 15, 2016 at 12:36 PM Parashuram N >> > > > >> > > >wrote: >> > > > >> > > >> While working on documentation about events for Cordova, we >> > > >> noticed that in our Cordova starter template [1] seems to >> > > >> suggest that we bind events like =E2=80=9Coffline=E2=80=9D and = =E2=80=9Conline=E2=80=9D >> > > >> alongside the >> =E2=80=9Cdeviceready=E2=80=9D >> > > >> event. As I understand, the =E2=80=9Coffline=E2=80=9D and =E2=80= =9Conline=E2=80=9D events are >> > > >> something that the NetworkInformation plugin provides, and thus >> > > >> should only be bound after cordova-js has been initialized. >> > > >> Here [2] is a change where we only bind =E2=80=9Cdeviceready=E2= =80=9D first, >> > > >> and then recommend binding all events when the handler for >> > > >> =E2=80=9Cdeviceready=E2=80=9D is >> > > called. >> > > >> Do you folks think this is a good change ? Here [3] is the JIRA >> > > >> for >> > it. >> > > >> >> > > >> >> > > >> [1] Cordova Started template - >> > > >> https://github.com/apache/cordova-app-hello-world/ >> > > >> [2] Pull request with change to starter template - >> > > >> https://github.com/apache/cordova-app-hello-world/pull/15/files >> > > >> [3] JIRA for PR with change to starter template - >> > > >> >> > > https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3a%2f%2fi >> > > ss >> > > ue >> > > s.apache.org%2fjira%2fbrowse%2fCB-10522&data=3D01%7c01%7cpanarasi%40 >> > > mi >> > > cr >> > > osoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72f988bf86f141af91a >> > > b2 >> > > d7 >> > > cd011db47%7c1&sdata=3D66cC5xZm3Rh6xzxjqV48u%2bdrZSJZba1g%2f%2beFnwL7 >> > > aG >> > > k% >> > > 3d >> > > >> >> > > >> >> > > >> >> > > >> > > ------------------------------------------------------------------ >> > > -- >> > > - 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 >> --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Raymond Camden, Developer Advocate for MobileFirst at IBM Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org