2007-05-10
Obsoleting huge amounts of code
At the moment, Blam uses a library known as Atom.NET to parse Atom feeds. This is probably not a very big library by many standards, but it's actually bigger than Blam at about 7k LOC and to top it off it doesn't talk well with Atom 1.0
I thought there had to be a better way of dealing with those feeds, so I build myself a parser making use of Mono/.NET's System.Xml.XmlSerialization. With this I have a parser in 80 LOC, which will go down slightly when I remove one function which has become useless.
There are two erm... problems with this implementation:
- System.Xml.XmlSerialization doesn't understand the Atom namespace, so what I do is change the namespace when I read the feed and give that to XmlSerializer.Deserialize(). Yes, this is cheating, but it's for a good cause.
- Right now what you get is the raw information from the feed. It needs some helper functions, which should be a few hundred LOC.
This will make it into the Blam repository in a few days or weeks, depending on how much I get done.
Labels: blam