Http://www.blogwind.com/Wuvist/65217.shtml
It takes two months for the iPhone SDK to come out ...... To develop an app for the iPhone, the only official recommendation method is to develop a web app ......
The charm of fruit cards is infinite ...... Even with browser limitations, there are still a lot of amazing iPhone web apps ......
Facebook's iPhone version is just like a native app ...... Well-deserved best iPhone web app ......
This is probably because mobile safari on the iPhone is strong enough ...... It's really tough ...... Modern browsers support all of them ...... If you want to be picky, I can say that its JS execution speed is too slow ...... But this is a processor issue ......
As long as there is enough technology to imagine, the iPhone can provide a very beautiful stage ...... Google's mobile phone platform, adroid, uses the same browser as the iPhone ...... By the end of next year, iPhone web apps should be able to shake themselves into gphone web apps ......
Hand
Machine native programs can certainly enjoy what various web apps cannot do ...... For example, 3D, local storage, etc ...... But there is a price ...... Windows Mobile/
Sybiam/iPhone/adroid. Do we need to maintain four program versions? In the case of Web apps, we believe that they will be able to be fully protected in the next few years ......
The world in the browser is already amazing ...... I am very confident in the development of Web apps ......
Far away ......
When developing iPhone web apps, I am very happy most of the time ...... Because I only need to take care of a mobilesafari browser ...... I don't hesitate to use the cool CSS effect like-WebKit-border-image ......
But mobilesafari also has bugs ...... The most confusing CSS bug is that it cannot display a fixed position on the page.
Something ...... For example, menu ...... However, it is critical to display fixed elements on the page and navigate to the iPhone for user interaction ...... CSS cannot be implemented. What about JavaScript? Miserable
The user cannot drag the page ...... There should be other JS technologies to handle this ...... However, this is a bug ...... I believe this bug will be fixed soon ...... I personally think
It's hard to put effort into bypassing such a bug ...... At least Facebook does not ......
Facebook is a great company ...... Its iPhone version is cool ...... And its developer joe hewitt (don't you know? Firebug author is also !) I switched the IUI engine on the Facebook iPhone to open-source ...... IUI is very good, very powerful ~
Because developed web apps include im, using Ajax is inevitable ...... In fact, I used a large amount of Ajax ......
It took a lot of effort to select the Ajax library ...... The final choice is jquery ...... The main reason is that they are used to the common web ...... It takes some time to get started with another database ......
At the beginning, I hesitated to worry that jquery is too large ...... Fear that the iPhone cannot resist ...... Actual test results ...... Using safari to run jquery ......
Another measure is the support for oo ...... Jquery represents the development philosophy of event base ...... Oo is not the choice of jquery ...... This was mentioned in a speech by John resig, author of jquery ......
Even
The web app is relatively complex ...... If Oo is not followed,
Worried about code maintenance and extension ...... But then I was relieved ...... Not non-oo ...... The most important thing about code quality is the skill of the programmer ...... If Oo is a magic knife ...... Some people
"Even if you have a knives in your hands, you cannot become the gods in the knives "...... Besides, it doesn't mean that jquery cannot be used ...... I can use other libraries, such as prototype and mootools, to find out what they support for oo ...... As for $, I still think jquery is awesome ~
If jquery is not used to it, I will probably choose mootools ...... Because it is lightweight ......
The JS library that has special support for the iPhone is called dojo ...... While dojo also supports comet ...... Cometd
It's from the dojo Foundation ...... Even the web app contains the Web
Im, it seems that dojo will be the right choice ...... But I finally gave up ...... It's too big ...... If I use dojo, everything may be based on dojo ...... Even if the server
The server does not need its cometd. I still need to use its Bayeux protocol ...... After reading the Bayeux protocol, we were dizzy ...... This thief boat is too big ...... When it goes up, it won't come ...... Therefore, dojo is the first JS library to be excluded ......
Not a uidesign ...... The whole web app was developed for about two months ...... However, it takes another 2.5 person-months for optimization and modification ......
It's slow to run JavaScript on iPhone ...... Although you have been careful with efficiency during development ...... But the results of the first version are not satisfactory ...... The main reason is that for the first time, we were engaged in such a complex web app and lacked experience ...... Therefore, I have made some effort to optimize some modules. Some modules are almost rewritten ......
Jquery $ is very powerful for CSS selector ...... However, powerful functionality does not mean it is fast ...... At the beginning, I even select a bunch of elements and then use each ...... Slow, just a word ...... Later, I tried to rewrite all the methods ...... The difference between efficiency and efficiency can be dozens of times ......
On the UI, I am happy to use IUI ...... IUI and jquery coexist well ......
In general, the biggest problem with iPhone web app development is user operations ...... In fact, this is one of the first points in Apple's Development guide ...... Understand user-iPhone interaction ......
It
The display area is only 320x396 at most ...... Then there are landscape screens and landscape screens ...... Mobilesafari address bar display, hide ...... Enter the keyboard to open or close ...... Design Considerations
This situation ...... If you want to make a dynamic prompt when the user inputs ...... Remember that the keyboard is opened when the user inputs it. Do not place the prompt in a place covered by the keyboard ......
Pure finger touch screen operation ...... This means that all the clickable elements (buttons, etc.) on the screen must be large enough, and it is best to be far apart ...... It is best to have only one row ...... Otherwise, it is easy for users to make mistakes ......
Of course, we can also choose to follow the iPhone's UI style ...... There is a title at the top, and a maximum of two buttons beside the title ...... Then the official content adopts the list style ......
But the problem is that the iPhone itself has a home button that can be used ...... Web
No app. When you press home, you can exit safari directly ...... Another key issue is that mobilesafari's Page scrolling is the Page scrolling by default ...... You cannot let users just roll
Move a DIV/iframe in the page, and keep other parts unchanged ...... (Well, in fact, you can scroll only one Div, but you only need to use two fingers !)......
This means that if the web app is complex enough (for example, this is developed occasionally), you cannot copy the Apple style ......
In general, developing an iPhone web app is very challenging and comfortable ...... Web + mobile phones are currently the most popular development topic in the next one or two years ...... In this situation, where is the hero?