从服务器更新 UI

发布于 2024-10-11 18:38:15 字数 773 浏览 3 评论 0原文

对于类似桌面的应用程序,组件之间需要大量交互,ExtJS 是否仍然比 Ext GWT 更好?

您决定使用 Ext GWT 而不是 ExtJS 的原因是什么?

我目前对 ExtJS 的看法是,对于不需要服务器与客户端交互的应用程序(例如提要查看器、论坛浏览器等),它比 ExtGWT 快得多 - 服务器不需要对应用程序进行复杂的更新客户。

我不确定 ExtJS 是否比 Ext GWT 更好的复杂场景是一棵包含大量节点和数据网格的树。用户单击按钮,服务器将通过在树或网格中插入一些项目来决定更新哪些组件:树或/和数据网格(客户端无法知道哪些组件将被更新,只有服务器知道)。

为此,我会让服务器序列化一些必须由客户端在 success 方法上执行的操作(例如 addTreeItem 或 addGridRow)。服务器还可以在此请求之后创建新组件,因此可能存在带有来自服务器的序列化 HTML 的“createComponent”。

因此,通过使用 ExtJS,整个组件必须被序列化并发送到客户端进行实例化(但这可能很慢 - 请参阅 http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/)。鉴于此,ExtJS 仍然是更好的选择吗?

主要目标是拥有一个快速且响应迅速的应用程序,而不是重新发明轮子。

谢谢你!

For a desktop-like app where a lot of interactions are needed between components, can still ExtJS be a better way than Ext GWT?

What is the point where you decide to use Ext GWT instead of ExtJS?

My current arguments for ExtJS is that it's much faster than ExtGWT for apps where you don't need the server to interact with the client like feed viewers, forum browsers, etc. - where there is no need for the server to make complex updates to the client.

A complex scenario that I'm not sure ExtJS is better than Ext GWT is a tree with lots of nodes and a data grid. The user clicks a button and the server will decide which components to update: the tree or/and the data grid by inserting some items in the tree or the grid(the client can't know which components will be updated, only the server knows).

For this, I'd make the server serialize some actions(like addTreeItem or addGridRow) that must be executed by the client on success method. The server could also create new components after this request, so there could be "createComponent" with the serialized HTML coming from server.

So, by using ExtJS, whole components must be serialized and sent for instantiation to client(but this can be SLOW - see http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/). Given this, is still ExtJS a better way to go?

The main target is having a fast and responsive application, but not reinventing the wheel.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野鹿林 2024-10-18 18:38:15

因此,通过使用 ExtJS,必须序列化整个组件并将其发送到客户端进行实例化(但这可能很慢 - 请参阅 http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/)。 p>

你误解了那篇文章——重点是他说不要这样做。在某些情况下可以从服务器发送组件,但不典型也不推荐。

关于 Ext JS 与 GWT,您正在将苹果与橘子进行比较。如果您是 Java 开发人员,请选择 GWT。如果您是 JS 开发人员,请使用 Ext JS。最终,它们都以 JS/CSS 的形式出现在客户端——如果它们都具有您需要的小部件和功能,那么您可以选择最有生产力的环境。如果仍然不重要,请使用 Ext JS,因为它是在功能方面通常领先于 GWT。

So, by using ExtJS, whole components must be serialized and sent for instantiation to client(but this can be SLOW - see http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/).

You misinterpreted that article -- the point is he's saying NOT to do that. Sending components from the server can be done in certain circumstances, but is not typical or recommended.

Regarding Ext JS vs GWT, you're comparing apples to oranges. If you are a Java dev, go with GWT. If you are a JS dev go with Ext JS. Ultimately they both end up as JS/CSS on the client -- if they both have the widgets and functionality you need choose the environment you'll be most productive in. If it still doesn't matter go with Ext JS, only because it's usually ahead of GWT in terms of features.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文