abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: Named Writers and Parsers
Date Mon, 30 Oct 2006 01:13:50 GMT
On 10/27/06, James M Snell <jasnell@gmail.com> wrote:
> As we start to move closer to a 0.2.0 release, I think it prudent that
> we examine the various features we offer and determine if various bits
> are still necessary to keep around or not.  I'd like to streamline
> wherever we can.
>
> In the core, beyond the basic parsing and serialization of Atom and APP
> documents, we support a number of extra things like Named Parsers and
> Named Writers.
>
> These essentially provide a means of registering alternative parser and
> writer implementations so that they can be retrieved by name rather than
> by class.  e.g. writerFactory.getWriter("prettyxml").
>
> There is a certain amount of overhead, however, in providing these
> mechanisms.
>
> The following is easier and does not require any configuration.
>
>    Abdera abdera = new Abdera();
>    Writer writer = new PrettyXmlWriter(abdera);
>
> Therefore, I'd like to pull out the Named Writer and Named Parser stuff.

Well, I think it depends on how we expect the writers or parsers to be
implemented.  For writers especially, I seem to recall that things
like the PrettyXmlWriter actually do depend on a given parser back
end, so if we have the ability to have multiple parsers (and have an
abstraction that separates knowledge of the particular parser impl
from the client code) then we also need one for the writer code.

-garrett

Mime
View raw message