is it possible to develop hybrid application without using phone gap or quick connect? - iphone

I am new to this iPhone development.I would like to create a hybrid application or iPhone.I want to know is it possible to develop hybrid application without using any of the external frameworks or libraries like phonegap or quickconnect or titanium .I just want to know is it possible to create an hybrid application with just HTML file JavaScript files and CSS file and x code?

The idea behind phonegap (can't stress this enough titanium is NOT the same), is that a webview is created in the app and the HTML, CSS, javascript etc. is added to this. Then some other logic allows you to access some of the underlying features like the camera.
So creating a native iPhone application where you create a webview and code the HTML is basically the same idea (as phonegap not titanium, titanium cross complies into native code).

Related

Is Titanium's HTML5 (and JS) really native?

I'm a little confused about this. Titanium is bragging about being able to style with CSS, program with javascript and create with HTML5, whilst making the final product native to the platform. How is this possible? If I'm writing in JS/HTML/CSS then won't they be run within the browser? Making them non-native?
See jhaynie's explanation of how the Titanium Mobile SDK is used to compile to native code. In essence, the Titanium Mobile SDK creates a mapping between their APIs in javascript and the native APIs of the target platform.
Titanium code are written in core JavaScript and code is then converted into native code(i.e. objective c or java) But when you use HTML and CSS into titanium you need to render them into "WebView" a browser without address bar. So in that sense titanium is completely native.
You code a Titanium Mobile app in js using their API that 'bridges' your code to the native API.
You don't use html/css at all unless you want to include a webview with local content.
It's possible you are looking at old documentation. Titanium used to use HTML/CSS/JavaScript for creating applications which did not use native UIs but as of 0.9 is more of a JavaScript abstraction of a generic mobile device. This means you won't be using HTML or CSS to build your app and the process bears little resemblance to building a web app. Other tools like PhoneGap use the web app model in place of a native UI.
That said, you can create a web view (in-app web browser) in Titanium which you can use to show HTML5 content if you so desire. Also, as of Titanium 1.5, you can also use a CSS-style language called JSS to separate your JavaScript application model from your content.
Apple iOS has a "WebView" which is basically a browser window under control of the program. They take your code, plop it in to a WebView and wrap some infrastructure around it, and compile and ship it as a "native" program.

How can I develop an iPhone app in HTML5?

I have seen a blog which claims that we can develop iPhone applications in HTML5. Untill then I was aware about Objective-C on Mac.
Can we develop an interface with backend support application in HTML5 on iPhone? Will it be secure and scalable?
If HTML5 is a markup language, then how can I make conditional statements in it? Would it be via jQuery or Javascript?
Which IDE should I use to develop an iPhone app in HTML5?
A great place to start when developing an iPhone app in HTML5 is PhoneGap.
You could either go the full-blown app route by developing an iOS app using PhoneGap, or only selecting certain tools/frameworks to help build a web-based app for mobile devices.
And very much like how it works with websites, HTML is used for the structure, CSS for presentation and JavaScript for behaviour. So yes, JS is used for conditional statements, etc.
Yes.
You can develop an HTML5/CSS3/Javascript app, then wrap it in PhoneGap or Apache Cordova to make it native and put it in the App Store (or Android Market...), as well as publish it on the web. You can do this with whatever tools you're comfortable with.
Using a tool like PhoneGap has many benefits over browser-based Mobile Web Apps, such as allowing you to parse iPhone contacts and access the local hardware.
It's great in combination with jQuery Mobile, but since performance is a MAJOR issue you must be very cautious to really streamline your images, CSS, and Javascript.
See this link to learn more about Mobile Frameworks.
I have seen a blog which claims that we can develop iPhone applications in HTML5. Untill then I was aware about Objective-C on Mac.
If you want to write a native iPhone application, then Objective-C is your only option. However, as the iPhone’s web browser has a lot of capabilities (e.g. offline caching), you can develop applications that run in its web browser, as opposed to natively. They can’t access all the features of the iPhone, and they are simply websites (so you need a server to serve them), but before the iPhone SDK was released, Steve Jobs himself described web apps as the way to write software for the iPhone.
Can we develop an interface with backend support application in HTML5 on iPhone? Will it be secure and scalable?
I have no idea what that means.
If HTML5 is a markup language, then how can I make conditional statements in it? Would it be via jQuery or Javascript?
Correct: JavaScript. (jQuery is just a JavaScript framework, and it’s probably a bit heavy to use on current iPhones.)
The HTML5 spec blurs the distinction between HTML and JavaScript by defining the DOM interface for the HTML elements it specifies, and defining new DOM features (e.g. offline caching) that aren’t technically part of HTML. Apple (and other people) have further blurred the term “HTML5” by using it to encompass various CSS features like animations and transforms, which you’ll probably find very useful for making web apps feel more like native apps.

By using PhoneGap can we convert iphone app to android app?

Can we build an iphone app and convert the application to the android application using phonegap framework?
I have been through various links.
We basically need to develop a webapp for that and that can be converted to an android app or an iphone app respectively.
I am an iphone application developer and i am not at all familiar to android.
Links or example code would be greatly appreciated.
PhoneGap will not enable you to "port" an existing iphone application to Android. However, if you develop an application within the PhoneGap framework (which means using html, css and javascript), you will be able to deploy it on multiple mobile platforms such as iPhone, Android, Nokia, Blackberry, etc.
The downside is that you will eventually be developing a packaged mobile website - your application consist of html pages, css styling and javascript behaviour/logic, combined whith access to phone internals such as gps, disk, database, camera, etc. It will usually not "feel" fully native on most platforms. For example, you will not be using the system's "native" ListView.
There are javascript libraries such as JQuery-mobile, JQTouch, etc, that make your application look nicer on mobile devices, but it's still not as good as the native experience.
The app you build will not be a native Android or IPhone app but a HTML Web App wrapped in the PhoneGap wrapper and packaged into a native app. So yes you can build for both platforms as long as you build a Web App
Edit -(a Web App is just a plain html/css/javascript + server-side(php, asp etc) website)

Is there a way to automate conversion of web app to iphone or android native app?

I came across this link:
http://ofps.oreilly.com/titles/9780596805784/
which seems to suggest web app can be converted to native iphone without writing a single line
of objective-c code. But the book mentioned there is outdated now and things may have changed a lot.
Are there open source software that will allow me to automatically convert my web application to native iphone ( or android) application? By the way my web application is html5 canvas based animation application with lot of html and css as well.
PhoneGap doesn't generate native code for you: it creates an application consisting of a WebView and throws your HTML code on it. From personal exerience I can add that the performance is quite slow, on both iPhone and Android, compared to a native app.
jqTouch creates a nice way to access your web application, but the application remains a web application residing on your site, plus you have to use some jquery for styling.
Apparently the only one that actually does generate native code is Appcelerator Titanium. On RhoMobile I never managed to get to the point to actually write some Ruby code because you have to know all the Ruby in he word just to install it on your Mac.
So the verdict was to sit down and develop the app in objective-c.
Have you looked at PhoneGap?
Simple steps to put your html app into iOS native container, without coding:
Download xCode
Download simple web view app from https://github.com/nomtek/iOSWebViewApp
Open simple web view app within xCode
Add your HTMLs to the project file structure
Run your app and voila :)
This approach is good if you don't need access to any phone specific features, just a standard Web View. Loading time will be short as this approach doesn't load any extra libraries.

