Tuesday, December 31, 2013

Using AngularJS/Backbone in PhoneGap

This article will not teach you how to use AngularJS or Backbone in PhoneGap, but still, I promise, it will be helpful for your PhoneGap development.
Actually, this article will let you know that you don’t need to use angularJS/backbone in your phonegap development.
Firstly, I completely agree AngularJS and Backbone are very cool JS frameworks. But I don’t think they are appropriate for phonegap. Why?

1. The route feature makes page navigation too complex.

The route feature is very important for web applications, but there is a much simpler way to achieve page navigation & parameters in phonegap, because phonegap APP’s don’t need to handle the URL. And it is the URL that makes the route much more complex.
Can you think about what is the simplest way to make a page navigation? Here is our code:
var login = new LoginPage();
login.username = “leo”;
With the above page navigation, you don’t need to configure the so-many routes. The complex routes make your code harder to understand, at least harder than the above code.
As we don’t need to consider URL in phonegap, we can save a lot of code in achieving page navigation, which probably saves performance. And the simpler code is easier to understand.

2. The coding style is so bad.

This is my personal opinion, and you will probably argue with this point. I’m glad to see your comments.
When working with AngularJS/Backbone, you will find there are so much code looking like: sample code
I really hate such a coding style. The above controller is defined(or described) by the code, but you never see where it’s called, and you cannot call this method either. The most fatal issue is There Is No Intelligence when you write the code, which made me crazy.
Below link shows what I think is an example of better coding style: http://cordova.codeplex.com/SourceControl/latest#demos/AnnualTargets/www/scripts/at/05.pages/Menu.js
I believe this code is much more readable than the angularJS one.
So, if we don’t use AngularJS or Backbone, what shall we use?

Here I recommend Nova PhoneGap Framework

Nova PhoneGap Framework was born in November 2012, from the first release till this moment, this framework has been tested/experienced by multiple projects, and it is stable now. We are also continue to update this framework to make it perfect. For small and medium projects, you can directly use the framework. For very large projects, you can easily customize the architecture to what you want to perfectly support your projects.
Core features:
  1. Help you organize your files in a reasonable structure;
  2. Complete solution for page navigation, page parameters, and page events (load, navigate, away, etc.);
  3. Complete solution for device events (android backbutton, menu button), easier to use;
  4. Complete solution for local database access (SQLite);
  5. Optimized scroll bar;
  6. Other plug-ins & best practices, such as mock, log, carousel, busy indicator.
In short, Nova PhoneGap Framework makes your code more readable, while reducing demands on the ability of the programmer, even junior programmers can quickly get started and complete the development with high quality.

Are you looking for PhoneGap programmers or PhoneGap developers?

Feel free to contact us . Free quote is available.
Looking forward to your comments.


  1. http://ionicframework.com/docs/components/

  2. This is purely an advert by the creators of Nova.
    Angular is as complex as you want it and the examples given above are dire.

  3. AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.

    AngularJS Training in Chennai

  4. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

    Devops training in tambaram

  5. Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!
    Blueprism training in Chennai

    Blueprism training in Bangalore

    Blueprism training in Pune

  6. This is my 1st visit to your web... But I'm so impressed with your content. Good Job!
    java training in chennai

    java training in marathahalli | java training in btm layout

  7. It is nice blog Thank you porovide important information and i am searching for same information to save my time Angularjs4 Online Training Bangalore

  8. I’m planning to start my blog soon, but I’m a little lost on everything. Would you suggest starting with a free platform like Word Press or go for a paid option? There are so many choices out there that I’m completely confused. Any suggestions? Thanks a lot.

    AWS Training in NewYork City | Amazon Web Services Training in Newyork City

    AWS Training in London | Amazon Web Services Training in London, UK

    Amazon Web Services Online Training in USA | AWS Online Course in USA

  9. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

    Article submission sites