阿贾克斯,宁静/休息JSON和JSONP之间的区别 [英] Difference between Ajax, restful/Rest JSON and JSONP

查看:218
本文介绍了阿贾克斯,宁静/休息JSON和JSONP之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是混淆了这些术语任何人可以请提供/解释我简单举个例子?

I am just confused with the these terms can anybody please provide/explain me brief with an example?

感谢

推荐答案

  • 阿贾克斯 - 异步JavaScript和XML 。阿贾克斯松散定义了一套技术来帮助使Web应用程序present更丰富的用户体验。数据更新和刷新屏幕使用JavaScript和XML(或JSON或只是一个正常的HTTP POST)完成异步的。

  • Ajax - "Asynchronous Javascript and XML". Ajax loosely defines a set of technologies to help make web applications present a richer user experience. Data updating and refreshing of the screen is done asynchronously using javascript and xml (or json or just a normal http post).

    JSON - JavaScript对象符号。 JSON是像的xml的,因为它可以用来描述对象,但它更紧​​凑和具有可实际的javascript的优点。 pssed在JSON对象EX $ P $可以被转换成一个实际的对象被操纵在JavaScript code。

    JSON - "Javascript Object Notation". JSON is like xml in that it can be used to describe objects, but it's more compact and has the advantage of being actual javascript. An object expressed in JSON can be converted into an actual object to be manipulated in javascript code.

    缺省情况下,Ajax请求必须发生在其中请求发起的网页相同的域。 JSONP - JSON与填充 - 是为了让你从不同的域请求JSON资源。 ( CORS 是JSONP一个更新,更好的选择。)

    By default, Ajax requests have to occur in the same domain of the page where the request originates. JSONP - "JSON with padding" - was created to allow you to request JSON resources from a different domain. (CORS is a newer and better alternative to JSONP.)

    REST - 再presentational状态转移。使用REST原则的应用程序有一个URL结构,并且围绕着资源的使用请求/响应模式。在一个纯粹的模型中,HTTP动词GET,POST PUT和DELETE用于检索,创建,更新和删除分别资源。 PUT和DELETE通常不使用,使获取和后映射到选择(GET)的创建,更新和删除(POST)

    REST - "Representational State Transfer". Applications using REST principles have a Url structure and a request/response pattern that revolve around the use of resources. In a pure model, the HTTP Verbs Get, Post, Put and Delete are used to retrieve, create, update and delete resources respectively. Put and Delete are often not used, leaving Get and Post to map to select (GET) and create, update and delete (POST)

    这篇关于阿贾克斯,宁静/休息JSON和JSONP之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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