Having supported my background service plugin for Phonegap/ Cordova for sometime, it is clear that many developers are jumping into the technology without fully understanding the platform.
Don't get me wrong; Phonegap/ Cordova is a great tool - when used for the right job. This post is about taking the time to consider if it is right for your project.
Ok, for a moment lets step back from any specific technology. When, as a developer, you are present with a project you should always break it down into the component parts. From those component parts, you should be looking for those that are the most risky or complex - these are the parts that will derail your project - almost certainly at the wrong time in your project. Risky and complex parts should be handled early in a project - you should be aiming to fail quickly.### Failing quickly Every software project has a chance of failure. Some of the best software projects have multiple failures - failures that allow the development team to adjust their project to produce better software. Acceptance of failure may be a culture change for you, your development team or even your organisation. Please believe me when I say you need to get over this (maybe I should write a blog on that) - for now just trust me. The important thing with failure is to fail quickly. This wastes lest effort & money than failing slowly. The worst time to fail is towards the end of the project. It really doesn't take much searching of the internet to find case studies of projects that have been on track until the 11th hour - only to fail spectacularly - generally leading to the entire project having to be scrapped.### So, how does failing quickly apply to my project If you are able to assess your risky/ complex tasks early and prove you can or cannot perform with your chosen technology, team, etc - you greatly improve the likelihood that the project will be a success. With Phonegap/ Cordova; the risky/ complex tasks come to play when you have to develop functionality outside of the standard app. Lets take a scenario where your project requires that the app actively talks to a web service every 15 minutes - and should take actions based on it. You break the task down - your comfort area is the UI (HTML, CSS, JavaScript) - Phonegap seems just the framework to develop your application. Phonegap however has no native means of checking a web service every 15 minutes. Yes, you could use JavaScript for when the app is open and running, but (due to the Android Application Life-cycle) that will not work if you app goes into the background or is closed. At this point, you are probably looking at my background service plugin. This does give you a means for how to handle this 15 minutes check - however, you need to understand that you need Java (not JavaScript) skills and the relevant technical expertise to develop an Android Native app. So, in the development of your application, you now how have critical failure - you don't have the Java/ Native app experience or the funds to acquire them. So, at which point would you prefer to find this: