Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't google api client library built on top of Apache's Abdera framework?

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 !

like image 826
lisak Avatar asked Nov 06 '22 01:11

lisak


1 Answers

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 header

clientLogin.authenticate().setAuthorizationHeader(Util.getTransport());

As 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.

like image 87
lisak Avatar answered Nov 12 '22 20:11

lisak