proquestinterview/webapptest — pull request #1 by daiconrad (2012-06-18 19:47:50+00:00)
Title: Test for David Conrad

I implemented the methods as requested. I also decided to significantly alter the Person class to make it immutable and not allow null for name, address, or phone number. Avoiding null, where possible and appropriate, is a good thing. I added an allPeople() method to the PhoneBook interface to allow iterating over a (read-only) view of the contents of the phone book. I could have implemented the database calls using raw JDBC calls, but typically that is hidden behind Spring, Hibernate, or at least Apache Commons DbUtils these days. I didn't want to make major alterations to the project for what is supposed to be a quick test, so I just added DbUtils to the project. Let me know if you would like to see the database calls rewritten using raw JDBC calls. Finally, I added a few static methods to look people up in the database, just to show what that would look like. If I have misunderstood any part of what was desired, let me know. All the best, David Conrad.