jQuery和GWT可比较的框架? [英] Are jQuery and GWT comparable frameworks?

查看:93
本文介绍了jQuery和GWT可比较的框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作中,围绕我们应用于我们的前端Web应用程序的客户端框架进行了一些讨论。目前它是GWT和jQuery之间的摊牌,我很喜欢jQuery。



据我所知,GWT和jQuery都试图解决不同的问题,但相互比较,因为它们都最终存在于Web应用程序空间。



我怀疑如果是这样的话,那么比较两者可能会没有结果,所以我试图让我的头脑是,如果比较jQuery和GWT甚至是苹果比较,就像jQuery和ExtJS可以比较一样,或者它会更有利于我们的团队提出某些问题我们的应用程序和使用的答案,以确定哪个框架更适合我们?

解决方案

除了什么克雷格提到,还有另外一个几乎没有讨论过的理由。你在建立一个网站还是一个网络应用程序?



网站是传统的做事方式。用户点击链接,浏览器转到服务器并下载新的html。有时候,您会使用AJAX调用来填充列表或保存一些数据,但大多数情况下,从一个页面到另一个页面的转换发生在服务器端。



一个网络应用程序是不同的。认为Gmail,谷歌日历,谷歌文档。系统中只有1个html页面。一旦下载完成,从一个视图转换到另一个视图就在客户端完成。点击一个链接不会加载新鲜的HTML,它只是一个javascript方法调用(可能会或可能不会到服务器)。



GWT非常适合构建复杂网络应用程序。如果您尝试使用GWT构建网站,您将对该技术感到沮丧。 JQuery更适用于网站,在那里你想在页面上做某些爵士乐的东西,但在某些时候你想要去服务器并下载新的内容。



如果你根据你的最终目标是什么进行选择,你会更有效率 - 网站或webapp,而不是决定你的路径是什么 - java v / s javascript。


At work there's a bit of discussion around what client side framework we should use for our front end web applications. Currently it's a showdown between GWT and jQuery and I'm kind of on the fence but leaning towards jQuery.

From what I can tell, GWT and jQuery are trying to solve different problems but are compared to each other because they both end up existing in the web applications space.

I suspect that if this is the case, then comparing the two may be fruitless so what I'm trying to get my head around is if comparing jQuery to GWT is even an apples to apples comparison in the same way that jQuery and ExtJS can be compared, or would it be more beneficial for our team to ask certain questions of our application and use the answers to determine which framework is a better fit for us?

解决方案

In addition to what Craig mentions, there is another, hardly-ever-discussed reason. Are you building a web-site or a web-app?

A website is the traditional way of doing things. User clicks on a link, browser goes to server and downloads new html. At times, you put in AJAX calls to populate lists or to save some data, but most of the times the transition from one page to another happens on the server side.

A web-app is different. Think gmail, google calendar, google docs. There is only 1 html page in the system. Once it downloads, transition from one view to another is done on the client side. Clicking on a link does not load fresh HTML, its just a javascript method call (which may or may not go to the server).

GWT is really suited for building complex web-apps. If you try to build a website with GWT, you are going to get frustrated with the technology. JQuery is more suited for web-sites, where you want to do certain jazzy stuff on a page, but at some point you want to go the server and download fresh content.

You will be more productive if you make a choice based on what your end goal is - website or webapp, rather than deciding on what your path is - java v/s javascript.

这篇关于jQuery和GWT可比较的框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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