Monday, September 24, 2007

11. WebSpider

All tasks are completed while the extra credit section is not attempted. My code can be found here.

This turns out to be a more difficult task than I thought. First of all, there was the problem with JUnit. I didn't realize that the build.xml is incomplete and I wasted a lot of time on trying out different solution. It took me a long while until I finally find out what is wrong. This was frustrating but it gave me the opportunity to learn JUnit and Ant better.

Secondly, there is the httpunit. I was confused with all the different classes and functions like WebRequest and WebResponse. I always end up using the wrong one or having to do a lot of conversion between different types before I can get what I wanted. Moreover, the program always run into different kind of errors when trying to opening the URLs. I have to solve these problems by throwing a lot of exceptions.

Thirdly, there were no sample output and I didn’t know if the result I got is correct. This prohibited me from improving and correcting the program as I couldn’t tell how is my program doing. If I have more time, I would have build up a sample test page so that I can test my program on it.

Fourthly, I have nevery used logging in Java but it was okay as I found some useful examples on the web.

All in all, this is a challenging assignment. Through this assignment, I have explored Emma, JUnit, Ant, HttpUnit and Eclipse in greater detail. I wish I have started on this assignment earlier on so that I would have time to attempt the extra credit portion.

No comments: