On the planet, you may have just seen me publish last week's blog post an hour ago. These blog posts take a bit of care for me, since I don't want to rush garbage out to so many readers. I send a simpler point-form report out to the gsoc mailing list (which did go out last week) and then usually write the nicer blog post the next day. Waiting for some editing, I actually forgot to put the last one up after getting busy. Sorry! Here is the current progress, though.
Past week
Scheduling and keeping up-to-date
I'm getting better at keeping the git repository for GDom up to date, though still not quite as regularly as my dutiful mentor Alberto Ruiz has requested. I do have some school work this summer as part of my Masters that takes up part of my earlier week, so I'm going to shift my GSoC work earlier to the start of the week to ensure that I can have everything ready for Friday evening, rather than sending out my mailing list reports late on Friday night and following up with the blog post later.
Document, Element, and Node
The support for these three interfaces is almost complete now. Document will need some novel work on loading and saving from GIO streams, but the interfaces pass the unit tests. Speaking of which, these three interfaces all have beautiful unit tests now. There's probably still a little room for improvement, but I'm moving on to focus on other classes now.
Attr
I actually intended on finishing implementing this and creating tests for it this past week. The implementation was working mostly but I ran out of time for its test suite, which I'm working on today.
Refactoring
This probably isn't too interesting, but my initial plans for the class hierarchy have had to be refactored a couple times (didn't take too long), because not all interfaces described in the spec correspond perfectly to libxml2's DOM support. We now have a base DomNode that describes the DOM spec's interface, and a BackedNode that does a general implementation of it using libxml2's Xml.Node. Then, other interfaces that use libxml2's Xml.Node are based on BackedNode, while interfaces that don't just base off of DomNode, and sometimes require some local data. This might get messy when saving files back, though. Yikes!
Upcoming
Build System
When I talk to my mentor Alberto Ruiz next, I hope to discuss autotools versus WAF. I keep meaning to investigate it more myself, but ended up with Internet disruptions last week (went to Ottawa for academic reasons and my accommodation's Internet was out) and was generally busy, so this is now an item for this week.
GIO integration
Need to figure out the best way to use GIO to load and save files by stream for our underlying libxml2 usage. Currently, I just have Document reading from a Unix file path. Hehe.
Attr test case
Finish this. My general approach has been to at least stub out all the properties and methods and try obvious implementations for them first (usually doing something with an underlying libxml2 structure), and then going through the spec to write tests for the class. The tests usually reveal all the tricky points in my handling of libxml2 data, or my class hierarchy, and I make another pass to get the class compliant. It's FUN!
live.gnome.org/XML updates
I have a list of things to go up there, now that I'm into the project, including
- list of similar projects and how we differ
- performance test cases and results (haven't started measuring yet, though)
- list of features and suggestions to be considered in the future, after GSoC
I think I'd also like to put a simple class diagram up.
Good day
Thanks for reading this far. Also, as noted in my previous post, if you have specific test cases (e.g. large or complex files) that you'd like to see supported, please send them to me: aquarichy at gmail dot com.
Cheerio!