多种设备的演示技术 [英] Presentation technology for multiple devices

查看:170
本文介绍了多种设备的演示技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序应该服务于多种设备,从简单到智能手机,IPhones,触摸屏到普通浏览器。

Our application is supposed to serve multiple devices, from simple to smart-phones, IPhones, touch-screens to normal browsers.

应用程序是分层的,所以我们可以重用业务和持久层。
但是,我们也想编写单个表示层。
我知道ASP .NET根据浏览器类型生成不同的html输出。
http://msdn.microsoft.com/en-us/ library / ms178620.aspx

Application is layered, so we can reuse the business and persistence layer. However, we would like to program single presentation layer as well. I know for example that ASP .NET generates different html output based on the browser type. http://msdn.microsoft.com/en-us/library/ms178620.aspx

甚至有些网站承诺将您的网站转换为移动网站:
http://instantmobilizer.com

There are even some sites that promise to transform your site to mobile: http://instantmobilizer.com

是否有一个java框架能够生成适应的演示文稿到客户端浏览器和设备,这样我们就不需要为每种设备类型编写不同的表示层?在Web应用程序中管理多个设备支持要求的标准方法是什么?

Is there a java framework capable of producing the presentation that adapts to client browser and device, so that we do not need to program different presentation layer for each device type? What is the standard way to manage multiple devices support requirement in web applications?

推荐答案

虽然您可以想象生成不同的标记来自单个视图实现的样式(例如,使用基于设备类型选择的不同XSL变换),您仍将最终背负最小公分母界面。

While it's true that you can conceivably generate different markup styles from a single view implementation (e.g. using different XSL transforms selected based on device type), you're still going to end up saddled with the "lowest common denominator" interface.

采用一个稍微虚假(且过时)的示例,假设您想从单个视图实现生成WML,低端HTML和高端XHTML。由于WML是三者中最基本的,因此除了纯粹的化妆品之外,您的视图将无法利用更高级表示的功能。在这个例子中,WML只能呈现非常基本的形式,而高端的XHTML设备可以做出奇特的CSS和javascript的东西。

To take a slightly artificial (and dated) example, say you wanted to generate WML, low-end HTML and high-end XHTML from a single view implementation. Since WML is the most basic of the three, your view would not be able to take advantage of the capabilities of the more advanced representations, beyond the purely cosmetic. In this example, WML can only render very basic forms, whereas high-end XHTML devices can do fancy CSS and javascript stuff.

你希望能够利用各类设备的功能,否则它最终会在所有设备上看起来蹩脚和原始。

You want to be able to take advantage of the capabilities of the various classes of device, otherwise it'll just end up looking crappy and primitive on all of them.

当你拥有与手机不同的设备时, iphone和桌面浏览器只有一个视图可以满足所有这些要求并不实用。

When you have devices as diverse as mobile phones, iphones, and desktop browsers, having a single view that satisfies all of them isn't really practical.

实际上,最好的选择是检测设备类型用户进入系统,然后在为该特定设备定制的视图序列上将其设置为关闭。

In practice, the best option is to detect the device type when the user enters the system, and then set them off on a view sequence tailored to that specific device.

这篇关于多种设备的演示技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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