cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jbondc@openmv.com" <jbo...@openmv.com>
Subject RE: Suggestion - pluginLoader
Date Tue, 18 Jun 2013 15:08:27 GMT
Take a look at:
http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders
https://gist.github.com/wycats/51c96e3adcdb3a68cbc3

That type of extensible loader could make sense in Cordova and seems like it would meet all
your requirements.


-----Original Message-----
From: J Prince [mailto:princej.ws01@hotmail.co.uk] 
Sent: Monday, June 17, 2013 7:27 AM
To: dev@cordova.apache.org
Subject: RE: Suggestion - pluginLoader

There are a few main reasons.

1. The app I am working on is an Enterprise app. We are designing the app as a Cordova shell
that re-directs to all the html content. This means that we have to dynamically load a different
cordova.js (depending on platform) following the redirect.
So we are actually unable to do anything other than dynamically load plugins once the platform
specific cordova.js is loaded

2. Some of the plugins will be used incredibly rarely. It doesn't seem necessary to always
load plugins until they are needed.

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. 
The define/require pattern feels much cleaner and better compartmentalized.
Our main page currently has 2 script includes: require.js and jqmobi.

 		 	   		  


Mime
View raw message