Jquery vs Google Closure va GWT Pros &大型 Web 应用程序开发的缺点 [英] Jquery vs Google Closure va GWT Pros & cons for large web application development

查看:18
本文介绍了Jquery vs Google Closure va GWT Pros &大型 Web 应用程序开发的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我即将开始开发一个大型网络应用程序.其中包含媒体(视频、音频和图像)和庞大的用户群.

I am about to start developing a large web application.Which contains media(video,audio & images) and a large user base.

网站的流量也可能非常高.

The traffic on website may also goes very high.

所以在这里我有点困惑我应该使用 jquery/jquery ui 还是 Google 关闭或 GWT.

So here i am a little bit confused the should i use jquery/jquery ui or Google closure or GWT.

我熟悉 jquery,我在这方面做了很多工作,但对于 GWT &Google 关闭,这是我第一次.

i am familiar with jquery and i worked a lot into that but for GWT & Google Closure this is my first time.

我对 Java 也很熟悉,所以我可以使用 GWT,但我已经提到这是我第一次使用 GWT.

I am also comfortable in java so i can use GWT but i already mentioned the it's my first time with GWT.

所以请推荐我的优点 &这三者在跨浏览器兼容性、易于理解、代码维护、丰富的ui设计支持等方面的缺点.

so please suggest me the pros & cons of all these three in terms of cross browser compatiblity,ease of understanding,maintenance of code,rich ui desing support etc.

-提前致谢

如果这个问题是重复的,而不仅仅是发布链接.

if this question a duplication of some other than just post the link.

推荐答案

我认为这真的取决于你想创建什么样的网站.
GWT 可能最适合所谓的 SOUI(服务面向用户界面)和 SOFEA(面向服务的前端架构).
在 GWT 网络应用程序中,您有一个 HTML 主机页面,由您的后端和所有 UI 工作流和 流同步提供服务 由 GWT 在客户端完成.因此,如果您想实现类似应用程序的桌面,GWT 可能是您的最佳选择,因为它是一个很棒的工具包,它允许开发类似桌面的复杂应用程序并提供 JAVA 开发的所有优势(测试、重构等).

I think it really depends on what kind of web-site you want to create.
GWT is probably best suited for so called SOUI (Service Oriented UI) and SOFEA (Service Oriented Front End Architecture).
In GWT web-applications you have one HTML host page which is served by your backend and all the UI workflow and flow synchronisation is done on the client side by GWT. So in case you want to achieve a desktop like app GWT is probably your best choice because it is a great toolkit which allows developing complex desktop like applications and provides all the advantages of JAVA development (testing, refactoring, etc).

对于传统"Web 2.0ish 网站,GWT 可能不是最佳选择,因为它确实比 JS 框架(jQuery、dojo 等)具有更大的学习曲线.
此外,这些网站有多个页面,Javascript 用于 UI 增强,而不是完全接管流同步,而只是使页面更具交互性.对于这些网站,您通常有一个很好的后端(Grails、Spring MVC)来处理流同步,而 JS 框架只负责使 UI 更具交互性并进行一些 UI 更改.

For "traditional" web 2.0ish web-sites GWT might not be the best choice because it does have somehow bigger learning curve than JS frameworks (jQuery,dojo, etc).
Furthermore these web-sites have multiple pages and Javascript is used for UI enhancements and not for completely taking over flow synchronisation but just making the page more interactive. For these web-sites you usually have a good backend (Grails, Spring MVC) which takes care of flow synchronisation and the JS framework is just responsible for making the UI more interactive and for some UI changes.

这种网站的一个例子是 stackoverflow.如果您单击链接,它将加载一个新的 HTML 页面.如果您单击收件箱链接,它将使用 jQuery 打开一个弹出窗口并检索您的通知并显示它们.

An example for this kind of web-sites is stackoverflow. If you click on a link it will load a new HTML page. If you click on your inbox link it will use jQuery to open a popup and retrieve your notifications and display them.

Google Closure 可能更接近于 jQuery 而不是 GWT.我认为 Google Closure 最大的卖点是客户端和服务器端的 HTML 模板.我对 Google Closure 没有太多经验,但它被 Google 大量用于他们的网络应用程序.

Google Closure is probably closer to jQuery than to GWT. I think the biggest selling point of Google Closure are the client- and server-side HTML templates. I don't have much experience with Google Closure but it is heavily used by Google for their web-apps.

因为我主要与 GWT 一起工作,所以这里列出了我能想到的关于 GWT 的优点和缺点:

Because I have worked mostly with GWT here is a list of advantages and dis-advantages I can think of regarding GWT:

优势:

  • 强大的工具包
  • 开发工具(测试、重构、eclipse、实时调试)
  • 开箱即用的跨浏览器兼容性(有一些注意事项)
  • 第三方库的可用性(DTO 序列化、MVP 框架等)
  • 仅将使用的代码下载到客户端(使用 JS 框架,即使您只使用一个特定的功能,您也可以下载整个框架)
  • 用于与 JAVA 后端通信的 GWT-RPC 和 RequestFactory(无需自己序列化或反序列化).

缺点:

  • 更大的学习曲线
  • 可能不适合小的 UI 增强
  • 如果代码库很大并且必须支持不同的浏览器和语言,则编译可能需要一些时间
  • 生成的 Javascript 在复杂的应用程序中可能会变得很大(解决方案:代码拆分)

附带说明:对于每个新的 GWT 版本,随着每个新的 GWT 版本在编译时间和代码大小方面的改进,缺点变得不那么重要.GWT 2.5 应该是在这方面有一些非常好的改进.

As a side-note: with each new GWT version the disadvantages become less of an issue as each new GWT version improves in compilation time and code size. GWT 2.5 is supposed to have some really good enhancements in this area.

总而言之:如果您想开发类似交互式 Web 应用程序的桌面,我认为 GWT 可能是您的最佳选择.
但是,如果您想开发更传统的Web 2.0ish"网站,jQuery/Google Closure 可能是更好的解决方案.

To summarize: if you want to develop a desktop like interactive web-application I think GWT is probably your best choice.
However if you want to develop a more traditional "web 2.0ish" web-site jQuery/Google Closure might be a better solution.

这篇关于Jquery vs Google Closure va GWT Pros &大型 Web 应用程序开发的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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