优点& JSF / Ajax的缺点 [英] Pros & Cons of JSF/Ajax

查看:75
本文介绍了优点& JSF / Ajax的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要构建一个非常动态的客户端,并且有兴趣了解使用JSF和Ajax来实现这一点的优点和好处。


谢谢。


史蒂夫

I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.

Thanks.

Steve

推荐答案

2006年4月8日星期六21:10:56 GMT, ;史蒂夫" < x@y.com>写道,引用或

间接引用某人说:
On Sat, 08 Apr 2006 21:10:56 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
我需要建立一个非常有活力的客户,并且有兴趣了解专业人士和
使用JSF和Ajax来实现这一目标。
I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.




Ajax最大的问题是你在每个浏览器中都有不同的JavaScript

实现具有不同的错误和不同的

专有扩展。你也被限制在

JavaScript的浏览器上。


JSF另一方面也无法实现聪明的

客户端技巧,如按键编辑。


如果你有一个使用相同浏览器和版本的专属观众,

Ajax看起来更好。如果你有一般公众作为你的观众

那么JSF看起来更好。


显然还有很多其他因素需要考虑。

-

Canadian Mind Products,Roedy Green。
http:// mindprod.com Java自定义编程,咨询和指导。



The biggest problem with Ajax is you have a different JavaScript
implementation in every browser with different bugs and different
proprietary extensions. You also are then limited to browsers with
JavaScript.

JSF on the other hand is not going to be able to pull off clever
client side tricks like keystroke editing.

If you have a captive audience all using the same browser and version,
Ajax looks better. If you have the general public as your audience
then JSF looks better.

Obviously there are many other factors to consider.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.


Roedy,


感谢您的回复。


我正在考虑更换Java applet并担心JSF和Ajax可能不够用。


applet做的一些事情是在同一页面上基于用户

选择的页面上动态填充树,表,选项卡,窗格,组合框等。当信息不可用时,applet与服务器通信以获取所需数据

在客户端。它还向用户呈现多个页面(例如,JFrame),其中一页上的信息基于用户选择

一个或多个其他页面。


除了按键编辑,还有其他我无法用JSF做的事情吗?特别是,上面的声音是否可行或

我可能会遇到一些问题吗?


感谢您的反馈。


Steve

-


" Roedy Green" < my ****************************** @ munged.invalid>在消息新闻中写道:1e ******************************** @ 4ax.com ...
Roedy,

Thank you for your reply.

I am considering replacing a Java applet and have concerns that JSF and Ajax may not be adequate.

Some of the things the applet does is dynamically populate trees, tables, tabs, panes, comboBoxes, etc., on a page based on user
selections on the same page. The applet communicates with the server to get the required data when the information is not available
at the client. It also presents multiple pages to the user (e.g., JFrames) where info on one page is based upon user selections on
one or more other pages.

Besides keystroke editing, are there other things I will not be able to do with JSF? In particular, do the above sound doable or
might I have some problems?

Thanks for any feedback.

Steve
--

"Roedy Green" <my******************************@munged.invalid > wrote in message news:1e********************************@4ax.com...
周六,2006年4月8日21:10:56 GMT,史蒂夫 < x@y.com>写道,引用或
间接引用某人说:
On Sat, 08 Apr 2006 21:10:56 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
我需要建立一个非常有活力的客户,并且有兴趣知道使用的优点和利弊JSF和Ajax实现这一目标。
I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.



Ajax最大的问题是你在每个浏览器中都有不同的JavaScript实现,具有不同的bug和不同的专有扩展。您也只能使用带有JavaScript的浏览器。

另一方面,JSF无法实现像击键编辑这样聪明的客户端技巧。 />
如果你有一个使用相同浏览器和版本的专属观众,那么Ajax看起来更好。如果你有普通公众作为你的观众
那么JSF看起来更好。

显然还有很多其他因素需要考虑。
-
Canadian Mind Products,Roedy绿色。
http://mindprod.com Java自定义编程,咨询和指导。



The biggest problem with Ajax is you have a different JavaScript
implementation in every browser with different bugs and different
proprietary extensions. You also are then limited to browsers with
JavaScript.

JSF on the other hand is not going to be able to pull off clever
client side tricks like keystroke editing.

If you have a captive audience all using the same browser and version,
Ajax looks better. If you have the general public as your audience
then JSF looks better.

Obviously there are many other factors to consider.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Steve schrieb:
Steve schrieb:
我正在考虑更换Java applet并担心JSF
和Ajax可能不是适当的。

applet所做的一些事情是在页面上动态填充树,
表,选项卡,窗格,组合框等,基于用户选择的同一页。小程序与
服务器通信,以便在客户端无法获得信息时获取所需数据。它还向用户显示多个页面(例如,
JFrame),其中一页上的信息基于用户在一个或多个其他页面上的选择。

