渐进增强和优雅降级有什么区别? [英] What is the difference between Progressive Enhancement and Graceful Degradation?

查看:178
本文介绍了渐进增强和优雅降级有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对渐进增强优雅降级之间的区别感到困惑。他们看起来像是一样的东西。

I'm confused on what the difference is between Progressive Enhancement and Graceful Degradation. To me they seem like the same thing.

你能否向我解释两者之间的差异以及在哪种情况下我会使用哪一种?

Can you please explain to me the differences between the two and in which situation I would use one over the other?

推荐答案

它们几乎完全相同,但它们在上下文中有所不同。

They ARE almost exactly the same thing, but they differ in context.

有一类浏览器称为 A级浏览器。这些是典型的受众成员(可能)构成了大部分访问者。您将从这些用户的基线开始。称之为最佳现代做法

There is a class of browsers called "A Grade Browsers". These are your typical audience members that (probably) make up the majority of your visitors. You'll start with a baseline of these users. Call this best modern practices.

如果您想增强,那么任何使用FF3.6的人的体验或Safari 4或其他一些whizbang开发者每晚webkit whathaveyou,你会想要做很棒的事情,比如

If you want to enhance the experience for anyone happening to use FF3.6 or Safari 4 or some other whizbang developer nightly webkit whathaveyou, you'll want to do awesome things like


  • 通过css圆角...

  • 阴影文本(但请上帝,不要太多)

  • 阴影(见上面的括号)

这些会让你的网站看起来很好看,但不会破坏它。这是渐进增强。从最佳实践开始迎接未来。

These make your site kick-ass looking, but won't break it. This is progressive enhancement. Embracing the future from the point of best practices.

另一方面,您的利基任天堂网站吸引了相当数量的IE5用户。你很差,但你也想确保他们继续回来。您可以通过在外部文件中包含ajax脚本来提供ajax行为的替代方法,如果他们的JS没有打开,那么您的链接可能会更新整个页面。等等。从最佳现代实践的角度来看,您确保某些历史市场正在被一些功能性网站的外观所照顾。这是优雅降级

On the other hand, your niche Nintendo site attracts a fair number of IE5 users. Poor you, but you also want to make sure they keep coming back. You might provide an alternative to your ajax behavior by including the ajax script in an external file and if their JS isn't turned on, maybe your links update the whole page. Etc. From the point of view of best modern practices, you're making sure that certain historical markets are being catered by some semblance of a functional site. This is graceful degradation.

它们大多数相同,但在许多开发团队的优先级方面有所不同:如果你有PE,那就很好了时间,但GD通常必要

They are mostly identical, but differ in terms of priority for many development teams: PE is quite nice if you have the time, but GD is often necessary

这篇关于渐进增强和优雅降级有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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