使用WADL的原因是什么? [英] What is the reason for using WADL?

查看:121
本文介绍了使用WADL的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了描述RESTful,我们可以说每个资源都有其自己的URI.使用HTTP GET,POST,PUT和DELETE,我们可以对这些资源进行操作.所有资源均具有代表性.谁想要使用我们的资源,都可以通过浏览器或REST客户端来使用.

To describe RESTful we can say that every resource has its own URI. Using HTTP GET, POST, PUT and DELETE, we can operate on these resources. All resources are representational. Whoever wants to use our resources can do so via a browser or REST client.

这是RESTful架构的主要思想.这种体系结构允许Internet上的服务.那么为什么这种架构需要WADL? WADL提供哪些标准HTTP不提供的东西?为什么WADL需要存在?

That's the main idea of a RESTful architecture. This architecture allows services on the internet. So why does this architecture need WADL? What does WADL offer that standard HTTP does not? Why does WADL need to exist?

推荐答案

WADL的目的是定义合同.合同规定了一方可以打电话给另一方的方式.

The purpose of WADL is to define a contract. Contract specifies how one party can call another.

从头开始创建Web应用程序时,不需要合同和WADL .

When you create a web application from scratch, you don't need contract and WADL.

当您将系统与其他系统集成在一起并且可以与他们的开发团队进行清晰的沟通时,您不需要合同和WADL (因为您可以打个电话使事情变得清晰)

When you integrate your system with the other system and you can communicate clearly with their development team, you don't need contract and WADL (because you can make a phone call to make things clear).

但是,当您将一个复杂的企业系统与由几个不同的公司(或联邦机构)维护的其他几个复杂的企业系统集成时,请相信我您想要尽可能严格地定义一个通信合同. 然后您需要WADL或开放规范.迫切需要它.

However when you integrate a complex enterprise system with several others complex enterprise systems maintained by several different companies (or federal institutions), then believe me you want to have a communication contract defined as strictly as possible. Then you need WADL or Open Specification. Need it badly.

企业背景薄弱的人们倾向于将整个IT视为独立开发的独立Web应用程序的集合.但是企业现实有时很难.有时,您甚至无法致电或写信给开发必须与之集成的应用程序的人员.有时,您与不再维护的旧应用程序通信-它仅在运行,您需要弄清楚如何与之正确通信. 在这种情况下,您需要签订合同,因为它可以节省您的资金.

People with weak enterprise background tend to see entire IT as a collection of separated web applications developed independently. But enterprise reality is sometimes tough. Sometimes you can't even call or write to the people developing the application you have to integrate with. Sometimes you communicate with a legacy application that is no longer maintained--it just runs and you need to figure out how to communicate with it properly. In such conditions you need a contract because it saves your ass.

实际上,客户生成是合同定义的次要特征.只是个玩具而已.合同强制不良沟通者清楚地传达集成规则.这是使用WADL或Open Specification或其他任何方式的主要原因.

Actually client generation is the minor feature of the contract definition. It's just a toy. Contract enforces bad communicators to communicate integration rules clearly. This is the main reason to use WADL or Open Specification or whatever.

这篇关于使用WADL的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