phoneGap/Titanium developing

I was looking into PhoneGap and Titanium framework, and I did not clearly understand how to they work, let's suppose I have already developed an app for android or iphone, can I run this app on another mobile with a different OS with PhoneGap or Titanium help?
Or I have to develop again my app with PhoneGap/Titanium framwork?
In this case I have full support at all the features like thread, JSON or XML parsing and so on?
Thank you
PhoneGap basically takes a client-side web app (HTML, CSS, JavaScript) and wraps the whole thing in a native device's web view control. You can hook to some of the device's native functions, but as you can guess, it's pretty limited compared to native development. But easy, and brings in a whole range of skills that a lot of people already have. That's really the appeal of PhoneGap.
Titanium is also html/javascript oriented, but it actually claims to compile to native code. Their sample "kitchen sink" app demos quite a lot of the native APIs, at least for the iPhone. I doubt you'd be able to deal directly with threading, but JSON for sure, and I'd think XML as well.
Titanium has full support for JSON or XML parsing.
You can see Titanium examples - Kitchen Sink - for more details.
The idea behind phone gap is that you can take a browser based client app that is written in html/css/javascript and use phonegap to gain access to some native mobile hardware like contacts, gps, accelerometer, etc. Phonegap allows you also to build this web app for different mobile devices all using the same web app code.
To answer the first part of your question, no, you would not be able to take a developed app and use PhoneGap or Titanium to run the app on another device.You would have to write the app in either the PhoneGap or Titanium Framework and then build the application to the devices you want to support through the tools that each give you.
For example, you would write your code in JavaScript(Titanium) or HTML/CSS/JavaScript(PhoneGap), then use the app's build tool to create the file that would be released onto the phone.