A while ago, I was looking at ways of developing mobile applications and found about Apache Cordova.
Apache Cordova is open source software so it allows non-Adobe wrappers around it, including Phonegap, and others such as Intel XDK or Appery.io.
The application runs on the mobile device and can access the native functions of the device such as the GPS or camera. By using the Cordova APIs a developer can build a mobile application without writing any native code.
Building Apps with NetBeans
After digging a bit, I found a tutorial on the NetBeans site that showed me how to set it up to develop and create native applications.
After completing the process, I was able to create, build and test the application (a very simple, hello world app, to see how it worked).
Example Android App
Once I was acquainted to Apache Cordova, I started a new project. I used river-height data coming from Santa Fe’s Weather Information Center (CIM) and displayed it on a Google map.
This involved accessing a Web Service and using Google Maps’ API to display each measure point data on the map.
However, when working on the App, trying to access native hardware functions (through the use of plugins), I noticed that all Cordova-related code was fetched from Github repositories every time I ran the compile cycle, as shown in the plugins.properties file.
Working with local code repositories
Although this had the advantage of fetching the latest code, it did take a long time to get, even for small code changes, making the debugging process much slower.
While reading NetBeans documentation, I found that it was possible to modify the project’s settings to get code pieces from local folders, as described below.
This simple change made the app-creation process much faster, as Cordova-related files were fetched from a local folder, avoiding any network overhead.
This also allowed the Apache Cordova development process to go on even if Internet access was severed, making it ideal in unstable-connection situations. Once the testing cycle was over, I could switch back to Github-based sources, so that the App used the latest code, solving any potential security or performance problems.Wa