Is PhoneGap the right choice for me? - android

I am new to PhoneGap, and I have several questions:
I need a way to develop an application that will have iOS, Android, and other platform compatibility. In other words, I want to write 1 app and get compatibility versions for different platforms.
By reading the "Get Started" guide linked by the PhoneGap website, I found there are different procedures for different platforms. So to have compatibility versions across platforms, do I have to go one-by-one and change all of them if I make a modification to my app?
Also, what exactly is PhoneGap Build? It seems like I can avoid all that hassle mentioned previously and toss my app into the PhoneGap Build? Do I really not have to do anything besides writing the app? What if I need to make changes?
And finally, I've read that PhoneGap works with HTML, CSS, and Javascript, but not PHP. What if my app needs to contact a server? Can PhoneGap handle that?
Thank you for bearing with all these questions!

PhoneGap achieves platform compatibility by embedding a webview within your application. Therefore you can apply your knowledge in HTML, CSS, JavaScript and it additionally provides ways to interact with native features (e.g. camera, gps, ...).
With PhoneGap you write one general web app, tweak parts for the specific platform (sometimes you do not have to this at all) and build it for that platform. The latter can be handled with PhoneGap Build service: It takes your webapp and bundles it for the mobile operating systems out there (Embeds it within a Java app on Android, an Objective-C app on iOs)
PhoneGap is able to communicate with a server hosting a PHP script just as every other web application. Trying to dynamically load resources from remote sites can be quite a hassle but this is another question.

traumalles is correct. All your HTML/Javascript/CSS is running from within a webview on the device. Your code is, therefore, all "client-side." You can communicate with a server just like with any other page. When they say PhoneGap isn't compatible with PHP, they mean only that PhoneGap can't execute PHP code like it's a server, because it's not. It's just loading your webapp in, basically, a browser.

One other important question is what exactly do you mean with "other platforms" phonegap does provide many functionality for nearly every platform but the different webbrowser of the mobile devices have their problems and limitations.
For example are there many problems if you want to provide your application on a WindowsPhone Device because the Webbrowser has a few limitations which will cause your app to not look and behave like a native app.
Just look a bit through the phonegap API you will see that some functions are just available for IOS or for Android and there are a few only Blackberry methods and so on.
So you really have to be careful when a framework tells you it will work on all devices.
So i really don't have a problem with phonegap i worked with it very great but there will be limitations you have to deal with.
If you primarily want to develop for IOS and Android you can really achieve great native like results !

Related

Intraweb HTML5 app, git and database - do they blend?

I'm on a bit of new ground here and perhaps this is a repost (if so>sorry).
I need some pointers on which direction to go. I have previously made an android app and found myself using most dev time on the UI. I wish to design the UI with HTML5 and distribute it to android and iOS .
I researched a lot about native and hybrid in order to focus my effort. Came across a bunch of platforms like PhoneGap, Appcelerator, Trigger.io and AppGyver (found the latter two appealing). But now I'm confused...
I basically wish to to make an intraweb environment that allows a team to develop HTML5 content that feeds data into a database while keeping the development and database under strict version control.
Thinking of such a setup
Local server hosting the source HTML5 code and database(s) - git upstream.
Development is then done by git on desktop computers
The mobile/tablets pulls the source (git origin) and creates instances that pull request the data entries to upstream (and thereby all other remotes)
Multiple units can work on the same instance and contribute to pull request data to the origin. They see changes right away (logic should assure no conflicts - thinking of pinging the devices)
No need to distribute new app via app stores if some new html5 is added (no behavior changed so no manifest violated).
Currently I'm considering making a native app that has a webview and performs git commands, but I'm fearing that I will get stuck (have no iOS programming experience). Is this overkill?
I'm not at all against the hybrid suppliers - just wondering if they will let me achieve what I aim for.
If anyone has some links to online tutorials on how to archive similar task or can provide usefull hints/pointers then I would appreciate it.
I'll upvote all answers that helped me and set the solution for the one that helped me most.
I worked some years with web technology packed into native apps. You have to consider two things.
First, your app will be just a simple HTML page or it will have fancy UIs, very dynamic UI interaction and animations? If it is complex and very dynamic, stick with native apps. The main advantage of them is the performance, it is VERY superior to WebView packaged apps in HTML5.
Second, the WebView have MANY usage restrictions. It is not like the Chrome browser that you use in your phone/tablet. Too fancy operations will likely have problems with WebView, and the extra time you've spent constructing UIs you will spend working around very annoying little problems.
Another concern, using git bundled in your app will be hard to integrate with the WebView due to its sandbox restrictions. I surely would not recommend to go that way. If you don't use the native phone hardware, like camera and others, you can show in the WebView a remote HTML5 site. It is a much more simple and secure option.
Another thing to note. These packing JavaScript libraries have different objectives. The Cordova (PhoneGap extends this with some Adobe powered features) goal is to make available to your JS code the native phone features, it has nothing to do with UI. The Ionic that was mentioned is focused on UI development. There are other libraries that are focused on UI and are used with PhoneGap/Cordova. My suggestion for fancy and dynamic UIs using HTML5 based technology is the Sencha Touch framework, that is bundled in ExtJS 6 now. Although they are paid framework and require advanced Javascript programming. The learning curve is very big.
Concluding, if your goal is faster UI development and the apps are simple, you can go with Cordova and another UI-focused framework. But I suggest to forget the complicated Git "on-the-fly" app update. If your app uses many native features and has very complex and big UIs, stick to native due to performance.
Another thing to note, well developed native apps consumes (in most cases) much less network bandwidth and battery lifetime.
I hope these informations help you =)
I might suggest looking into Ionic, it is a quote:
Powerful HTML5 SDK that helps you build native-feeling mobile apps using web technologies like HTML, CSS, and Javascript.
Ionic is focused mainly on the look and feel, and UI interaction of your app. That means we aren't a replacement for PhoneGap or your favorite Javascript framework. Instead, Ionic simply fits in well with these projects in order to simplify one big part of your app: the front end. We recommend reading Where does the Ionic Framework fit in? to get a good understanding of Ionic's goals.
Ionic currently requires AngularJS in order to work at its full potential. While you can still use the CSS portion of the framework, you'll miss out on powerful UI interactions, gestures, animations, and other things.
What I get from this is that Ionic integrates with PhoneGap.
I'm not sure how well this will help, but I think it will be useful in your search.
PhoneGap - Is as of yet, the single most comprehensive suite that allows you to leverage HTML, CSS and Javascript in a way that will give you the ability to have a single source solution and publish to the mobile landscape.
Using your scenario:
Create your application in local Webserver (Intranet)
Utilize the PhoneGap API to improve data access and UI.
Publish to GIT/SVN for versioning
Build with PhoneGap (Build Service - a cloud service that takes the zip of source code and then you choose your platform)
Publish as Private/Public to the Device Target (IOS, Android, WPhone)
In this way your HTML5 Application and your Published/Packaged App on the Devices you chose would be identical; and the WebApp and DeviceApp will remain in synch.
Useful PhoneGap Tutorials:
PhoneGap Tutorial 1
PhoneGap Tutorial 2

