为什么 google api 客户端库不构建在 Apache 的 Abdera 框架之上?
首先,我要非常感谢 Google GData API 工程师的出色工作,并且我想指出的是,这个问题并不是要批评任何事情。它只是指出一些事情。
有人可以向我解释一下吗?据我所知,java的google api客户端库的开发人员正在重新发明轮子。这就像为 Java 项目编写一个新的 JDK,因为 abdera 客户端执行 google api 客户端库执行的操作,并且 abdera 服务器功能和适配器也可以用于许多事情,例如条目持久性等。
我知道 google 数据协议是一种有点特定的原子发布,但是如果需要使用 Apache Abdera 项目为此协议提供的一些奇特的扩展和功能,最好不要使用 google api 客户端库并使用 Abdera 从头开始实现客户端...我确信在很多情况下,它的功能(例如 Abdera 的 JCR 适配器)对于 google 文档、google 翻译工具包以及实际上对于大多数其他工具来说将变得非常方便。
现在很高兴有一个 google api 客户端库可用于 google 文档,但我该如何处理文档和 Atom feed 响应呢?我相信在超过一半的情况下,另一侧也有一个存储库或数据库。在这种情况下,需要 abdera,而不是仅编组/解组提要的简单 google api 客户端...
事实上,所有 google API 中都有一些需要保留的东西。如果谷歌决定将精力投入到 Abdera 增强或集成上,那么这是有道理的……但这并不……特别是考虑到软件开发中众所周知的事实,第二个版本通常是从头开始重写的。 Apache Abdera 是一个成熟的项目,已有 5 年的历史,被大量应用程序使用。
如果有我没有看到的原因,并且仅使用拉解析器来实现客户端确实是必要的,那么我至少会使用未弃用的 xml 拉解析器。 Xmlpull.org 已有 6 年历史,但不活跃,甚至没有实现 StAX api。 stax.codehaus.org 参考实现、JRE 默认 stax 实现、Apache Axiom 实现以及主要的 woodstox.codehaus.org 实现会更好,为什么要避免具有支持和社区的规范和活动项目?
对于这个批评,我向 google api 客户端 java 库的开发人员表示歉意,但我真的很喜欢 google api,但是使用这个客户端的第一个版本确实是痛苦的经历,当前版本很好。但实际上浪费了大量时间,主要是由于重新发明轮子以及从版本 0 通过 gdata-java-client 到 google-api-client-java 的极端版本间更改。
最后,在人们投入时间和金钱之后,谷歌对 API 进行了限制,所以为什么要关心,对吧? :-)
我收回我的话,从那时起软件和协议发生了很大变化...现在当 GData 也支持 JSON 时,使用它甚至没有意义!
First of all I want to give many thanks to Google GData API's engineers for their good work and I'd like to mention that this question is not meant to criticize anything. It just pointing out things.
Could anybody please explain that to me? As far as I can see, the developers of java's google api client library are reinventing the wheel. It's like writing a new JDK for a Java project, because abdera client does what google api client library does and abdera server features and adapters could be used as well for many things, like entry persistence and many others.
I'm aware of the fact that google data protocol is a little specific atom publishing, but if one needs to use some of the fancy extensions and features that Apache Abdera project offers for this protocol, it is better not to use google api client library and implement the client from scratch with Abdera... And I'm sure that in a lot of cases its features such as Abdera's JCR adapter would become very handy for google docs, google translator toolkit and practically for most of the others.
Now it's great that there is a google api client library to be used for google docs, but what am I going to do with the documents and atom feed responses? I believe that in more than a half cases there is also a repository or database on the other side. And in that case, abdera is needed, not the simple google api clients that are only marshalling/unmarshalling the feeds...
In fact, there is something to persist in all of the google APIs. It would make sense, if google decided to invest the effort into Abdera enhancement or integration... This doesn't... Especially considering a very known fact in software development, that second release is usually rewritten from scratch. Apache Abdera is a mature project with 5 years of its existence, used by tons of apps.
If there are reasons, that I don't see and implementing the client with the use of pull parser only was really necessary, I would at least use a xml pull parser that is not deprecated. Xmlpull.org is 6 years old, but inactive and it doesn't even implement StAX api. stax.codehaus.org reference implementation, JRE default stax implementation, Apache Axiom implementation and mainly woodstox.codehaus.org implementation would be way better, why to avoid specifications and active projects with support and community ?
My apologies to the developers of google api client java library for this critique, but I really like google apis, but working with the first version of this client was really bitter experience, the current release is nice. But a lot of time was wasted actually mainly due to Reinventing the wheel and those extreme inter-release changes from version 0 via gdata-java-client to google-api-client-java.
Finally, google makes the APIs restricted after people invest both time and money into it, so why care, right ? :-)
I'm taking back what I said, the software and protocol changed a lot since then... Now when GData supports JSON as well it wouldn't even makes sense to use it !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有同样的问题。您可以从 google-feedserver 项目中获取灵感。它使用旧的 gdata 版本的 google 客户端库,但该项目将其与 Apache Abdera 结合起来。他们通过 ibatis 进行数据库持久化。
然而,我做了什么:我花了 2 天的时间使用 google api 客户端库学习和实现我的客户端应用程序,希望该库的开发能够继续进行并添加新功能。但不幸的是,很长一段时间以来,情况几乎都是一样的。所以我最近使用了 Abdera 客户端,并为 google data api 创建了一些扩展 org.apache.abdera.examples.extension.* ,并且我完全使用了 Abdera。想一想,没有必要使用google api客户端库。你只需要设置授权标头
至于为什么谷歌不使用Abdera框架,我问自己同样的问题。这是 Java 世界的问题之一。很多地方都浪费了。 Abdera 框架是一个非常好的项目,并且对 Google 充满敬意,如果他们决定创建自己的客户端库,他们应该做得更强大。 (这是我的观点)简单地说,如果 Abdera 框架很糟糕,我会理解它,但它做得非常好并且功能非常丰富。
另一方面,Abdera 框架所具有的功能是由于项目的性质而存在的。它主要是一个atompub 服务器,因此它应该处理客户端提供的数据。但是谷歌 API 客户端也需要处理,尽管谷歌客户端库不提供这种可能性。
I had the same problem. You can get inspiration from google-feedserver project. It uses the old gdata version of google client library, but the project deals with combination of it with Apache Abdera. They are doing database persistence via ibatis.
However, what I did: I spent 2 days learning and implementing my client app with google api client library hoping that the development of the library will go on and new features will be added. But unfortunately it's pretty much the same for a long time. So I recently used Abdera client and I created a few extensions
org.apache.abdera.examples.extension.*
for google data api and I used Abdera entirely. If you think about it, there is no need to use the google api client library. You just need to set up authorization headerAs to why google doesn't use Abdera framework, I'm asking myself the same question. It's one of the problems of Java world. Waste on many places. Abdera framework is a really nice project and with all due respect to Google, if they decided to create its own client library they should do it more powerful. (it's my opinion) Simply put, if Abdera framework was crappy, I'd get it, but it is very well done and very feature rich.
On the other hand, the features that Abdera framework has, exist because of the nature of the project. It's mainly an atompub server, so that it is supposed to handle data supplied by clients. But google API clients kinda require handling as well, though google client library doesn't offer the possibility.