extJS4 Ext.Ajax 和 Ext.data.proxy.Ajax 之间的区别

发布于 2024-12-21 01:15:14 字数 230 浏览 2 评论 0原文

我是 extJS 框架的新手,在查看这两个类之后,我很好奇什么时候使用其中一个更好。一种是提交更好,一种是获取更好?在我目前的情况下,我使用的是网格,api 说使用我信任的 proxy.Ajax。但是假设我想将 JSON 发送回数据库,使用 Ext.Ajax 会更好吗?

另外,我对 JSON 相当陌生,我知道它本质上只是一个带有正则表达式的字符串。如果我不想在本地存储 json,将 json 直接发送到数据库的最佳方法是什么?

I am new to the extJS framework and after looking at these two classes I am curious when it is better to use one or the other. Is one better for submitting and one for getting? In my current situation I am using a grid and the api says to use the proxy.Ajax which I trust. But lets say I want to send the JSON back to a database, would I be better off using Ext.Ajax?

Also I am rather new to JSON I understand that its just a string with regular expressions essentially. What is the best way to send the json straight to a database if I don’t want to store the json locally?

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

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

发布评论

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

评论(1

被你宠の有点坏 2024-12-28 01:15:15

Ext.Ajax 用于向服务器发出一次性请求。您可以将其用于 GET 和 POST 请求。

Ext.data.proxy.Ajax 由数据包使用,特别是 Ext.data.Store。您不能“手动”使用此功能。您必须通过数据包使用它。

Ext.Ajax is used to make one-off requests to a server. You can use this for GET and POST requests.

Ext.data.proxy.Ajax is used by the data package, in particular, Ext.data.Store's. You cannot use this 'manually'. You must use it via the data package.

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