Google GWT跨浏览器支持:是BS? [英] Google GWT cross-browser support: is it BS?

查看:124
本文介绍了Google GWT跨浏览器支持:是BS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在FlashBuilder中开发了一个浏览器部署的全文搜索应用程序,它与远程Web服务器进行RESTful通信。该软件适合一个微小的利基 - 它是用于古代语言而不是现代的,没有办法,我要做任何钱,但我确实花了很多时间。

I developed a browser-deployed full-text search app in FlashBuilder which communicates RESTfully with a remote web-server. The software fits into a tiny niche--it is for use with ancient languages not modern ones, and there's no way I'm going to make any money on it but I did spend a lot of time on it.

既然苹果不允许在iPad上使用Flash,我正在寻找一个100%的javascript解决方案,并被带到考虑GWT。它看起来很有前途,但其中一个应用程序被展示作为一个可以做的事情的一个恒星的例子在这个免责声明在他们的网站(名称{已删除}保护可能无辜):

Now that Apple won't allow Flash on the iPad, I'm looking for a 100% javascript solution and was led to consider GWT. It looked promising, but one of the apps being "showcased" as a stellar example of what can be done with GWT has this disclaimer on their website (names {removed} to protect the possibly innocent) :


Your current web browser (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
 AppleWebKit/532.5 (KHTML, like Gecko) 
Chrome/4.1.249.1045 Safari/532.5) is not officially supported by 
{company and product name were here}. If you experience any problems using this site
 please install either Microsoft Internet Explorer 6+ or Mozilla Firefox 3.5+ 
before contacting {product name was here} Support.

Chrome浏览器不支持GWT应用程序正式支持什么?您将向GWT提供哪些年级(A,B,C,D,F)的跨浏览器支持?对于没有得到这些字母等级的人,A是优秀,F是失败,C是平均值。

What gives when GWT apps aren't "officially" supported on Chrome? What grade (A, B, C, D, F) would you give to GWT for cross-browser support? For folks who don't get these kinds of letter grades, A is "excellent" and "F" is failure, and "C" is average.

推荐答案

所有基本GWT小部件都支持跨浏览器延迟绑定(并不总是,但对最大的罪犯;))。基本上,它允许一个类与另一个类的无缝替换,基于客户端正在使用的浏览器(这种交换在编译期间完成)。这允许为所有符合标准的浏览器写一个Widget,然后为你知道的人提供一个专门的版本(延迟绑定也用于i18n和其他很酷的东西,例如依赖注入)。 Deferred Binding的另一个好处是,客户端只会将网络应用的版本下载到他/她的浏览器。 因此,Firefox / Opera / Chrome / WebKit用户不必下载所有使IE应用程序在IE上正常运行的附加黑客。

All of the base GWT Widgets are cross-browser compatible - this has been achieved by something called Deferred Binding (not always, but for the biggest offenders ;)). Basically, it allows a seamless "replacement" of one class with another, based on the browser that the client is using (this swap is done during the compilation). This allows to write a Widget for all the standard-compliant browsers and then provide a specialized version for you-know-who (deferred binding is also used for i18n and other cool things, like dependency injection). Another cool thing about Deferred Binding is that the client only downloads the version of the web app specific to his/her browser. So a Firefox/Opera/Chrome/WebKit user doesn't have to download all those additional hacks that make the web app work on IE.

长故事: > GWT为开发人员提供了用于创建跨浏览器Web应用程序的工具/手段(并且尝试通过提供基本的Widget来使该过程尽可能简单,这些Widget是跨浏览器开箱即用的)到开发人员使用这些工具 - 或不);

Long story short: GWT provides tools/means for the developer to create a cross-browser web application (and it tries to make that process as easy as possible by providing basic Widgets that are cross-browser out of the box) - it's up to the developer to use those tools - or not ;)

PS:同样的问题可以问jQuery / mootools / etc - 为什么是这些框架声称在所有浏览器上工作,但有许多网站/网络应用程序使用它们,并不支持所有这些浏览器? 因为开发人员选择了这样做。

PS: The same question could be asked about jQuery/mootools/etc - why is it that these frameworks claim to work on all browsers and yet there are many sites/web apps that use them and do not support all those browsers? Because the developers chose so. It might not have been worth it to cripple the web application/site just so that it works on a dying (hopefully) browser.

这篇关于Google GWT跨浏览器支持:是BS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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