phonegap vs objective-c web-kit - iphone

Can somebody tell me what are pros and cons when developing with phonegap or objective-c and web-kit. In other words, if you want to develop (html,css,js) based application is it better to develop it in phonegap or in objective-c with

First, google "Native vs web-app". There are several good guides and comparisons out there, and much of what you will do in phonegap is in the web-app domain. The pros with using web-technology is that it is easier to port to other platforms, it also lets you use HTML, CSS and Javascript some Apache declarations and other snacks that probably will be relatively stable in the years to come instead of learning Objective-C, Java and a lot of APIs. One of the great things about native apps is speed (perhaps not the biggest issue for most applications), it is also some functionality which can't be achieved through the browser or web-app runtime (that's where Phonegap tries to fill the gap). Also, the developers of each of the various mobile-OS make a lot of convenient shortcuts and tools which you perhaps would have to emulate through web-technologies.

Related

Cross-platform mobile app & RESTful web service & scoring algorithms - architecture & technologies

I am planning to create a cross-platform mobile app that has native-like versions for most mobile platforms, maybe Windows Phone, Android, iOS. It's supposed to store data in DB on server, and the mobile app is mostly for visualizing that (numerical) data.
Basic usage scenario
User opens the app
App data is refreshed via internet connection
User inputs new data
New data is sent to server, handled and DB updated
User's app data is updated according to DB data (ANIMATION!)
User updates settings on his app that alters it's behaviour.
I'm a noob when it comes to designing and programming mobile apps + web services alone, so I'm hoping you could help me with the following questions. Technologies I'm most familiar with: Java EE, Python, HTML/CSS/JS, MySQL, Graphics. Maybe I should go for PhoneGap? Thanks a lot!
1) What cross-platform mobile technology you would recommend?
2) What kind of solution would be most suitable for server/app server? (Estimated code lines < 5000)
3) What's a good place to start learning scoring algorithms?
Please respond if you have answers to any of the questions asked.
EDIT: found a similar question: Cross-Platform Mobile Application Solution
#thevangelist: It's a very good question you have raised, all mobile developers face the same problem when we start writing an app. Today there are multiple Open Source Frameworks available in market which are trying to solve the same problem but in different manner.
Based on my research and experience, I would like to recommend below technologies which we can consider while building an mobile apps.
View: View is an important part of any mobile apps. When we start building UI/UX we also have consider it's platform design principles. Looking these points I would like to recommend React Native for the same.
React Native: It is a Facebook, and Instagram developed JavaScript library used in creating native mobile applications. It allows us to write iOS and Android applications using JSX, a known HTML look-a-like code, and JavaScript. It is based on “Learn once, write anywhere” methodology.
Pros
Renders native views with a native behavior and interaction … you’ll end up with a real native application
Has a paradigm of “Learn once, write anywhere” where developers only need React and JavaScript to create better application for Andoroid, iOS.
Uses native architecture and concept
It does not require a WebView
CSS Flexbox is used for layout design
Cons
Code abstraction leads to bugs and memory leaks
Cannot work without the API, which is provided by React Native, technically there’s no fallback like with classic hybrid mobile apps
When creating proper native applications, a developer will have more power and control regarding performance tuning
React Native is still a new framework so we can’t predict possible problems and downsides
These cons are somewhat negligible, especially if we consider that React Native is empowering more and more native applications with each passing day.
Data in Transit: If your app sync data from web services, then there are multiple frameworks available in the market to make our job easier. Please find below some of the most popular JavaScript RESTful Frameworks:
ACTIONHERO, StrongLoop
Data at Rest: You would also be needing offline storage for the sync data. Since we do not have direct support for native SQLite in JavaScript, we need to use some of the React Native SQLite Plugins. Please find below plugins which are available in the market:
almost, andpor, jbrodriguez, ramsundark5, remobile
For Data at Transit/Data at Rest, I would like to recommend Siminov Framework which is available on all the major platforms (Android, iOS, Windows). It also supports hybrid technologies such as React Native, Cordova, Xamarin.
Pros
Available on all the major platforms (Android, iOS and Windows)
Easy to configure, it provides standard xml based structure using we can easily configure our app database
It allows developers to bind ORM with remote RESTFul web services too
Also have support for SQLCipher on all the platforms
Cons
Lack of community: Recently they have launched their products on all the major platforms, not many people are using it.
Since the configuration is based on XML structure which looks pretty old to me. But based on their documentation it was done to support all the major platforms
Algorithm: I have found this link nurlybayevaAMS9 related to algorithm, hope this may help you.
Try avoid writing cross platform application. It is doable using HTML5+jQuery. But you can never get the same look and feel as native app. secondly windows, ios and android have their own look and feel and will come up with their own elements. You can never cater to all three having same code base. Better is to code using native sdks.
1) Never used PhoneGap, although aware of it, but don't forget to consider a simple HTML5 application. If possible, this would save you lots of work and maximize compatibility.
2) You can develop great RESTful webservices with both Java EE (see JAX-RS/Spring) and Python (see django). The choice is really more a matter of personal taste.

Is Titanium bugfree? and is it equally compatible for developing iOS apps as XCode and Objective-c?

