Skip to main content

The smallest ATOM feed in the world

Posted by felipegaucho on December 14, 2008 at 11:56 AM PST

I had another Quickie at Devoxx08, a brief explanation on how to publish and read Atom and Rss feeds without using third-party libraries like Apache Abdera or Rome.

As I promised during my Quickie presentation, click here to download the sample code.

Last minute update: Click here to download the smallest sample project as possible

In order to run the examples, please run ANT in the root of the projects and then use your IDE to run the main classes of both Desktop example and the Grizzly one.

* I will try to find a spare time for another blog entry with the details, but if you have any question please send me an email or post a comment in the form below.

* Ah, yes, smallest means less third party dependencies and the same lines of code required to produce the web-feed. I compared my code with Abdera and Rome, and I found almost no difference. So, I just released the dependency JARs, kept the same feed quality and used the same amount of line codes.

Related Topics >>


The JDK 6 doesn't contain the ant task to compile the schemas. The dependencies will be smaller at runtime, but not a the compilation. I took that there :

whartung, yes, it depends on Java 6 or higher, but I not consider this dependency since JRE 6 is required to run any Java program anyway.. but, you have a point to Java 5 or lower.. my small atom feed depends on Java 6.

But it does require JAXB. So that says your feed has an implied dependency on Java 6, or a container that already provides JAXB. Granted, these exist, but they're not widespread to the point of assuming that everyone just happens to have them handy.

snoopdave, I should find that time to do a proper blog.. I confess things eventually seems messy without better explanations.. I released 2 examples: the first one requires JAXB libs in order to compile the schema, and the second one requires Grizzly libs in order to publish the atom on the web.... but, the compiled schema itself is 22Kb, and you don't need anything else to publish the atom.. so, my 22Kb is much less than the 354Kb of Rome :) I will republish this in a few days, with the details and a more clear text. Few people asked me the examples after Devoxx and I didn't have time to recover from the conference, but I would like to release the examples anyway... more to follow this...

I'm not going to claim that ROME is the best way to generate Atom, but ROME is a single 202kb jar with only one dependency, which is JDOM at 152kb. You have almost 12MB of jars in your source tree so I wonder about your claim of smallest 3rd party dependencies. - Dave