I want to create a mobile application and from a tutorial I have been looking at, a single page is loaded and subsequent content is inserted into the first page via Ajax calls. In addition, the back button keeps track of the page history.
我想创建一个移动应用程序,从我一直在看的教程中,加载了一个页面,后续内容通过Ajax调用插入到第一页。此外,后退按钮可跟踪页面历史记录。
I know that I am not doing page loads by using Ajax and was wondering if this should be the way to create the application or should I just do simple page requests and not use Ajax which may not look to great on a mobile application?
我知道我没有使用Ajax进行页面加载,并且想知道这是否应该是创建应用程序的方式,还是我应该只是做简单的页面请求而不是使用在移动应用程序上看起来不太好的Ajax?
Also in the future I would like to use PhoneGap and was wondering if the Ajax version would work?
同样在将来我想使用PhoneGap,并想知道Ajax版本是否可行?
TIA JD
3 个解决方案
#1
4
Have you looked at jQuery Mobile? Takes care of most of the things you should be concerned with out-of-the-box. Alternatively, there is jQTouch you can also use.
你看过jQuery Mobile吗?照顾开箱即用的大部分事项。或者,你也可以使用jQTouch。
#2
2
Sencha Touch is another option for the UI.
Sencha Touch是UI的另一个选项。
EDIT: I've looked at a few and found this to look the most professional (in terms of smoothness of animations) on my Android 2.2 phone.
编辑:我看了几个,发现这在我的Android 2.2手机上看起来最专业(就动画的流畅性而言)。
#3
1
If you are creating a mobile application using PhoneGap or Titanium, it is better to use Ajax because the pages will load faster and you are sure that the end handset, on which your application is installed, will support Ajax.
如果您使用PhoneGap或Titanium创建移动应用程序,最好使用Ajax,因为页面加载速度更快,并且您确定安装应用程序的终端手机将支持Ajax。
OTOH, if you are developing a mobile website, it might be better to go for a normal page loads. You may also apply progressive enhancement to use Ajax, if your user's client supports it.
OTOH,如果你正在开发一个移动网站,那么去正常的页面加载可能会更好。如果您的用户的客户端支持Ajax,您也可以应用渐进增强功能来使用Ajax。
#1
4
Have you looked at jQuery Mobile? Takes care of most of the things you should be concerned with out-of-the-box. Alternatively, there is jQTouch you can also use.
你看过jQuery Mobile吗?照顾开箱即用的大部分事项。或者,你也可以使用jQTouch。
#2
2
Sencha Touch is another option for the UI.
Sencha Touch是UI的另一个选项。
EDIT: I've looked at a few and found this to look the most professional (in terms of smoothness of animations) on my Android 2.2 phone.
编辑:我看了几个,发现这在我的Android 2.2手机上看起来最专业(就动画的流畅性而言)。
#3
1
If you are creating a mobile application using PhoneGap or Titanium, it is better to use Ajax because the pages will load faster and you are sure that the end handset, on which your application is installed, will support Ajax.
如果您使用PhoneGap或Titanium创建移动应用程序,最好使用Ajax,因为页面加载速度更快,并且您确定安装应用程序的终端手机将支持Ajax。
OTOH, if you are developing a mobile website, it might be better to go for a normal page loads. You may also apply progressive enhancement to use Ajax, if your user's client supports it.
OTOH,如果你正在开发一个移动网站,那么去正常的页面加载可能会更好。如果您的用户的客户端支持Ajax,您也可以应用渐进增强功能来使用Ajax。