Jeansonne Pierre wrote:Feel free to give feedback on my code if you think there's still changes/modification needed. I'll more than happy to learn from my mistake.
OK, well there are a few more things I see:
1. Don't scrunch up all your code. Adding whitespace makes it much more readable.
2. On a similar tack: Don't try to do too much in a single statement. Breaking things up makes them more readable, and also helps if you need to debug.
3. You seem to repeat an awful lot of JSON boilerplate. I suspect that this is because your JSON code is too closely coupled with your information code but, not being a JSON expert, I don't know whether it's necessary or not.
It does bother me a bit that you create a
new deserializer every time you call one of your methods though. At the very least, I would have thought you could add something like:
to your superclass, and then use:
VoidContactRequest voidContactRequest = getVCRequest(request);
in your subclass methods.
That way, if there IS a better way of handling the deserializer, you only have to change the code in
one place.
4. Whenever you have a big list of
static constants, consider using an
enum. For example:
then your
buildNote() code becomes something like:
Enums are incredibly useful things, and it's well worth reading up about them.
HIH
Winston