English 中文(简体)
RESTful service description
原标题:

From what I understand, I need to use WADL to describe a RESTful web service. Still, I have read many answers in relevant posts, where users are strongly opposed the use of WADL.

What are the disadvantages of WADL? Is there any alternative solution?

最佳回答

The HTTP spec tells you how to retrieve and update resources. Resources are identified by URIs and should be linked together, so all data should be discoverable from the service root url, just like pages on a web site. What that leaves is for you to document the media-types that you are transferring across the wire.

If you take this approach and you reuse media-types across services then you only need to document the media type once and it will be applicable for all services.

Once you have done those steps there is really nothing left for WADL to document.

If you want to do REST you cannot use WADL to code generate clients, as that creates a tight coupling between client and server. If that s ok with you, fine, but just realize that you are not doing REST and therefore will not realize some of the benefits of REST.

问题回答

暂无回答




相关问题
XML-RPC Standard and XML Data Type

I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...

Is it exists any "rss hosting" with API for creating feeds

I am creating a desktop app that will create some reports. I want to export these reports as RSS or ATOM feeds. I can easily create feeds with Rome lib for Java. But I have no idea how to spread them. ...

Improving Q-Learning

I am currently using Q-Learning to try to teach a bot how to move in a room filled with walls/obstacles. It must start in any place in the room and get to the goal state(this might be, to the tile ...

High-traffic, Highly-secure web API, what language? [closed]

If you were planning on building a high-traffic, very secure site what language would you use? For example, if you were planning on say building an authorize.net-scale site, that had to handle tons ...

Def, Void, Function?

Recently, I ve been learning different programming langages, and come across many different names to initalize a function construct. For instance, ruby and python use the def keyword, and php and ...

热门标签