basically i have a site which made by php and mysql
i wanna to develop a iphone webapp (non-native app) to interact with my new mobile site (php+mysql)
im not sure how iphone webapp work, can it include the whole site directly??
im quite worry about the connection with mysql database too
is it possible to do that?
can i develop the mobile site as normal web page?
A “mobile web app” is just like any other web app. There is no difference except that the way it looks is optimized for a smaller screen. It’s just a web page which means the PHP is running on the server (not the device). The iPhone is able to run javascript and render CSS 3 which is nice because it makes it so you can make your website look and feel as if it were a native app that was downloaded and installed by the user.
The iPhone even allows you to “save a web page to your home screen” which is essentially the same thing as saving a bookmark (nothing is actually downloaded or installed), but it adds the ability to create a full screen web app.
However, you may be talking more about creating a native application, built using web technologies. A native app is actually downloaded and installed on the device. Native iPhone applications run Objective-C. They do not (and cannot) run PHP. You could write an iPhone app using Objective-C which uses a “web view” which pulls up your website by default, however, all you’re doing is recreating the “save to home screen” app that I mentioned earlier. The only advantage is that you could potentially list it in the App Store.
There is a better way to create a native app experience using web technologies…
There are a number of libraries, tools, and companies that are popping up that address this very issue.
jQuery Mobile and Sencha Touch are both JavaScript frameworks for building web pages/ web apps that look good on a mobile device.
PhoneGap is a tool/framework to be able to take your HTML, CSS and JavaScript and package them up as a native app.
Appcelerator Titanium is a framework that allows you to write JavaScript that you can compile into native UI components.
Whichever approach you choose is up to you and what you want to accomplish. The key to remember is that the PHP code only runs on the server. JavaScript is used to run code on the client. And if you were going to package your website up as native app, you will most likely include a lot of your HTML as static templates and use JavaScript to pull data from the server and populate your HTML templates.
I would recommend starting with jQuery Mobile.