Developing in Android Studio versus Framework (e.g PhoneGap)

I wanted to get a more experienced opinion on something I recently found out. A couple of months ago I set a goal to build myself a mobile app, and the first thing I did was go to developer.android.com and begin reading documentation on how to go about doing this.
I've invested a lot of time in understanding Android Studio and how to make simple apps (and I'm just now getting the hang of it all), but I just recently read about frameworks like PhoneGap(which let web devs who know HTML,CSS, and Javascript make apps too).
Before learning Android, I taught myself web dev through the Odin Project, which taught me a fair amount of HTML, CSS, and Javascript (little iffy on this language, but I'm sure it's something I could pick up easily since I already have a bit of experience).
I'm wondering what you guys feel are the limitations of using these frameworks and whether I should switch over to them, as opposed to continuing with Android since things are beginning to click for me.
Thanks!
I have developed apps for both Android and Phonegap. Phonegap takes advantage of your web development experience and lets you build mobile apps with ease. But it's not a replacement for Android API itself. A good phonegap application requires knowledge about web development and Android API.
However if your aim is to develop an android application, and you are comfortable with web development and Android, I would advice to take Android API.
Phonegap as wonderful as it is for web developers, and startups who can't afford to have dedicated resources for Android, iOS separately, has its limitations.
Performance : Phonegap app's performance is not at par with a native
android application.
Functionality : As one would expect you can't have all the functionality support a native android application has.
Look : You could easily tell apart a phonegap application from a native one. Given phonegap renders all the content in a webview, the look of native ui elements is lost
I think you will always need access to the native API to make good apps.
At least the navigation should be native, so that your app has the look and feel that the user expects, and so that stuff like the back button get correctly handled for you.
Even if there is some plugin that does that for you in a perfect way, I believe it's beneficial to know how Android works.
In the end, frameworks like PhoneGap add a layer inside your app rather than removing one, and it's always better to understand what goes on inside your app.
So the time that you've spent learning native Android won't be lost.
However, it makes sense to use HTML/JS if you want to share code between different platforms.
I think this article from Basecamp shows a very compelling example: https://signalvnoise.com/posts/3743-hybrid-sweet-spot-native-navigation-web-content.

Can I make an android app using html that recieves and stores values entered by the user?

Basically, I'm trying to make use of this website called PhoneGap that recives html codes and converts them into mobile applications.
So I'm trying to make an application that tells you how much money you owe people and how much money people owe you.
IS this possible?
HTML alone isn't enough to develop your application. It's a simple mark-up language and unable to create any real functionality. But HTML if used together with javascript (which adds the required functionality) will work great for building what you mentioned.
So if, for any reason, you'd prefer to not develop a standard native application (one which is installed locally on a user's device), then another option is to build a web-based application. These have much in common with typical websites (though optimized for mobile devices) and are generally easier to build. Another advantage is that they can run on almost any device that has a browser installed, and therefore not tied to any one specific OS, such as Android. Web applications - despite not being installed on the user device - can none the less make use of local storage to save data. This is one example for when javascript is needed.
Here is a great resource for learning about javascript: http://www.w3schools.com/js/
You should read about HTML5 and hybrid apps. A hybrid app is what you are after.
Yes, you can use html to build an app with Phonegap, but you'll need JavaScript too.
I suggest the following technologies for you: Ionic, Angularjs and localStorage for recording the data.

