本文介绍了为什么人们不做WSDL第一?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们正在使用 WSDL + XSD-first 方法创建我们的服务,我们首先创建(借助于工具)XSD模式和WSDL,然后将它们编译为.NET和Java类进行互操作。



我想证明为什么我们使用这种方法。我提到它更符合OOP(首先定义接口,然后实现,而不是反之亦然),并且您可以更好地控制互操作性限制。此外,您可以明确定义命名空间,并帮助在应用程序之间重用XSD



相反,今天仍然有很多人喜欢在他们的IDE中实现代码,并从中生成WSDL。问题是,为什么?

解决方案

两种风格的开发都有,但是我不认为合约最后使用的更多只是因为在新手上更容易和更快捷,正如你所说,但主要是因为作为工具和框架演变,WSDL迅速转入目录中的,引用:

没有人想写无聊,重复的代码,特别是当有很多工具和框架为您做的时候。如果你甚至不了解SOAP,WSDL或XSD对于某些...甚至更好,或者我应该说魔术...但是:)。


I'm currently making a presentation that deals with web services.

We created our service using WSDL+XSD-first approach, in which we first created (with the aid of tools) the XSD schema and WSDL and then compiled both to .NET and Java classes for interoperation.

I want to justify why we used this approach. I mentioned that it's more OOP-compliant (first define interface, then implementation, not vice versa) and that you have more control over interoperability constraints. Also, you can define namespaces explicitly and help reuse XSDs across applications

On the contrary, today, still many people prefer implementing the code in their IDE and generate WSDL from there. The question is, why?

解决方案

Both styles of development have advantages and disadvantages but I don't think contract last is used more just because it's easier and quicker on the newbies, as you say, but mainly because as tools and frameworks evolved, the WSDL quickly moved into what's cataloged as plumbing code, quote:

Nobody wants to write boring, repetitive code, especially when there are plenty of tools and frameworks to do it for you. If you don't even have to understand SOAP, WSDL or XSD that's even better for some... or should I say "magic"... but that's a different discussion :).

这篇关于为什么人们不做WSDL第一?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 14:56
查看更多