我是 ExtJS Direct
和 DirectJNgine
的新手。他们之间的关系让我很困惑。我无法获得概览图。
我知道的是:
ExtJS
是一个专注于 UI 设计的 JavaScript
框架。它为程序员提供了大量的 API
。我可以毫不费力地调用这些 API。
来自官方网站:
Ext Direct is a platform and language agnostic technology to remote server-side methods to the client-side. Ext Direct allows for seamless communication between the client-side of an Ext JS application and all popular server platforms.
我的想法是:ExtJS Direct 也是 ExtJS 团队提供给我们使用的 API 的一个子集。这些 API 可以方便我们调用服务器端方法的工作。但我想深入一点。
- 服务器端方法可以是任何语言方法,如 JAVA C++ PHP 等。直接 API 处理支持不同服务器端语言方法的所有可能性?
来自官方网站:
DirectJNgine (or DJN, for short), is a Java based implementation of the Ext Direct API for ExtJs. ExtJs is probably one of the most powerful and attractive UIs for web-based applications, as can be seen here, as well as in many other examples. DirectJNgine makes it much easier to use the full power of Java business classes with such a powerful front-end, making Java methods directly callable from the client.
- 由于 ExtJS Direct 已经实现了无缝远程方法调用的 API。为什么 DirectJNgine 需要实现这些 ExtJS Direct API? “ExtJs 的 Ext Direct API 的基于 Java 的实现”是什么意思?
最佳答案
我将server-side 添加到DirectJNgine
定义中:
DirectJNgine is an Open Source library that provides a Java-based implementation of the server-side Ext Direct API.
Ext Direct
是一个 javascript 框架,驻留在客户端上,让您可以调用任何服务器 API。调用是通过 HTTP 进行的 - 这就是它不依赖于服务器语言的原因。您制定 HTTP 请求,而不是 Java/PHP/任何其他请求。
服务器 API 处理 HTTP 请求,可以用 Java、C++、PHP、.Net 等实现。Java 实现之一是 DirectJNgine
。它在服务器上运行并响应 Ext Direct
调用。
在您的项目中,您可以同时使用 Ext Direct
和 DirectJNgine
进行客户端和服务器之间的通信。 它们不重叠,它们在网络的相对两侧相互合作。
并且您会为表示层使用一些框架(可能是 ExtJS),为服务器业务/存储/其他层使用一些框架(要使用 DirectJNgine
,它将是一个 Java 框架)。
关于javascript - ExtJS Direct 和 DirectJNgine 的关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16415020/