S
S
sderevyanko2014-01-21 12:56:31
Java
sderevyanko, 2014-01-21 12:56:31

How to release Excel contact file parsing with field validation?

SW. colleagues. I have been looking for the right solution for a long time, but I don’t like something in everyone. I don't want to do "somehow". Need advice from an experienced developer.
So the task: Implement parsing of the contacts file with field validation. Validation means checking the file structure, the presence of the expected data in the fields, for example, a phone number by format, date of birth, etc.
Current structure: a file comes to the controller (Spring MVC Controller), you need to validate it and return the result. If not all fields are correct, prompt the user to skip the incorrect ones and continue working.
I ask you to help with architecture, namely a set of interfaces and classes with methods (naturally, without implementation). I can write the current solution - but I don't like it at all due to the many links and code duplication. I read books with patterns, I can not advise, it is thanks to them that I see that my implementation is called "shit code".
Thanks to.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question