How To Start PhoneGap? #1 – An Explanation

Sharing is Caring


The Industry isnt the same its 5 years ago.Nowadays every company,individual or a community MUST have a mobile app or mobile website.

Since our option here is building Mobile Apps,I would like to help you get started with PhoneGap easily and fast enough.

Before we start talking about what needs to be installed and which apps and frameworks we need to use developing,I would like to talk about wrong things you know about PhoneGap.

Facts you know wrong or half-true about PhoneGap #1: PhoneGap isnt a WYSIWYG Editor

Clearly,every “NATIVE LOVER” neither developed a single line of Hybrid App nor knows about it;  thinks like that.They think as if you have an editor like Visual Studio or Eclipse or whatever WYSIWYG editor you’re using to develop apps.Thats not true.You can use whatever HTML-supported editor you want even a NotePad can help you build a Hybrid Mobile App with PhoneGap.PhoneGap Apps are HTML/JS oriented apps.

Since i cleared the way from misunderstandings,i better tell you what PhoneGap is before you leave my blog.

PhoneGap is divided into 2 parts: Packager and Framework

Packager helps you to build and debug apps according to the platforms you wish to be published such as Android,iOS,Windows Phone,Blackberry.
Framework is called Apache Cordova.Cordova help you to access platform-specific or common elements such as Camera,GPS and so on…

The apps built using PhoneGap Packager uses Cordova at backend.Its a device-specific set of scripts that uses Native coding backend and invokes features of the phone.

Facts you know wrong or half-true about PhoneGap #2: PhoneGap runs slow

Its not that something to do with PhoneGap but the system itself!

Lets compare 2 kind of apps: Native and PhoneGap

In your Native App,you dont use any single line of code or visual element.Just a blank screen.
How does native apps work? First the codes compiled line by line and then visual elements (if any and no error on debug) being put in the window.Then the emulator runs and displays our app.

Now lets take a look at PhoneGap!

How PhoneGap actually works: Normally to access the Native specs,theres a secret Native App Template built on packaging.Yes! What did you think? How else would a javascript access Native specs without invoking backend Native Codes.So till debugging everything works just like a Native App.After the app works,first the scripts are being called,rendered and then HTML elements being drawn in a WebBrowser component that fills the screen.

See the difference? Its because it renders 2 times.1 for Native and 1 for HTML/JS files.So whoever thinks its slower than Native,yes you’re right but no other Hybrid alternative can change that.Its because of the system design.Every Hybrid app runs inside a Native App.

I will talk and update this series often so stay in touch