Which is the better approach to web services - contract first or contract last?

后端 未结 3 965
长情又很酷
长情又很酷 2021-02-07 18:06

Which is the better approach to developing web services; contract first or contract last?
What are the advantages and disadvantages of each?

Which do you have experi

3条回答
  •  没有蜡笔的小新
    2021-02-07 18:32

    Contract-first is the generally accepted 'best practice.'

    It makes you be very clear with both the producer and consumer of the service exactly what is needed and what is expected. This becomes especially important when you start trying to convert java types -> xml types. You're also able to reuse schemas across different web service.

提交回复
热议问题