Aug 24, 2012

Is PhoneGap the right choice for X project?

Depending on the context of the project, needs of the client and time constraints we might consider using the PhoneGap framework to do the implementation of the app instead of going native. But, it’s the right technology for the task at hand? Here are some points that might help in the decision making process:

Phonegap good points:

  • Small learning curve for web developers since it uses known technologies such as HTML5/CSS/JS. The PhoneGap API offers a event model that is familiar to client side developers. It’s easier to find web developers than native iOS developers.
  • Single code base for all platforms (iOS, Android, Windows 7, mobile web).
  • Reusability: If the app is structured in modules, this could be potentially reused for a web app that shares common functionality.
  • Options: There are a plethora of different frameworks and libraries in the web that can be used to fulfill different needs in each app. For example: jQuery Mobile, Sencha Touch, JQ Touch, iScroll, SpineJS, just to mention a few.
  • WebKit: since both iOS and Android platforms rely on Webkit for their browsers, PhoneGap apps can use some of the latest HTML5 and CSS3 awesomeness.
  • Support for web version of Google Analytics.


Considerations:

  • Conditional code for each platform.
  • iOS issues:
    • Scrolling for iOS might have glitches handling large views.
    • Position:fixed style does not work in <iOS4. Although, it can be achieved using hacks or iScroll library, the are still some issues: http://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios
  • For large apps using a JS MVC framework is encouraged. SpineJS is a good option that includes also a flexible template engine.
  • CSS Media Queries can be used to handle the resolutions and orientation across devices.  For example, this technique can be used to load higher resolution images for bigger screens.


Summarizing, PhoneGap is a good option for projects where:

  • Need to deploy in several platforms.
  • Performance is not critical.
  • Simple apps with reduced budget or human resources for the project.
  • The hierarchy of views is not more than 5 levels deep.
  • Does not need to handle large images or too many of them in a single view.

Here is a infographic that might help further in the decision making process:

http://www.appliness.com/infographic-decision-path-to-phonegap/

1 comment:

  1. This blog is having a wonderful talk. The technology are discussed and provide a great knowledge toall. This helps to learn more details about technology. All this details are important for this technology. Thank you for this blog.
    Android Training in Chennai

    ReplyDelete