When building Java RESTful Service, what has bigger advantages - to create POJOs or XML documents for them first?



For instance, when I know how all representations should look like, which path has more advantages.




  1. Creating/Annotating Java classes and then document them in (lets say) XML documentations.




  2. Write XML representation and then generate Java classes.




From what I may think of:


First approach would increase development speed. Since documentation is the last step (when it's feasible).


Second approach may let me feel as I am the client (for my own App) and will lead me to consider, how practical is my representation from a user standpoint.


But I have no other ideas, while I assume that this topic might be important in some cases, that I just don't know yet.


No comments:

Post a Comment