graceful-degradation

How do I refer to Java 1.6 APIs while degrading gracefully against Java 1.5?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-06 19:10:10
问题 I would like to use the java.text.Normalizer class from Java 1.6 to do Unicode normalization, but my code has to be able to run on Java 1.5. I don't mind if the code running on 1.5 doesn't do normalization, but I don't want it to give NoClassDefFoundError s or ClassNotFoundException s when it runs. What's the best way to achieve this? 回答1: The usual way of doing this is via reflection, i.e. don't refer directly to the class in question, but invoke it programmatically. This allows you to catch

How do I refer to Java 1.6 APIs while degrading gracefully against Java 1.5?

末鹿安然 提交于 2021-02-06 19:04:09
问题 I would like to use the java.text.Normalizer class from Java 1.6 to do Unicode normalization, but my code has to be able to run on Java 1.5. I don't mind if the code running on 1.5 doesn't do normalization, but I don't want it to give NoClassDefFoundError s or ClassNotFoundException s when it runs. What's the best way to achieve this? 回答1: The usual way of doing this is via reflection, i.e. don't refer directly to the class in question, but invoke it programmatically. This allows you to catch

Detecting pinch in Android

大城市里の小女人 提交于 2020-01-01 08:24:30
问题 I would like to handle pinch events in my Android application to zoom in and out. I believe Android 2.0 has multi-touch functionality, and heard that Android 1.6 might or might not support it depending of the device. What's the best way to detect pinch events, while degrading gracefully for devices that don't support it? I'm targeting Android 1.5 upwards. 回答1: A great article by Ed Burnette (Hello Android Author) on multi touch (including pinch zoom) can be found here: http://www.zdnet.com

Silverlight that degrades to html

非 Y 不嫁゛ 提交于 2019-12-23 09:53:06
问题 I am interested in creating a website entirely in silverlight (personal reasons) but I don't want people who don't yet have silverlight (a good many) to have to install a plugin just to view my site. The solution I am leaning towards is to start with a flat html/css version of the site and present the silverlight version only to people who already have it installed. My question is this: Is my reasoning misguided. Is there a better way to go about this. And what is the best way to avoid having

How to write backwards compatible HTML5?

你离开我真会死。 提交于 2019-12-17 23:28:10
问题 I'd like to start using HTML5's basic features, but at the same time, keep my code backwards compatible with older browsers (graceful degradation). For instance, I'd like to use the cool CSS3 properties for making rounded corners. Is there any available tutorial for writing gracefully degradable HTML5 ? Additionally, what browsers should I support so that my app. is functional for at least 95% of visitors? What are the ways to test those browsers painlessly ? 回答1: When talking about HTML5 or

What is the difference between Progressive Enhancement and Graceful Degradation?

眉间皱痕 提交于 2019-12-17 21:41:35
问题 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? 回答1: They ARE almost exactly the same thing, but they differ in context. 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

How can I gracefully degrade CSS viewport units?

落爺英雄遲暮 提交于 2019-12-12 18:17:06
问题 CSS viewport units ( vw , vh , vmin , vmax ) are great, and I want to start using them for fonts -- but I noticed here that they aren't that widely supported. I tried to google any best practices for graceful degradation in unsupported browsers, but couldn't find anything useful. Are there any better ways beyond doing something like: h1 { font-size: 120%; /* for unsupported browsers */ font-size: 5.3vmin; /* for supported browsers */ } Thanks in advance! 回答1: Native usage You'll at least want

Dropdowns with 10 thousand possible values and sequence-important dropdowns vs. graceful degredation

旧城冷巷雨未停 提交于 2019-12-11 00:08:18
问题 Background I have this form that uses javascript exclusively to search through ~5k entries (suppliers) and populate a select dropdown from them (factories, ~10k entries). Right now, it's a javascript-required form. I'd like to make it so that javascript errors no longer render the form unusable, but the number of entries and the sequential nature of the entries leave me without a idiomatic way to provide just a basic html version. The Issues Sequential/hierarchical dropdowns An example

Javascript Ajax Graceful-degradation, with Different Pages?

回眸只為那壹抹淺笑 提交于 2019-12-10 17:52:35
问题 I'm starting to give a little more attention to making my javascript and ajax degrade gracefully. Which is more recommended: working on incorporating the graceful degradation into your existing code (can be tricky) or developing a different sets of pages for the non-js users. I'm leaning towards the different sets of pages, because I feel it's easier and I get to deliver the best possible results for each user type (js-enabled or js-disabled). Do you agree with me, and if not, why do you

Is progressive enhancement a current issue anymore?

*爱你&永不变心* 提交于 2019-12-09 11:20:44
问题 There are couple of things I hear in defense of progressive enhancement. Javascript is off or not available. According to W3School's Javascript statistics, 95% had Javascript enabled January 2008 (2.5 years ago). The trend, based on those stats, seems to be that Javascript enabled browsers are on the rise. Heavy AJAX adoption has probably pushed users to enable even faster. To support text-only or accessibility doesn't make a lot of sense from the business perspective since they probably