Which approach should I take for my mobile application?

We will develop a, social network integrated mobile application which will need to access native device capabilities but 90% of the logic will be implemented in the HTML5/Javascript code posted by Ruby back end to the device. Thus, we would like to update or change the logic/GUI of the app without user involvement. We have strict deadline and have to support iOS, Android and Blackberry.
In this case, what approach would you recommend us? We considered the approaches below but could not decide since we do not have any experience with mobile development even if we are experienced in Ruby, C/C++, Java, Javascript, Flex.
Our considerations:
Develop native apps for each platform and embed the native browsers
to implement our logic, which can take too much time.
Use one of the frameworks for cross-platform development such as
PhoneGap or rhomobile. In this case, we are afraid of facing some performance issues. We would love to hear the experience of developers with those frameworks.
Use Adobe Air for accessing the device and its WebKit component for the rest.
First, I hope you understand that there is no simple answer. At this junction, having been looking at cross-platform solutions for mobile development for two years, I feel that in order to get fully native UI look, and to access all the device and UI features, one is forced to produce native application on each platform.
But, since you asked about cross-platform tools, here's a list of the main contenders:
Sencha http://www.sencha.com/products/touch “Sencha Touch is the world's first app framework built specifically to leverage HTML5, CSS3, and Javascript”
Dojo http://dojotoolkit.org “Dojo saves you time, delivers powerful performance, and scales with your development process”
Phonegap http://www.phonegap.com “PhoneGap is an open source implementation of open standards”
jQuery Mobile http://jquerymobile.com “Touch-Optimized Web Framework for Smartphones & Tablets A unified user interface system across all popular mobile device platforms”
Rhomobile http://rhomobile.com “Free and open source mobile application framework”
Titanium from Appcelerator http://www.appcelerator.com
There are plenty of comparisons online, including on SO, and this fellow actually tried to use several platforms, code included.
Anecdotally, I have seen Phonegap produce a rather iPhone-centric look, that may not mesh well with Android, plus showing performance problems when loading screens (there may be workarounds via pre-loading). Also, access to more complex devices was limited, or at least lagging. Rhomobile is a good fit for data-driven apps (simple display of large databases), but architecturally could show performance issues, so check for yourself. Personally I did not get into Sencha, Dojo seemed a little small, and Titanium showed dated architecture. So next time I'm attempting a cross-platform app, I'll give jQuery Mobile a serious try.
Let us know what you pick and how it works out.
Iam using this rhomobile rhodes for my cross-platform development App which will run in Android, Blackberry and iPhone.
We have developed application and sucessfully runned in all devices without any issues. we used ruby for backend webservice call, And remaining app is constructed with HTML5 and java Script. I didn't face any issues regarding rhomobile.
intially we faced memory issues, But later on we resolved this issue by implementing local storage for our App. For android it wont supports local storage so we used Rhom Storage only for Android Device.
Sounds like a project doomed to fail.
If I were you, I'd build a mobile-friendly site for all 3 platforms if deadline is tight. What native features do you even need, first off? If it's something like a camera, you're better off just build a native app for all 3.

developing smartphone apps using Rhomobile

I have been developing an Android application for about two months now, and the guy I'm writing it for wants me to use this instead of the android SDK so we can deploy the application for multiple smart phones: http://rhomobile.com/
he says you can write the application in one language and it can be deployed for most smart phones. Has anyone used this website to do something similar? Any advantages or disadvantages I should know about and tell him? Maybe someone could give me a better explanation on what this really does.
I'm current a one man army. He wants the application out for most smart phones but can afford to hire more developers.
Rhomobile will start up a small webserver on your phone and then show a webview that is directed to this webserver. You are able to write all the application logic in ruby in a way you would do it if you would write a web app that is deployed on a real web server. Rhomobile uses CSS etc. to have the app look look a little bit like a native app.
If you know Ruby you will get an App fast but it will look crappy and the user experience will be crappy too. A similar framework is appcelerator titanium they will let you write the app in Java Script and then compile it into a mix of javascript, webview and native components that run on an Iphone and on an Android phone and titanium has a much nicer user experience then rhomobile.
Visit their pages and test some of the apps that they are promoting as showcase for their frameworks.
As many developers writing apps in Objective C have learned using HTML for the view and styling with CSS styling libraries is a great way to create attractive native apps. Rhomobile's Rhodes uses this approach as well. We used to let people use whatever CSS they wanted and they could choose to use IUI, JQTouch, IWebKit, WebApp.net or any other library along with Rhodes. The best external apps all seemed to use JQTouch for styling and animated transitions.
Recently we decided to ship with our own fork of JQTouch (which we made work on Android) in order to make this even easier. The recent Rhodes master branch created apps with JQTouch builtin makes such attractive apps even easier to build, as the stylesheets are included with Rhodes scaffold-generated apps.

Categories

Resources