abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Misc comments
Date Sat, 05 Aug 2006 20:54:36 GMT
Hey Danny, thanks for the comments. Notes below.

Danny Ayers wrote:
> I've been putting together code for a simple Mail2Atom service
> (working from svn of a day or two ago), thought I'd better pass on the
> following quick notes -
> I believe there is a  geronimo mail libs in /lib (I could be mistaken,
> I've been messing with the jars a lot). Anyhow I had problems with
> POP3  (getSubject() was always null), fixed by replacing it with Sun's
> mail.jar (1.4) and activation.jar (1.1).

Yeah, I've heard of similar problems.  The reason for using the geronimo
jars is more because of the fact that their license (asf) is readily
compatible :-).  I'm not sure what the license restrictions are on the
Sun provided mail.jar / activation.jar.

> It would be nice to have Feed.getEntry(URI id) method (if there isn't
> already something I've missed), maybe even a Feed.containsEntry(URI
> id) (noting that a feed can contain multiple entries with the same id,
> but in most apps this would probably be undesirable).

Yeah, I've been considering adding getEntry(URI id) for a while.  There
will likely be two forms, getEntry(URI) and getEntries(URI), the latter
to account for multiple entries with the same atom:id.

> I'm a bit puzzled by the current modelling of feed/entries - the
> entries are available as a List, yet order isn't significant,
> suggesting Set would be more appropriate, maybe even having Feed
> implement Set. This point wouldn't bother me, but there's no obvious
> way of restricting a feed to a certain number of entries, or removing
> the oldest - both common requirements (well, I could have done with
> them) for which a List, at least internally, would help...or maybe
> LinkedList for next/previous activity..?

There are some contexts in which the ordering of the elements is
significant.  For instance, when we're dealing with XML Digital
Signature validation.  That said, however, the current implementation is
driven, in part, by the underlying Axiom implementation, which is based
on linked lists.

Restricting a feed to a certain number of entries is interesting, as is
a method for removing the oldest entries.  Good suggestions.

> Any chance of making Feed.toString() a little friendlier? Like Atom as
> the default namespace, line breaks & indentation would be nice too...

Yeah, I was already thinking of removing the a: prefix on the elements.
 Regarding formatting, yeah, we could do that for the toString.  For
writeTo, however, I think keeping the breaks and indentation out is a
good thing.

> Generally everything has worked as I'd have expected, but there were
> these places where things could be more convenient. Hmm, a
> feed.crop(int length) might be handy too...

What would be the exact behavior of feed.crop?  Remove the last n
entries in the list or remove the oldest (by atom:updated) n entries in
the list?

> In case anyone wants a nosey, my (undocumented) source so far is in:
> http://dannyayers.com/svn/agency/src/org/pragmatron/atommail/
> ant build file at:
> http://dannyayers.com/svn/agency/atommail.xml
> servlet deployment descriptor at:
> http://dannyayers.com/svn/agency/atommail_web.xml
> Keep up the good work!

Thanks for taking the time to provide feedback. The atommail stuff looks
really good.

- James

> Cheers,
> Danny.

View raw message