Creating a mobile version of a website

前端 未结 1 828
广开言路
广开言路 2020-12-30 11:29

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.

Part of the reason for creating

相关标签:
1条回答
  • 2020-12-30 11:46

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

    • iUi
    • jQTouch
    • Sencha Touch
    • iWebkit

    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.

    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.

    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.

    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.

    0 讨论(0)
提交回复
热议问题