BlazeDS 与 GraniteDS

发布于 2024-07-11 17:43:29 字数 71 浏览 4 评论 0原文

有人有评估 BlazeDS 和 GraniteDS 的经验吗? 我很好奇哪个更适合与 Spring/Hibernate 集成。

Anyone have any experience evaluating BlazeDS and GraniteDS? I'm curious about which is better at integrating with Spring/Hibernate.

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

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

发布评论

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

评论(2

一曲爱恨情仇 2024-07-18 17:43:29

如果您只是在寻找简单的 RPC 和消息传递,我会选择 Blaze。 这些实现更加成熟并且得到了更好的验证,特别是在消息传递方面。 Granite 中的消息传递基于 Comet,并且在我的记忆中仍然很新。 更多详细信息如下...

Blaze DS 基本上是一个堆栈,其中包括 RPC 和一些基于 HTTP 的简单消息传递服务。 使用 FlexFactory 的 SpringFactory 实现可以轻松实现与 Spring 的集成:只需 google 类名即可找到代码。 它不为 Hibernate 相关的事物提供任何额外的支持。

Granite DS 在功能方面正在快速增长。 与 Blaze DS 相比,它与 LCDS 的竞争更大。 它包括解析 Hibernate 对象图并以干净的方式处理惰性代理的能力。 他们还有一个名为“Tide”的工具,可以在 Flex 客户端中创建会话的模拟,以确保实体的唯一性。 它们还明确支持通过 Spring、EJB3 和 Seam 公开的服务。 Granite 还有一个实用程序,用于从 Java 类生成 AS3 类(尽管如果您愿意的话,自己编写并不难)。

大约一年前,我与 Granite 合作,在正确解析对象图时遇到了一些问题; Flash Player 会抛出一些令人讨厌的低级异常。 我的猜测是,文档和实现已经成熟,因此这些不再是问题。 然而,我仍然有点犹豫是否推荐它,因为我遇到了问题并且切换到 Blaze 立即解决了这些问题,没有任何麻烦。

If you are just looking for simple RPC and messaging, I would go with Blaze. The implementations are more mature and better proven, especially with respect to messaging. The messaging in Granite is based on Comet and still pretty new from what I remember. More details below...

Blaze DS is basically a stack that includes RPC and some simple messaging services over HTTP. Integration with Spring is achieved easily using the SpringFactory implementation of FlexFactory: just google the class name and you'll find the code. It doesn't offer any additional support for things Hibernate-related.

Granite DS is growing rapidly in terms of features. It competes more with LCDS than Blaze DS. It includes the ability to parse Hibernate object graphs and deal with lazy proxies in a clean fashion. They also have a tool called "Tide" that creates an analog of a Session in the Flex client to ensure uniqueness of entities. They also have explicit support for services exposed via Spring, EJB3 and Seam. Granite also has a utility for generating AS3 classes from your Java classes (although this not hard to write yourself if you want to).

I worked with Granite about a year ago and had some problems getting it properly parse object graphs; the Flash Player would throw some nasty low-level exceptions. My guess is that the documentation and implementation have matured since so that these are no longer issues. However, I'm still a bit hesitant to recommend it since I ran into issues and switching to Blaze immediately resolved them with no trouble at all.

把人绕傻吧 2024-07-18 17:43:29

关于 Cliff 评论的一些旁注:

  1. GraniteDS 于 2006 年底创建,大约比 BlazeDS 早一年。 它广泛应用于要求苛刻的生产环境,至少可以被认为比 BlazeDS 成熟且经过验证。
  2. GraniteDS 消息传递在 1.0 版本中引入(2007 年末,第一个 BlazeDS 版本发布几周后),现在它已经非常成熟,并且在要求严格的生产环境中得到了验证。
  3. Cliff遇到的Flash播放器异常一般是由于未能编译SWF中所有生成的AS3类而引起的。 只需使用 Flex 编译器选项强制包含这些缺失的类,这些类是数据图模型的一部分,在反序列化时需要,但在 MXML/AS3 代码中未显式使用。
  4. 大多数 GraniteDS 用户来自 BlazeDS/LCDS,因为这两个框架不能正确处理复杂的数据模型(没有或错误的延迟加载支持、糟糕的事务隔离等)。

所以,恕我直言,除非您正在开发一个小型应用程序对于相当简单的数据模型,您应该使用 GraniteDS。

A few side notes on Cliff's comments:

  1. GraniteDS was created late 2006, about one year before BlazeDS. It is widely used in demanding production environments and could be at least considered as mature and proven than BlazeDS.
  2. GraniteDS messaging was introduced in the 1.0 release (late 2007, few weeks after the first BlazeDS release), it is now very mature and proven as well in demanding production environments.
  3. The Flash player exceptions encountered by Cliff are generally caused by failing to compile all generated AS3 classes in the SWF. It is only a matter of using a Flex compiler option that forces the inclusion of these missing classes, which are part of the data graph model and required at deserialization time but not explicitly used in the MXML/AS3 code.
  4. Most of the GraniteDS users are coming from BlazeDS/LCDS because these two frameworks are not dealing correctly with complex data models (no or faulty lazy-loading support, bad transaction isolation, etc.)

So, IMHO, unless you are developing a small application with a rather trivial data model, you should go to GraniteDS.

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