创建一个网站的移动版本 [英] Creating a mobile version of a website

查看:170
本文介绍了创建一个网站的移动版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找创建我们的网站/ web应用程序的移动版本。什么是一个很好的方式,提供最佳,功能最全的版本。

I'm looking to create a mobile version of our website/web app. What's a good way to provide the best, most fully featured version.

用于创建它的部分原因是,而不是一个iPhone应用程序,所以我想提供一个iPhone的Web应用程序,它利用了iPhone版本的WebKit(因此CSS动画的充分利用,能够依靠良好的JavaScript支持等)。不过,我也希望该网站上的其它智能手机做工精良,以及更基本的手机也是如此。

Part of the reason for creating it is instead of an iPhone app, so I'd like to offer an iPhone web app that takes full advantage of the iPhone's version of WebKit (so CSS animations, being able to rely on good javascript support etc). However, I'd also like the site to work well on other smart phones as well as more basic mobile phones as well.

难道我创建了两个站点(移动WebKit和基本的移动网络)和重定向基于用户代理?我可以创建一个网站,会降低呢?哪些可能性,以及如何别人处理呢?

Do I create two sites (Mobile WebKit and basic mobile web) and redirect based on User Agent? Can I create one site that degrades well? What are the possibilities, and how do other people handle it?

另外:是移动网络模拟器一文不值?我有一个iPhone,这样可以对地测试。如果我想测试黑莓/棕榈pre我真的需要一个设备还是有可靠的模拟器?

Also: are mobile web simulators worth a damn? I have an iPhone, so can test easily on that. If I want to test on Blackberry/Palm Pre do I really need a device or are there reliable simulators?

推荐答案

这些是一些提供本机的外观和感觉上的WebKit的iPhone专用库:

These are some of the iPhone specific libraries that provide a native look and feel on webkit:

  • iUi
  • jQTouch
  • Sencha Touch
  • iWebkit

得到它的工作在大多数手机上肯定会是一个问题,因为它们是建立在与iPhone的屏幕尺寸大多数图书馆(小320x480)记在心里。

Getting it to work on most phones will definitely be an issue with most libraries as they are built around with the iPhone's screen size (320x480) in mind.

要获取设备,包括Android和J2ME手机,结账雅虎蓝图的覆盖面更广。这是一种标记语言,翻译为多种平台和设备。

To get a wider coverage of devices including Android and J2ME phones, checkout Yahoo Blueprint. It's a markup language that translates for various platforms and devices.

您既可以获取基于用户代理的移动浏览者随地吐痰页面时动态切换样式表的服务器上。这不是一个推荐的做法,虽然为重型页面,你仍然会被发送数据的大块,不会被渲染。或者,如果你有你的观点明确分开,你可以模板化基于用户代理和/或其它参数的看法。这与只更改视图保持你的控制器逻辑在一个地方的优势。您可以使用iPhone / iPod Touch和开关上面的库更简单的移动版本的其他智能手机或调整它,只要你想。

You could either get the mobile view based on User Agent by dynamically switching the stylesheet on your server when spitting the page. This is not a recommended approach though for heavy-duty pages as you will still be sending huge chunks of data that would not be rendered. Alternatively, if you have a clear separation of your views, you can templatize the view based on User Agent and/or other parameters. This has the advantage of keeping your controller logic in one place with only changing views. You could use the above libraries for iPhone/iPod Touch and switch to a simpler mobile version for other smartphones or tweak it as you want.

创建网站的一个单独的移动版本可以苦心很难改变的时候出现的维护。

Creating a separate mobile version of the site can be painstakingly difficult to maintain when changes arise.

在iPhone和Android模拟器是因为它得到真正的交易接近。在iPhone不会让你做的东西一样让在模拟器上显而易见的原因呼叫,但Android提供了模拟的实现基本上是所有设备上。

The iPhone and Android simulators are as close as it gets to the real deal. The iPhone won't let you do stuff like make calls on the simulator for obvious reasons, but the Android provides mock implementations for basically everything on the device.

这篇关于创建一个网站的移动版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