Jump to content

User:Sai Krishna Panakanti/sandbox

From Wikipedia, the free encyclopedia
Apache Cordova
Original author(s)Joe Bowser, Michael Brooks, Rob Ellis, Dave Johnson, Anis Kadri, Brian Leroux, Jesse MacFadyen, Filip Maj, Eric Oesterle, Brock Whitten, Herman Wong, Shazron Abdullah
Developer(s)Apache Cordova
Stable release
6.1.0 / March 23, 2016 (2016-03-23)
Written inC#, C++, CSS, CSS3, HTML, HTML5, Java, JavaScript and Objective-C
Operating systemAndroid, BlackBerry, Firefox OS, iOS, Symbian, Ubuntu Touch, webOS, Windows Phone, Windows 8
Available inEnglish
Typemobile development framework
LicenseApache 2.0 License[1][2]
Websitecordova.apache.org

Apache Cordova (formerly PhoneGap) is a popular mobile application development framework originally created by Nitobi. Adobe Systems purchased Nitobi in 2011, rebranded it as PhoneGap, and later released an open source version of the software called Apache Cordova.[3] Apache Cordova enables software programmers to build applications for mobile devices using CSS3, HTML5, and JavaScript instead of relying on platform-specific APIs like those in Android, iOS, or Windows Phone.[4] It enables wrapping up of CSS, HTML, and JavaScript code depending upon the platform of the device. It extends the features of HTML and JavaScript to work with the device. The resulting applications are hybrid, meaning that they are neither truly native mobile application (because all layout rendering is done via Web views instead of the platform's native UI framework) nor purely Web-based (because they are not just Web apps, but are packaged as apps for distribution and have access to native device APIs). Mixing native and hybrid code snippets have been possible since version 1.9.

The software was previously called just "PhoneGap", then "Apache Callback".[5][6] As open-source software, Apache Cordova allows wrappers around it, such as Appery.io[7] or Intel XDK.

PhoneGap is Adobe’s productised version and ecosystem on top of Cordova. Like PhoneGap, many other tools and frameworks are also built on top of Cordova, including Ionic,[8] Monaca, TACO[9], the Intel XDK,[10] and the Telerik Platform.[11] These tools use Cordova, and not PhoneGap for their core tools.

Contributors to the Apache Cordova project include Adobe, BlackBerry, Google, IBM, Intel, Microsoft, Mozilla, and others.[12]

History[edit]

First developed at an iPhoneDevCamp event in San Francisco,[13] PhoneGap went on to win the People's Choice Award at O'Reilly Media's 2009 Web 2.0 Conference,[14] and the framework has been used to develop many apps.[15] Apple Inc. has confirmed that the framework has its approval, even with the new 4.0 developer license agreement changes.[16] The PhoneGap framework is used by several mobile application platforms such as Monaca,[17] appMobi[18], Convertigo[19][20], ViziApps,[21] and Worklight[22][23] as the backbone of their mobile client development engine.

Adobe officially announced the acquisition of Nitobi Software (the original developer) on October 4, 2011.[24] Coincident with that, the PhoneGap code was contributed to the Apache Software Foundation to start a new project called Apache Cordova. The project's original name, Apache Callback, was viewed as too generic.[25] Then, it also appears in Adobe Systems as Adobe PhoneGap and also as Adobe Phonegap Build.[26]

Early versions of PhoneGap required an Apple computer to create iOS apps and a Windows computer to create Windows Mobile apps. After September 2012, Adobe's PhoneGap Build service allows programmers to upload CSS, HTML, and JavaScript source code to a "cloud compiler" that generates apps for every supported platform.[27]In 2013, an Apache Cordova moved into npm.

Supported Strategy[edit]

Any developer, before designing an application, must decide on a strategy. There are three commonly used plans.

  • Native Mobile App
  • Mobile Web App
  • Hybrid Mobile App

Native Mobile Apps[edit]

Native Mobile Apps are specific to the operating system on which they are running. The OS provides built-in APIs to execute it locally.

Mobile Web Apps[edit]

Mobile Web Apps are apps developed to run on any mobile web browser. It makes less use of the built-in APIs of the operating system when compared to that of the native applications.

Hybrid Mobile Apps[edit]

Hybrid Mobile App is a mix of both Native Mobile App and Mobile Web App.

Cordova supports two basic workflows to support the above defined mobile app development paths

  • Cross-platform (CLI) Workflow: This path is chosen for developing Mobile Web App
  • Platform-centered Workflow: This path is chosen for developing Native Mobile App

Architecture[edit]

Apache Cordova architecture

The architecture of the framework changes based on the requirements of the application but most data-driven applications follow the basic workflow i.e., a user interacts with the client, the data from the user is passed on to the server, and finally, server talks to the database. Apache Cordova understands this aspect and helps developers with the first two stages. With the advancement of smartphones and IoT, now a client can take information in various forms.Apache Cordova eases the task of the developer by processing this information. The high-level architecture of Cordova has three major components.

  • Web View
  • Web App
  • Plugins

Web View[edit]

The WebView is like a web browser. It is where web pages are arranged in a pre-defined manner and the user can interact with them. Apache Cordova uses HTML5 for displaying the web pages. On the web page, the user can fill out forms, click a button among other things.

Web App[edit]

The application program resides in this module. The webserver directory index is located in this level, which references to all the CSS, JavaScript, images, media files, or other resources necessary for the framework to run. Developers, who are interested in changing the design of the web page, work is this section of the hierarchy.

Plugins[edit]

The plugins are most integral part of the Apache Cordova platform. With the help of native components of the underlying Operating System, Cordova breaks down the information provided by the user via WebView and forwards the data which the server can understand. Apache Cordova has 2 types of plugins - core plugins and custom plugins. Basically, core plugins is the native code that is made available by the Operating System, whereas, custom ones are programmed to help developers complete specific operations.

Design and rationale[edit]

The core of Apache Cordova applications use CSS3 and HTML5 for their rendering and JavaScript for their logic. HTML5 provides access to underlying hardware such as the accelerometer, camera, and GPS. However, browsers' support for HTML5-based device access is not consistent across mobile browsers, particularly older versions of Android. To overcome these limitations, Apache Cordova embeds the HTML5 code inside a native WebView on the device, using a foreign function interface to access the native resources of it.[28]

Apache Cordova can be extended with native plug-ins, allowing developers to add more functionalities that can be called from JavaScript, making it communicate directly between the native layer and the HTML5 page. These plugins allow access to the device's accelerometer, camera, compass, file system, microphone, and more.

However, the use of Web-based technologies leads some Apache Cordova applications to run slower than native applications with similar functionality.[29] Adobe Systems warns that applications may be rejected by Apple for being too slow or not feeling "native" enough (having appearance and functionality consistent with what users have come to expect on the platform). This can be an issue for some Apache Cordova applications.[30][31]

Supported platforms[edit]

Apache Cordova currently supports development for the operating systems Apple iOS, Bada, BlackBerry, Firefox OS,[32] Google Android,[33] LG webOS, Microsoft Windows Phone (7 and 8), Nokia Symbian OS, Tizen (SDK 2.x), and Ubuntu Touch. The table below is a list of supported features for each operating system.[34][35]

Feature Android[36] Apple iPhone /iPhone 3G Apple iPhone 3GS and newer Bada BlackBerry 10 and PlayBook OS BlackBerry OS 4.6–4.7 BlackBerry OS 5.0-6.0+ Firefox OS Symbian Tizen webOS Ubuntu Touch Windows Phone
Accelerometer Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Camera Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Compass Yes Yes Yes Yes Yes Yes Yes Yes Yes
Contacts Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
File Yes Yes Yes Yes Yes Yes Yes Yes
Geolocation Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Media Yes Yes Yes Yes Yes Yes Yes
Network Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Notification (alert, sound, vibration) Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Storage Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Pros and Cons[edit]

Pros[edit]

  • PhoneGap allows easy deployment of an already existing web application in one or more mobile application stores.
  • Open source and available for free.
  • With several available plugins, Apache Cordova enables the developers to build cross-platform applications without having to learn a new language.

Cons[edit]

  • The performance of Cordova/PhoneGap apps has often been criticised. There are high chances of native UI outperforming a hybrid solution. However, improvements in hardware and implementations might narrow the gap.

See also[edit]

References[edit]

  1. ^ "PhoneGap License". Phonegap.com. Retrieved 2013-10-09.
  2. ^ "FAQ | PhoneGap Build | Edge Tools & Services | Adobe & HTML". Html.adobe.com. Retrieved 2013-10-09.
  3. ^ "Adobe Announces Agreement to Acquire Nitobi, Creator of PhoneGap". Adobe.com. 2011-10-03. Retrieved 2012-04-07.
  4. ^ Jose Fermoso (April 5, 2009). "PhoneGap Seeks to Bridge the Gap Between Mobile App Platforms". GigaOM. Retrieved 2012-04-07.
  5. ^ Apache Callback
  6. ^ "Apache Callback Proposal". Wiki.phonegap.com. 2013-08-15. Retrieved 2013-10-09.
  7. ^ "Appery Documentation".
  8. ^ "The Last Word on Cordova and PhoneGap". The Official Ionic Blog.
  9. ^ "TACO".
  10. ^ "Intel® XDK". Intel® Developer Zone.
  11. ^ "Apache Cordova". Apache Cordova.
  12. ^ "Cordova Contributor's Who's Who". apache.org. 2015-11-02. Retrieved 2015-11-02.
  13. ^ Darryl K. Taft (2009-03-13). "PhoneGap Simplifies iPhone, Android, BlackBerry Development". Eweek.com. Retrieved 2013-10-09.
  14. ^ Davis, Lidija (2009-04-02). "PhoneGap: People's Choice Winner at Web 2.0 Expo Launch Pad". Readwriteweb.com. Retrieved 2012-04-07.
  15. ^ "PhoneGap Apps". Phonegap.com. Retrieved 2012-12-06.
  16. ^ "PhoneGap and the Apple developer license agreement. « PhoneGap". Phonegap.com. 2010-04-14. Retrieved 2012-04-07.
  17. ^ "Develop Awesome PhoneGap Apps with Awesome Tools". monaco.mobi. Retrieved 2014-06-10.
  18. ^ "Create Mobile and Web Apps with HTML5 and JavaScript |". appMobi.com. Retrieved 2012-04-07.
  19. ^ "Open Source Mobile Enablement and Enterprise Mashups". Convertigo. Retrieved 2012-04-07.
  20. ^ "Convertigo Mobilizer Uses PhoneGap Build APIs « PhoneGap". Phonegap.com. 2011-07-07. Retrieved 2012-04-07.
  21. ^ "Create Mobile and Web Apps with HTML5 and JavaScript". ViziApps.com. Retrieved 2012-04-07.
  22. ^ "Mobile Application Platform and Tools". Worklight. 2012-01-16. Retrieved 2012-04-07.
  23. ^ "How PhoneGap plays an important part in our Enterprise offering PhoneGap". Phonegap.com. 2011-06-27. Retrieved 2012-04-07.
  24. ^ Shankland, Stephen (2011-10-03). "Adobe buys PhoneGap, TypeKit for better Web tools | Deep Tech - CNET News". News.cnet.com. Retrieved 2012-04-07.
  25. ^ "finding a new name that isn't PhoneGap - Brian LeRoux - org.apache.incubator.callback-dev". MarkMail. 2011-10-28. Retrieved 2012-04-07.
  26. ^ "Adobe PhoneGap Build". Adobe Systems Inc.
  27. ^ Klint Finley. "Adobe Launches Hosted PhoneGap Build Service For Creating Cross-Platform Mobile Apps". 2012.
  28. ^ "The Development of Mobile Applications using HTML5 and PhoneGap on Intel Architecture-Based Platforms". 2012-06-22. Retrieved 2013-02-17. However, HTML5 has some limitations. The most prominent is the lack of API to access device hardware and sensors such as an accelerometer, compass, GPS, etc. While native applications can access device hardware, they lack the portability that Web apps provide. Thus, a solution is to code a hybrid application, which cumulatively uses the benefits of native and Web apps.
  29. ^ Sapan Diwakar (2012-06-21). "Titanium vs PhoneGap vs Native application development". Retrieved 2013-02-17.
  30. ^ "PhoneGap advice on dealing with Apple application rejections". Adobe Systems. 2012-10-29. Retrieved 2013-02-17.
  31. ^ "Creating apps with PhoneGap: Lessons learned". Adobe Systems. 2012-09-17. Retrieved 2013-02-17. When you add more complex CSS3 elements, heavy transitions, and supporting multiple devices (such as iOS and Android), however, it makes you realize that there are few steps you must iron out to prevent hair loss
  32. ^ "Building Cordova apps for Firefox OS ✩ Mozilla Hacks – the Web developer blog". 20 February 2014. Retrieved 26 February 2014.
  33. ^ "Using PhoneGap and the Sony Ericsson WebSDK to develop Android apps". Android and Me. Retrieved 2012-04-07.
  34. ^ "Platform Support". Adobe PhoneGap. Retrieved 2016-02-23.
  35. ^ "PhoneGap supported features". Phonegap.com. Retrieved 2013-10-09.
  36. ^ https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html

Bibliography[edit]