开发者

what do contract-first and contract-last mean?

I am doing some research on web services. I have not written any web service but I am doing a small write up on them.

During my research I've come across 开发者_如何学JAVAterms contract-first and contract-last.

Can someone explain these two in an understandable form ?


To expound on the answer by Kaleb, contract-first is where you create the WSDL, and then you can create the implementation from this, and since the WSDL is your contract, this would be contract-first.

Contract-last is where the WSDL is created from the source code, or implementation, so it will most likely be generated by a tool rather than created by the developer.

Update:

For a nice explanation with code, in Java, you can look at this explanation from the Spring Web Services 1.5 documentation.

They will discuss the pros and cons, though they will be biased toward their approach (which is contract-first). Anyway, I think it is a nice explanation.


Contract-first means you design the way your services are going to communicate with each other before you design the services themselves.

Contract-last is the other way around – you design how your service is going to work, then make one or more methods available as the interface for other services.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