While the entire Internet community continues to discuss from all sides how to adapt the iPad for work, I would like to return to the iPhone. By profession I am a programmer and I love new technologies. And I really wanted to make an application for my phone, but somehow the soul to Objective C does not lie for now, and so far there is no MacBook with a developer license. And I wondered if I could write something using the knowledge of html and js. It turned out that yes, and very many ways. About them - under the cut.
Method one is simple and tasteful.
Of course, you can just write a web site and adapt it. About it on Habré
already wrote . I would like to add two things to what was written in that article.
First, with the advent of html 5, the opportunity to work with local databases appeared. And all the browser on the engine WebKit (of course the latest updates) already
support this feature. Working with her is more than easy.
db = openDatabase( "TestDB" , "1.0" , "HTML5 Database" , 200000);
* This source code was highlighted with Source Code Highlighter .
The following parameters are passed to the database creation function:
- Database name
- Her version
- Display Name
- Size in bytes
Next, open the transaction and perform the actions we need.
db.transaction( function (tx)
{
tx.executeSql( "DELETE FROM tbl_test WHERE id = ?" , [item.id]);
});
* This source code was highlighted with Source Code Highlighter .
')
Secondly, it is worth mentioning the offline mode of operation by creating a manifest file. Details on this can be found on the
Apple website.
In short, what it is. The manifest is an ordinary file, the same as, for example, css or js, which contains information about the application cache. When you first visit the page, the resources specified in this file are cached.
Now, how it looks in practice:
1. Specify the link to the file on the page we need
< html manifest ="demo.manifest" >
* This source code was highlighted with Source Code Highlighter .
2. Create the file itself
CACHE MANIFEST
demoimages/clownfish.jpg
demoimages/clownfishsmall.jpg
demoimages/flowingrock.jpg
demoimages/flowingrocksmall.jpg
demoimages/stones.jpg
demoimages/stonessmall.jpg
And after that, everything works. You can work with the cache - update it, handle events and so on.
I really liked all this, but I wondered if there were any special frameworks. It turned out there.
Method Two - jQTouch

About
jQTouch already
written a little. I want to tell a little more about what he can do.
jQTouch - This is such a plugin to the famous jQuery javascript framework, which makes it very easy to create web applications for touch phones - phones with a touch screen, and with finger-oriented interface. What is the iPhone. As well as HTC Hero, Dream, Magic - on Android - and a bunch of different WM-communicators with shells. © ( original )
I will list the main chips:
- Very easy to control the behavior of the component.
- You can create topics
- There is little interaction with the phone - for example, you can find out its orientation.
- Animation and various iPhone interface chips are supported.
- This is jQuery and that says it all.
The plugin is very nice, but still at the output we have not a full application. Why? We do not have access to such things as an accelerometer, vibration, sound, and so on. After that, I again climbed into Google and found such a great thing as
PhoneGap .
Method Three - PhoneGap

The essence of this framework is that by writing an application once with html and js, we can translate it into an application under the desired platform. And it supports platforms like these: iPhone, Android, Blackberry (OS 4.5), Symbian, Windows Mobile, Palm, Maemo. In the case of an iPhone, we again return to where we started - we need a MacBook, a license, and everything. But the framework is still great.
Below is the roadmap of this project.

A nice bonus of this product is the presence of a
simulator on which you can test the written application. I recommend to put and play.
The need to broadcast a little strained and further searches brought me to rival PhoneGap -
MotherAppMethod Four - MotherApp

The essence of this project is as follows:
- We write the application using the proposed js-library
- Install everything you need on the server
- And most importantly , giving the link to your application to the guys from MotherApp, who all translate for us

As you can see, the service is well monetized =)
But seriously, quite serious and powerful in its capabilities thing. Under the
link is a list of features with pictures.
As one character said, it becomes more curious and curious. Already out of sports interest, I found almost what I was looking for:
- The ability to write in html and js
- Total lack of broadcast
- Ability to use phone features
And as always there was one thing. First you need to put a separate application on the iPhone to start your own. And I'm talking about
Big5 .
Method Five - Big5

It's still easier here.
We write our application using js-library, download the application from appstore and enter the address of your site.
In its essence, big5 is an alternative browser, but with access to the phone’s native functions. The big question is how Apple will react to this and whether the fate of
PhoneGap will repeat here. But the fact remains that by writing a web application, we end up with a full-fledged application for iPhone. How full it depends on the user, as in the app there are two versions of the big5 application: free lite and paid for $ 10.
On the website big5 it is stated that the development for their application is just web development, so all that was described in the first paragraph is also true here.
Well, in the end, I want to introduce another candidate. But he, perhaps, will appeal more to those who chose Ruby on rails. So meet -
Rhodes .
Separate method - Rhodes

This product is partly reminiscent of the process of its development, which is presented below, MotherApp.

Rhodes works with all native things again, right down to the file system. It supports the following platforms: iPhone, Windows Mobile, BlackBerry, Symbian and Android. The language of this framework is very similar to ruby, so rubies go for it. So far it is difficult to find any reviews.
And at the end, I’m going to recommend a book from O`Reilly to those whom this topic will take -
Building iPhone Apps with HTML, CSS, and JavaScript
Making App Store Apps Without Objective-C or Cocoa . The link is its official electronic version.
Thanks for attention!