Few days back i was pretty much sure that Titanium is a great IDE for developing iOS apps but in last few days i have gone through few articles about Titanium and some of these articles pointed that Titanium is not fully featured for iOS development and it is buggy as well.
SO i came here to my StackOverflow friends to know is it true? does someone really faced any problem or encountered any bug while developing an iOS app using Titanium.
Please Advise about should i use it or should i go for Objective-C?
Thanks.
I believe Titanium is probably more buggy than native Cocoa Touch libraries and is, by definition, not fully featured as native Objective-C development.
The main question before you choose your development way is: will you in future ever consider to port your iOS application to Android? If the answer is 'yeah!' and you don't know Java, but you are more familiar with web technologies like CSS, Javascript and HTML/HTML5 rather than C/C++/Objective-C, I think the natural choice should be Titanium.
On other hand, if you're quick in learning new languages and have some good experience with C/C++, Objective-C is the way - later on you probably can quickly learn Java and jump into Android platform.
Second criteria is: is Titanium capable of delivering UI/UX you'd like to have in your apps? Titanium successful stories can help you answer that question - Titanium: Applications Showcase. Also try many native apps check what they offer. Compare and make decisions.
Important: I've never tried Titanium myself. I just face the similar dilemma as you. I want to extend my mobile app dev skills into Android world and consider Titanium as one of ways to go (I know basic JavaScript/CSS/HTML5, but not Java).
EDIT: I've just checked out your profile and it seems you're coming from Android world. I'd add to my answer: if learning Java was easy for you and you're already familiar with ups&downs of Java development for Android, learning Objective-C should be easy. The main difference is that in iOS you have to manage memory yourself and it can be a little painful.
Some good stuff:
1. Memory Management Programming Guide
2. Learning Objective-C: A Primer
3. The Objective-C Programming Language
Titanium basically uses JavaScript for developing application in iOS and Android. If you are comfortable working in JavaScript and CSS you can try Titanium.
Its my personal opinion, try learning Objective C, its really great language. If you have knowledge of C or C++, then understanding the concepts of Objective C becomes easier.
Try Objective C, you won't be disappointed.
I'm using Titanium (and have been playing with it for a few months) and can say with definitive emphasis that it's buggy as hell. :-) If you're looking for a single-platform solution, ie only Android or iOS, and plan on only supporting that single platform, it's a no-brainer to avoid TiStudio.
What Titanium is trying to do is to abstract and simplify the underlying nature of the platform you're on. It doesn't do this fabulously, but for simple apps, I've had lots of success.
That said, because it's attention is split amongst three (with Blackberry support incoming) platforms, it will always lag behind the native dev systems, and always lack in advanced features. That's the trade-off.
All that said, TiStudio is lightyears better than TiDeveloper (Appcelerator bought Aptana and is now in the process of integrating Titanium development with the Aptana IDE), and they're really working hard to make the platform top-notch.
I've landed on it as a platform due to my abject hatred of Java (after two months trying to relearn Java using the native IDE path) and my desire to do cross-platform development. I'm also confident I can route around the Titanium bugs/flaws as I'm basically writing my own app development framework on top of the Titanium SDK, so I can automate things that suck, fix errant behaviors, etc. It's a lot of work.
But that's basically where mobile development is right now. You pick your poison. Stick with a native SDK and be locked into one platform and have to deal with an annoying language (both Java and Objective C are ancient by modern Python/Ruby/whatever standards), or try something like Titanium which offers simplicity and a more flexible language, but is less tightly integrated an more buggy.
Best of luck!

Reuse code in iPhone, Android and a Web applications

I'm about to develop an app for iPhone, Android, and for web too. I think there must be some "standard" way for doing this, in order to reuse as much code as possible.
Which is the best way for doing that? Webservices? (only if the app uses internet) Maybe an API? Another way?
Just for the record, the web application will probably be developed in Ruby On Rails 3.
Thanks!
There are a few cross platform development tools out there that let you write once and compile for multiple platforms. I know I've seen questions on both tool here on SO, so others might have some good advice on these specific products.
PhoneGap
http://www.phonegap.com/
Appcelerator
http://www.appcelerator.com/
Barring that, if you are looking at doing native development on each platform, the web services APIs are a good way to go. I've built an App that is heavily data driven, and I built out RESTful services over JSON that do the heavy lifting for the iPhone, Android and Web versions.
There still is quite a bit of work that goes into implementing a feature on each platform, but once I architect code on one platform the hard, creative work is done and it's just porting it to the next platform (Same applies, mostly, to the graphics as well). Since I am coding for each platform individually I do try to take advantage of both code and UI conventions for that platform to give the user a native experience (say building menus for the menu button on Android, something not supported on iPhone). To me that's a benefit of developing for each platform individually, however, it also greatly increases time to market for each version.
Since you're looking at Objective-C, Java and Ruby, 3 completely different languages, there's not an easy way to develop a shared library without using a intermediary layer like those linked above.
Well, all three are different languages, so anything you write for one won't work for the other. An API on a server may be able to get you the same data to all, but its highly unlikely that you'll get any reusable code. I'm doing the same thing, and realize that, so I am just sharing common things such as UI and code-design between them.

