cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Parashuram N <panar...@microsoft.com>
Subject RE: [DISCUSS] Update to starter template
Date Tue, 16 Feb 2016 19:07:43 GMT
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 <panarasi@microsoft.com>
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 <panarasi@microsoft.com>
> 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" <csantana23@gmail.com> 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=https%3a%2f%2fdev
> > el 
> > oper.mozilla.org%2fen-US%2fdocs%2fWeb%2fEvents%2foffline&data=01%7c0
> > 1%
> > 7cpanarasi%40microsoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72f9
> > 88 
> > bf86f141af91ab2d7cd011db47%7c1&sdata=8%2b4NzK8zAB%2ffqryeM%2fN9XYnmu
> > lm
> > bzlAeIogT9H1b4ic%3d
> > >[2]:
> > https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fdev
> > el
> > oper.mozilla.org%2fen-US%2fdocs%2fWeb%2fEvents%2fonline&data=01%7c01
> > %7 
> > cpanarasi%40microsoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72f98
> > 8b 
> > f86f141af91ab2d7cd011db47%7c1&sdata=VLBX15Tz2VxbDC1JuS0H3qm1KGuRv7Cd
> > IA
> > XaRnZbqR4%3d
> > >
> > >
> > >On Mon, Feb 15, 2016 at 12:36 PM Parashuram N 
> > ><panarasi@microsoft.com>
> > >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 “offline” and “online” alongside the “deviceready”
> > >> event. As I understand, the “offline” and “online” 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 “deviceready” first, and 
> > >> then recommend binding all events when the handler for 
> > >> “deviceready” 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=https%3a%2f%2fiss
> > ue 
> > s.apache.org%2fjira%2fbrowse%2fCB-10522&data=01%7c01%7cpanarasi%40mi
> > cr
> > osoft.com%7c54f8ca7873ae4337a50608d33680f157%7c72f988bf86f141af91ab2
> > d7 
> > cd011db47%7c1&sdata=66cC5xZm3Rh6xzxjqV48u%2bdrZSJZba1g%2f%2beFnwL7aG
> > 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
Mime
View raw message