When PhoneGap was first introduced, Apple refused to accept apps created by PhoneGap as genuine, because they were not native, and were interpreted. But this has changed, partly because there are so many alternatives, partly because they were losing out on hundreds or thousands of apps to competitors, and partly because of the sheer ease of development compared to that of the past. These were the driving forces behind the change.
When code is written using PhoneGap with HTML5, you can deploy it on a certain target or platform, such as iOS or Android, or many versions are created by default, for the Apple App Store or the Android store, among others. This is the benefit of using a single code base, a newer and easier language such as HTML5, and a cross-platform development tool such as PhoneGap.
In this chapter, we will look at how to use Xcode with PhoneGap to integrate and compile with source code including HTML5. We will show you how to write code using SQLite and SQL statements and enter code directly into HTML5, which is then preprocessed by PhoneGap. We will cover all the aspects of creating a default Apple Xcode application from start to finish using the SQLite database for data storage, and using PhoneGap and HTML5 as a start.
Because it is easier to develop mobile and tablet apps using HTML5, PhoneGap, and generally, cross-development tools, there seems to be software snobbery, where some people think that HTML5 development is somewhat not as skilled as native development. There have been some very bad native developments built so far, but the same could apply to HTML5 or other mobile apps on the app stores.
Using these modern cross-development tools is a good and quick way if you want to build prototypes from designs that give and show the look and feel, and show some functionality too. Cross-browser technology will not perform as quickly or efficiently as a native app and, as mentioned, it has a reputation for not being as real as native apps. With the growth of mobile technology, there has been a high growth of HTML5 apps available, because they are much faster to design, develop, and produce, compared to native apps.
There are pitfalls for those web developers who think that they can just put an app together for mobiles to produce something comparable to a desktop. Well, they are wrong. Anyone who builds a mobile app for iOS, for example, must read their human guidelines document, which will outline how to actually take into consideration the user experience, the way to design buttons and journeys, and how best to build something that fits in the iOS ecosystem. Google/Android has fewer checks, but as their app store grows, I am sure there will be more or different types of controls enforced.
Web developers must understand the limitations of their destination devices for these apps. Mobiles, including smartphones, actually don't have the processing power of a desktop, and web developers must be aware of how programming principles can be applied within these types of developments.
It is great to try new software technology; if you have an idea, then try to create, test it, and submit your app to the App Store. But if you take some person and get them to try to create a native app, they have to learn a whole new language and way of doing things. It's going to take a lot longer until they are even able to produce a working mobile app, but by that time they will have quite a bit of experience. There are applications that have a mixed mode of native code, combined with cross-development code such as HTML5. In practice, although these work, there are huge pitfalls in performance and they are limited as well.
There are advantages to building and using native apps and applications for specific mobile devices or operating systems, which are usually installed on your phone via an app store. These benefits include speed of development, the same app across the product range, one set of code, and a change queue for the app. Native is the best way to code ideally, but if you have web skills and you don't want to learn a new programming language, and you want to create an HTML5 app, using PhoneGap delivered on iOS, Android, or Windows may be an alternate way of using your skills.
With advances in HTML5 and PhoneGap API options, there are many new functions, including those of camera manipulation, for example, which can be done via some basic commands. With a good designer, a decent app using HTML5 can be made quite quickly and economically.
Mobile developers need to be educated on performance deliverables to build apps, which are skills they can use again and again. The benefits will be used on all the apps they produce.
The advantages of a mobile app surpass the straightforward usage of a mobile website. Some advantages are listed here:
The mobile web application by definition would have less access to the low-level functionalities of a device and system calls. Due to enhanced development of the APIs and higher-level languages such as HTML5, CSS, or JavaScript, this is changing through software updates and upgrades. By using the mobile web/app solutions for mobile sites, app store approval is not required, and by ensuring proper code design, the same application can work with a variety of devices and device sizes, and different mobile or desktop operating systems or browsers. Information is served to the app, and there are no offline facilities, unlike native.
HTML5 is praised as easy, unlike the native facilities offered by native code.