Make Phone Applications Across All Operating Systems [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Write once deploy on Windows Mobile 6, Windows Phone 7, Android and iPhone?
Currently I have created a 2 simple apps for iphone and 1 for windows phone. When I go to promote these apps they usually....well do you have this for android or blackberry or whatever.
Do I have to rewrite my applications in every environment in order to have them compatible across all the operating systems out there? Is there tools that address this or do you guys simply recreate the app in eclipse, xcode, visual studio etc..?
Complex applications generally need to be created with the native environment.
Simple applications can be created with cross platform tools like Titanium and PhoneGap:
- http://www.appcelerator.com/
- http://www.phonegap.com/
#Fraggle (see comment)
I have quite some experience with Appcelerator Titanium. The choice for native v.s. cross-plafrom completely depends on the kind of application you need and your knowledge. General considerations:
Can the application be created with web technologies like HTML, CSS and JavaScript?
What language / environment do I know the best (native vs web technologies)?
How much time and money can I spend?
Do I really need cross-platform compatibility?
Most mobile phone applications only provide an easy interface for internet services like news updates, traffic info, social media and video. Those applications can be easily written with web technologies. Therefor most mobile applications can be written with tools like Titanium. The great thing about Titanium: Get the native experience on multiple devices while only maintaining one code-base. Cheap way of developing cross-platform applications.
Many developers use Titanium because they don't know the native language (objective-C / java), but they have extensive knowledge about web technologies. This way they can create pretty nice applications without learning new languages. Titanium is actually used for many non-cross-platform applications.
Complex graphics, device specific tools and complex interfaces still require the native environment.
Native applications will always perform better and use device specific features, but do you really need that degree of perfection? Yes, develop native applications for every device. No, simply create one cross-platform application.
Check this page to see what Titanium can do:
http://www.appcelerator.com/showcase/applications-showcase/
You may be able to use a third party tool like http://www.phonegap.com.
There are many options for cross-platform app development, but I would suggest Adobe AIR as it is also supported on the Blackberry Playbook by RIM. As far as I know, it's the only cross-platform runtime that is supported by a major platform owner.
I have also seen it do well on Android, and iOS support is also advertized.
Well there are definitely some supposed "write once, run everwhere" solutions out there. Here is one from RhoMobile which specializes in this space. But that is just what a quick Google search turned up. I haven't tried any of them.
I had an app that was developed for Android, and I ended up essentially re-writing it in Objective-C when I wanted to port it over to iPhone. It worked out pretty well and took less time than I thought (considering I hadn't done any iPhone programming prior). But now of course I have 2 code bases that I have to maintain and when I add features I'll have to do it for both the Android and iPhone version.
So having a single code base that lets me build apps for multiple platforms would be great. Do any of the tools out there work well? Not sure. Do they give you full control to make your app look and operate the way you want it, and make us of all the OS's features? Not sure.
Qt (now owned by Nokia) is another provider of a cross platform mobile framework
http://qt.nokia.com/
Even though iphone and android seem to be missing from their official Supported Platforms list I think there is an Android 2.3 release just around the corner. Qt for Iphone also seems to be in the works.
HTML5 may be one solution if the app you providing is simple enough. Google is doing it this way. Otherwise, even you have anything "cross-phone" it may still feels alien.

PhoneGap vs. Titanium

PhoneGap and Titanium allow you build native iPhone Apps based on HTML and JavaScript.
Has anyone gained experience with both? What are the differences?
There is a pretty lengthy discussion about PhoneGap VS Titanium (and Corona) on StackOverflow already that might be useful.
One of the big differences is that PhoneGap is MIT licensed and Titanium is (just recently changed) Apache licensed.
This article is a good summary of the practical and philosophical differences. Note its from an Appcelerator evangelist, but I still think its pretty impartial. In fact I think he shares Titanium more warts that I probably would :).
http://developer.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap.html
It's probably worth following the current Apple/Adobe spat, in which Mr Jobs has put the future of products that aren't written in language XYZ in the balance. OS 4 SDK states:
Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).
I believe Titanium is affected by this.
Well..! this is not certain that which is better to implement the project.
Both technologies are new and having their pros & cons as well.
Titanium says to keep native environment with the help of java Script Based framework, on the other hand the phoneGap provides everything inside the WebView, you only need to put your web based project having index.html inside the WWW folder, found in the project directory structure of the Project.
So if you comfortable with Web Works, phoneGap is suitable in this case otherWise you should go with Titanium.Its easier to use and fully facilitated.
Unfortunately Titanium is not opensource anymore. You can develop apps freely but You have to buy Indie account to publish an app to appstore which cost some money.
PhoneGap is a free and open source framework that allows you to create mobile apps using web APIs for any platforms (iOS, android,windows, Blackberry etc) you think of.
Titanium: Is a cross platform, where in the code you write in JS and Titanium API's will be converted to native code and look and feel of the app will be same as native apps.
PhoneGap: Is a hybrid platform, where in you write the code using web technologies like JS, HTML and CSS. Which uses web views present in the native devices to render the UI. Look and feel is not same as native apps.