Monday, November 5, 2007

26. StackStripesExtension

For this assignment we were given an existing Stripes web application system and were asked to do some modifications to it.

What was difficult about this assignment? What problems were encountered in carrying out the work, and how did you resolve them? (grouped together since they are similar)

I think the main difficulty was that it is a new framework and I haven't touched web apps, so it was new territory for me. More specifically...

The first difficulty was getting verify to run. Apparently there is some issue with Eclipse that causes the running directory to not necessarily equal the directory the script was run from. Because of this, coverage.ac would get dumped into tomcat's directory rather than the project directory, and that would mess up the script. I thus had to run everything from the command line rather than Eclipse.

Next, data persists between JUnit tests - something I did not realize until the second time I ran it. It wouldn't be obvious at first since only one test was provided - but once the second test was added, you could start to notice it as being an issue.

Lastly, thinking of a good way to implement Double It was an issue. Initially I wanted to have all the code for it reside in the Response handler, but it turned out to be difficult since without access to the private Stack, it adds about 10x more code to do so. I was writing a function that did popping manually until I realized I'd have to handle an exception that never gets thrown. So in the end, I wrote a new static member for the StackModel object.

Were all of the assigned tasks completed? If not, which ones weren't, and why didn't you finish them?

Yes.

Concluding remarks:

I don't think the build files were perfect - they do get the job done, but they could certainly be improved. If I spent more time on this (which I probably will be for the next project), I probably would have modified them to do two things:

- work in Eclipse, and
- automatically start the Tomcat server if it isn't running, rather than spit out an error message

No comments: