Web 应用程序域外的优雅降级:这个问题有多严重?

发布于 2024-07-14 10:34:56 字数 1115 浏览 3 评论 0原文

对冗长的介绍表示歉意 - 只是试图适当地设置场景以避免歧义和混乱。

Web 应用程序已经从用于服务器端逻辑的基于浏览器的愚蠢界面发展为完全基于浏览器的应用程序对服务器端逻辑的需求最少。 可以通过识别 Web 应用程序的清晰世代来描述这种演变。

我们暂时只考虑两代:ajax 之前和之后。 当然还有其他因素,例如与 CSS 支持和访问控制标头相关的因素,但让我们从简单的开始。

从无样式、无 JavaScript 的简单系统开始,添加层层优雅降级的增强功能,最后完成一个包含 ajax 的、高响应性的当代应用程序,是一项具有挑战性且容易出错的任务。 这绝非易事。

Web 应用程序可能属于哪一代取决于访问该应用程序的方式。 如果通过 Lynx 访问,同一个 Web 应用程序将显示为第一代应用程序,如果通过 FireFox 3.1 访问,则显示为最新一代应用程序,中间有几个级别,具体取决于用于访问应用程序的用户代理。

创建一个根据用户代理的功能正常降级的 Web 应用程序的问题是,为利用当前浏览器功能而创建的某些内容将恢复到也许十五年前创建的功能面对Lynx,是非常艰难的。

我无法想象桌面应用程序会面临如此大的操作环境差异。

当在 XP 下运行以及缺少某些 Vista 功能时,能够利用 Vista 功能的单个可执行文件(而不是一组特定于操作系统的变体)可以很好地应对。 为了在与 Web 应用程序相当的距离上降级,相同的桌面应用程序在 DOS 等纯命令行环境中运行时仍然必须运行,尽管方式不那么花哨。

在 Lynx 下运行它,它是第一代 Web 应用程序。 在 FireFox 3.1 下运行同样的程序,它是一个精美、闪亮的现代网络应用程序。 如果遇到这样的问题,你会认为它具有挑战性、棘手但可行。

在 DOS 下运行它,它是一个命令行应用程序。 在 Vista 下同样运行它,它是一个精美、闪亮的现代网络应用程序。 如果遇到这样的问题,你会认为这是疯了。 或者你会吗?

桌面应用程序是否曾像 Web 应用程序那样在操作环境中面临如此广泛的差异?

这个问题(差异的广度,而不是差异本身)是 Web 应用程序领域独有的吗?或者可以在桌面开发中找到它吗?

Apologies for the long intro - just trying to suitably set the scene to avoid ambiguities and confusion.

Web applications have grown from being dumb browser-based interfaces for server-side logic to being fully browser-based applications with minimal need for server-side logic. It is possible to describe this evolution through identifying clear generations of web applications.

Let's just consider, for the moment, just two generations: pre- and post-ajax. There certainly are other factors, such as those relating to CSS support and Access Control headers, but let's start off simple.

Starting from a style-less JavaScript-less simple system, adding layers of gracefully-degrading enhancements and finishing with a ajax-packed, highly-responsive contemporary application is a challenging and error-prone task. It is by no means easy.

To whichever generation a web application may appear to belong depends on the means through which the application is accessed. The very same web application would appear to be a first generation app if accessed through Lynx and a latest generation app if accessed through FireFox 3.1, with a few levels in-between depending on the user agent used to access the app.

The problem of creating a web application that gracefully degrades depending on the capabilities of the user agent, where something created to take advantage of current browser features would revert back to the functionality of something created perhaps fifteen years ago when faced with Lynx, is very hard.

I can't imagine a desktop application facing such a variance in operating environment.

A single executable (as opposed to a set of OS-specific variants) capable of taking advantage of features in Vista may well cope adequately when run under XP and when lacking certain Vista features. To degrade over a comparable distance as a web app, the same desktop application would still have to function, albeit in a less fancy fashion, when run in a command-line-only environment such as DOS.

Run it under Lynx, it's a first generation web app. Run the same under FireFox 3.1, it's a fancy, shiny contemporary web app. If faced with such a problem, you'd consider it challenging, tricky but feasible.

Run it under DOS, it's a command-line app. Run it same under Vista, it's a fancy, shiny contemporary web app. If faced with such a problem, you'd consider it insane. Or would you?

Do desktop applications ever face such a breadth of variance in operating environments as web applications can?

Is this problem (the breadth of variance, not the variance itself) unique to the domain of web applications, or can it be found in desktop development?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凌乱心跳 2024-07-21 10:34:56

在这方面,桌面应用程序不存在与 Web 应用程序相同的问题。 它们通常被设计为在一个明确定义的平台上运行。

这在未来可能会改变。 计算正在从台式机转向移动电话和小型笔记本电脑。 未来桌面应用程序必须在更广泛的平台上运行。 这可能会导致问题,因为我们用来开发桌面应用程序的大多数框架处理这个问题的能力比 Web 应用程序框架更糟糕。

Desktop applications don't have the same problems web applications have in this respect. They are usually made to run on one well defined platform.

This might change in the future. Computing is moving from desktops to mobile phones and smaller laptops. Desktop applications will have to run on a wider variety of platforms in the future. This might cause problems because most frameworks we use to develop desktop applications handle this even worse than framework for web-applications.

海夕 2024-07-21 10:34:56

我无法想象桌面应用程序会面临如此大的操作环境差异。

桌面应用程序必须处理不同类型的差异。 游戏中的显卡就是一个很好的例子:您希望为基本客户提供体面的支持,但拥有闪亮的新显卡的高端客户会想要一分钱一分货。 当您进入 GPU 处理和卡上内存管理领域时,您将有足够的理由诅咒操作环境中的差异。

您通常还需要处理比网络应用程序更多的处理器和内存密集型软件,因此您也必须考虑到这一点。 我什至没有谈论操作系统间的可操作性(许多桌面软件对此处理得非常优雅)。

当然,没有什么可以阻止桌面软件发行商对环境施加严格的标准。 这只是一个生意问题。 但也没有什么可以强迫您支持非主流浏览器(大多数 Web 应用程序真的支持 Lynx 吗?!?)。

I can't imagine a desktop application facing such a variance in operating environment.

Desktop applications have to deal with variance, just of a different kind. Graphic cards in games are a good example of that: you want decent support for basic customers, but your high-end customer with the shiny new graphic card will want a run for their money. When you enter the realm of on-GPU processing and on-card memory management, you'll have reason enough to curse variance in operating environments.

You also generally deal with more processor and memory intensive software than a web-app, so you'll have to take that into account as well. And I'm not even talking about inter-OS operability (which many desktop software handle very gracefully).

Of course, nothing keeps a desktop software publisher to impose stringent criteria on the environment. It's just a question of business. But nothing forces you to support non-mainstream browsers either (and do most web applications really support Lynx?!?).

鲸落 2024-07-21 10:34:56

在应用程序和操作系统 (OS) 领域,问题通常相反。 操作系统负责处理维护兼容性的所有复杂问题。 另一方面,应用程序通常规定最低操作系统版本。

应用程序开始看到这个问题的另一个地方是 Java 世界,以及在较小程度上所有其他所谓的在多操作系统上工作的脚本语言。

In the application and operating system (OS) realm, the problem is usually reversed. It is the OS that handles all the complexity of maintaining compatibility. On the other hand the application usualy dictates a minimum OS version.

Another place where applications start to see this problem is the Java world and to a lesser degree all other so called script langages that work on multi OS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文