除了击键编辑,还有其他我无法用JSF做的事吗?
I am considering replacing a Java applet and have concerns that JSF
and Ajax may not be adequate.

Some of the things the applet does is dynamically populate trees,
tables, tabs, panes, comboBoxes, etc., on a page based on user
selections on the same page. The applet communicates with the
server to get the required data when the information is not available
at the client. It also presents multiple pages to the user (e.g.,
JFrames) where info on one page is based upon user selections on
one or more other pages.

Besides keystroke editing, are there other things I will not be able
to do with JSF?



你知道JSF和Ajax解决了什么问题吗?

浏览器忘了每个页面重新加载的GUI状态。但是每次点击链接提交表单时,他们会重新加载

整页。这导致了b $ b恼人的延迟,并且很难维持

复杂页面的UI状态。


JSF是面向组件的面向服务器端的UI框架。需要关注UI状态,并且可靠的语言和环境可用于操作数据。


使用AJAX ,您可以在不重新加载整个页面的情况下发送请求,并且

只需替换已更改的元素[1]。这消除了延迟,并且
可以完全保留UI状态。

应该可以提供您概述的功能

with a服务器端框架与AJAX结合使用。但是你有使用JSF的
吗?


在最近的采访中[2],Jacob Hookom回答了问题你是否

原生支持Ajax?":


|对于AJAX,我们正计划追求对JSF 1.2的扩展名为

|阿凡达,基于各种EG成员??允许任何和所有的想法

| JSF的一部分用于AJAX应用程序。 [...]

|

| JSF(2.0)的下一个版本可能包含一个

|的案例a ?? Partial Faces Requesta ?? (AJAX)。此外,可能会有更多的使用

|用于简化规范的组件开发方面的注释。


用简单的语言:JSF目前没有*支持AJAX。


我绝对不会尝试使用JSF构建一个AJAX应用程序。您可能想要阅读代表其他java web

框架的其他开发人员的答案。我发现它们非常有趣。

支持AJAX的最佳Java Web框架可能是Wicket。有一个

查看网站[3],并询问

邮件列表[4]上AJAX支持的当前状态。 AFAIK,已经有Dojo和Scriptaculous

支持。

Timo


_______


1:有些人误解了AJAX在

Javascript中编写完整的应用程序。这是可能的,但它有一些主要的缺点。

Javascript实现是相同的,但DOM实现不是
。我并不是唯一有此意见的人:
http:// www.loudthinking.com/arc/000428.html


2: http://www.virtuas.com/files/JavaWeb...SweetSpots.pdf


3: http://wicket.sourceforge.net/


4: http://lists.sourceforge.net/lists/listinfo / wicket-user


Do you know what problems JSF and Ajax solve?
Browsers forget the GUI state with each page reload. But they reload the
entire page every time you click a link submit a form. This leads to
annoying delays, and makes it very difficult to maintain the UI state of
complex pages.

JSF is a component-oriented UI framework for the serverside. It takes
care of the UI state, and a reliable language and environment is
available to manipute data.

Using AJAX, you can send a request without reloading the whole page, and
just replace the changed elements [1]. This eliminates the delays, and
can preserve the UI state completely.
It should be possible to provide the functionality you have outlined
with a server side framework in combination with AJAX. But do you have
to use JSF?

In a recent interview [2], Jacob Hookom replied to the question "Do you
support Ajax natively?":

| For AJAX, wea??re planning on pursuing an extension to JSF 1.2 called
| Avatar, based on various EG membersa?? ideas that will allow any and all
| parts of JSF to be used in AJAX applications. [...]
|
| The next revision of JSF (2.0) will probably include a case for a
| a??Partial Faces Requesta?? (AJAX). Also, there will probably be more use
| of annotations to ease the component development aspect of the spec.

In plain language: JSF has *no* support for AJAX right now.

I would definitely not try to build an AJAX app using JSF. You might
want to read the answers of other developers representing other java web
frameworks. I found them very interesting.
The best java web framework with AJAX support might be Wicket. Have a
look at the website [3] and ask for the current state of AJAX support on
the mailing list [4]. AFAIK, there already is Dojo and Scriptaculous
support.
Timo

_______

1: Some people misunderstand AJAX as writing the complete application in
Javascript. This is possible, but it has some major drawbacks. The
Javascript implementations are equal, but the DOM implementations are
not. I am not the only one with this opinion:
http://www.loudthinking.com/arc/000428.html

2: http://www.virtuas.com/files/JavaWeb...SweetSpots.pdf

3: http://wicket.sourceforge.net/

4: http://lists.sourceforge.net/lists/listinfo/wicket-user


这篇关于优点&amp; JSF / Ajax的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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