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 3267310B1C for ; Fri, 21 Jun 2013 12:30:36 +0000 (UTC) Received: (qmail 78189 invoked by uid 500); 21 Jun 2013 12:30:35 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 78165 invoked by uid 500); 21 Jun 2013 12:30:35 -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 78157 invoked by uid 99); 21 Jun 2013 12:30:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:30:35 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of princej.ws01@hotmail.co.uk designates 157.55.0.207 as permitted sender) Received: from [157.55.0.207] (HELO dub0-omc1-s8.dub0.hotmail.com) (157.55.0.207) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:30:29 +0000 Received: from DUB122-W13 ([157.55.0.237]) by dub0-omc1-s8.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 21 Jun 2013 05:30:08 -0700 X-TMN: [uvp3ze0Sg3QzeCgTg4rm18PRXbaS/8d7] X-Originating-Email: [princej.ws01@hotmail.co.uk] Message-ID: Content-Type: multipart/alternative; boundary="_bb8862ed-7fe6-435a-92f2-39bc3c491814_" From: J Prince To: "dev@cordova.apache.org" Subject: RE: Suggestion - pluginLoader Date: Fri, 21 Jun 2013 13:30:08 +0100 Importance: Normal In-Reply-To: References: ,,,<6AA5D154FC52C047B1FF1CA3759A935B3CD845E9@BN1PRD0712MB650.namprd07.prod.outlook.com>, MIME-Version: 1.0 X-OriginalArrivalTime: 21 Jun 2013 12:30:08.0446 (UTC) FILETIME=[10EF15E0:01CE6E7B] X-Virus-Checked: Checked by ClamAV on apache.org --_bb8862ed-7fe6-435a-92f2-39bc3c491814_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable So it's been about a week now and I haven't really had any feedback on this= . https://github.com/jxp/cordova.pluginLoader I'm not sure if this means=3B a) Everyone is too busy b) Everyone assumed someone else would respond c) No-one is that interested in plugin javascript definitions d) You've had similar discussions before and don't want to start THAT again > From: princej.ws01@hotmail.co.uk > To: dev@cordova.apache.org > Subject: RE: Suggestion - pluginLoader > Date: Tue=2C 18 Jun 2013 16:55:19 +0100 >=20 > I have (briefly) looked at Harmony loaders before but that is a spec for = a future javascript language version. > I have found a module loader that I wish to use (require.js). >=20 > My point is that the current suggested module definition for cordova plug= ins INCLUDES a loader implementation. >=20 > I am suggesting that the loader implementation be removed from the plugin= to a new method cordova.pluginLoader > This would make the plugins cleaner (as they would only describe their ow= n behaviour) and it would also allow cordova or app developers to change/cu= stomize the loader implementation as needed. >=20 > My suggested approach would result in plugins that could be loaded in mul= tiple different ways including (but not limited to)=3B "classic" window.plu= gins=2C cordova.define and require.js >=20 >=20 > > -----Original Message----- > > From: J Prince [mailto:princej.ws01@hotmail.co.uk]=20 > > Sent: Monday=2C June 17=2C 2013 7:27 AM > > To: dev@cordova.apache.org > > Subject: RE: Suggestion - pluginLoader > >=20 > > There are a few main reasons. > >=20 > > 1. The app I am working on is an Enterprise app. We are designing the a= pp as a Cordova shell that re-directs to all the html content. This means t= hat we have to dynamically load a different cordova.js (depending on platfo= rm) following the redirect. > > So we are actually unable to do anything other than dynamically load pl= ugins once the platform specific cordova.js is loaded > >=20 > > 2. Some of the plugins will be used incredibly rarely. It doesn't seem = necessary to always load plugins until they are needed. > >=20 > > 3. We are building with a single page architecture so don't want to end= up with lots of script includes in the index.html page.=20 > > The define/require pattern feels much cleaner and better compartmentali= zed. > > Our main page currently has 2 script includes: require.js and jqmobi. > >=20 > > =20 > >=20 > =20 = --_bb8862ed-7fe6-435a-92f2-39bc3c491814_--