cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julio cesar sanchez <jcesarmob...@gmail.com>
Subject Re: Introduction for Julian Horn
Date Mon, 16 Mar 2015 17:19:05 GMT
And what about detecting if the user didn't include any cordova tag?

I usually see questions on stackoverflow asking, "X feature of cordova
isn't working". And the accepted answer is "include the cordova.js script
tag in you index.html"

2015-03-16 14:37 GMT+01:00 Horn, Julian C <julian.c.horn@intel.com>:

> Hi Jesse,
>
> While it's certainly true that it's impossible to bullet-proof Cordova,
> protection against multiple inclusion is pretty basic.  All the C system
> include files protect against multiple inclusion.  JavaScript objects like
> jQuery include code to tolerate multiple inclusion.  We should too.
>
> The fix certainly does not require a large chunk of time!  Here's the
> entire fix; you put this up near the top of cordova.js, inside the
> outermost function invocation:
>
> if (window.cordova) {
>     return;
> }
>
> To appreciate why this matters, I think you have to cultivate a product
> viewpoint.  The Intel XDK is a development toolkit that attempts to make
> cross-platform HTML5 more approachable.  Obviously, as people get farther
> into HTML5 development they will run into all kinds of hard problems.  But
> right out of the box, you want people to be able to put together simple
> apps simply.  That kind of good initial experience is a key to making an
> approachable product.
>
> This particular mistake, of including two <script> tags for cordova.js, is
> easy to make and really hard to diagnose.  In fact, some quite experienced
> developers made this mistake and found it really hard to figure out how
> that mistake led to the observed symptoms.  You have to dig into cordova.js
> to figure it out, and this is not the simplest piece of code.  You don't
> want ordinary Cordova users to have to do that if you can avoid it.
>
>     Julian
>
> -----Original Message-----
> From: Jesse [mailto:purplecabbage@gmail.com]
> Sent: Friday, March 13, 2015 6:14 PM
> To: dev@cordova.apache.org
> Subject: Re: Introduction for Julian Horn
>
> Hello and welcome (back?) Julian!
> I have added you as an assignable user in JIRA, and assigned this issue to
> you. You also should be able to assign issues to yourself now.
>
> Regarding this specific issue, I think I agree with Joe's comment in JIRA
> that this is probably not a bug.  There are literally millions of stupid
> things that people can do to their projects to break them, and I think if
> we fix stupid in code, we perpetuate it.
>
> Not a requirement, but I would recommend you share your proposed solution
> to this before you spend a large chunk of time on it.
>
>
>
>
> @purplecabbage
> risingj.com
>
> On Fri, Mar 13, 2015 at 2:55 PM, Shazron <shazron@gmail.com> wrote:
>
> > Welcome!
> > You mean https://issues.apache.org/jira/browse/CB-7992 of course ;)
> >
> > On Fri, Mar 13, 2015 at 2:20 PM, Horn, Julian C
> > <julian.c.horn@intel.com>
> > wrote:
> > > Hello!  I am Julian Horn.  I'm a software engineer in the Intel XDK
> > team.  I am the team lead for the Device Emulator component, our
> > derivative of the Ripple emulator.
> > >
> > > I have signed and sent in an individual contributor agreement, and
> > > my
> > company has a corporate contributor agreement signed.
> > > I have posted mail to this mail list and to the ripple mailing list
> > before, but this will be my first contribution.
> > >
> > > To get my feet wet, I would like to take on CT-7792.  This is a
> > > small
> > JIRA I filed that complains about what happens if a user accidentally
> > codes two <script> tags for cordova.js.
> > > How do I go about getting this JIRA assigned to me?
> > >
> > > While this is a fairly trivial issue, we have found this is a common
> > mistake that new users make, especially when they are developing an
> > application from building blocks.  People can become confused about
> > whether the <script> tag is already in the template or whether they
> > have to add it themselves and they end up with two.  The behavior you
> > get when you make this mistake and you run in the Device Emulator is
> > bizarre, to say the least.  That's why I want to fix this.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > For additional commands, e-mail: dev-help@cordova.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message