Jquery with REST
Some basic ideas:
Maps CRUD calls
$.Create ------> POST
$.Read ------> GET
$.Update ------->PUT
$.Delete ------->DELETE
all of these methods are based on the jQuery.ajax() calls
every one will have 4 parameters: URL [, data ] [, success ] [, failure ]
URL: The url of the resource, which can include a dynamically populated value surrounded by {braces}
data: (optional) The data to post to the resource, also used to populate dynamic values.
In GET requests, data will be added to the url as query-string parameters
success: (optional) The success callback
failure: (optional) The failure callback
<script>
$(function() {
$('button').click(function() {
$.Read(
'http://localhost:8080/easymarket/service/person/1',
null,
function(){
alert("2222");
},
function(){
alert("1111");
}
);
});
});
</script>
<div data-role="content">
<button>Read</button>
<div id="test">test</div>
</div>
But it is useless for me right now. And the plugin is not updated.
So I decide to use the ajax directly.
references:
http://zh-cn.w3support.net/index.php?db=so&id=739598
http://developers-blog.org/blog/default/2010/04/27/JQuery-Ajax-Client-and-Jersey-Rest-JSON-Endpoint-Example
http://plugins.jquery.com/project/Rest
http://plugins.jquery.com/plugin-tags/rest
分享到:
相关推荐
jquery-rest-api jQuery 简单的 REST API 类 var api = new $ . APIClient ( { url : 'http://my-rest-server.com' } ) ...// performs request to http://my-rest-server.com/bringMeDonuts with POST body limit=20
标题中的“一个REST获取天气预报的客户端小例子”是指通过RESTful API来获取天气预报数据的应用实例,分别使用了C#和jQuery两种不同的技术实现。REST(Representational State Transfer)是一种网络应用程序的设计...
“s2_ajax-jquery:使用 Ajax 和 Jquery 构建 REST Web 应用程序”这个标题表明了教程的主题,它涉及到使用Ajax(异步JavaScript和XML)和jQuery库来创建一个遵循REST(Representational State Transfer)架构风格的...
Understand and know how to use AJAX;Understand JSON;Understand and know how to use jQuery;Understand the usage of AJAX and JSON with jQuery
2. **RESTful API**:构建符合REST原则的API,提供JSON格式的数据,与jQuery Mobile的AJAX请求相匹配。 3. **安全性考虑**:在通信过程中,注意数据安全,例如使用HTTPS加密通信,防止中间人攻击。 总结,jQuery ...
在RestServer1.1中,开发团队已经实现了JSONP回调函数的支持,使得JQUERY和其他兼容JSONP的库可以无缝地与RestServer进行交互,极大地扩展了RestServer的适用范围。 其次,日志记录功能的加入是另一个重要改进。...
标题中的“Spring MVC – Easy REST-Based JSON Services with @ResponseBody”是指使用Spring MVC框架构建基于REST的JSON服务,并通过使用`@ResponseBody`注解来简化这一过程。REST(Representational State ...
If you are looking for rendering vector maps through SVG for all the modern web browsers and VML for the rest then you must use the JQV Map jQuery plug-in as it is an advanced and modified version of ...
Test-Driven Development with Python: Obey the Testing Goat: Using Django, Selenium, and JavaScript by Harry J. W. Percival ...Use TDD to build a REST API with a front-end Ajax interface
RESTful Web Service DemoS with Jersey,Hibernate,Mysql,Spring,JQuery,AngularJS ...跟随我创建一个完整的Web应用程序。 随便去吧! 这是有关如何逐步构建项目的文章,每个演示都是一个小项目: 1.用泽西...
In the process, you’ll learn the basics of Django, Selenium, Git, jQuery, and Mock, along with current web development techniques. If you’re ready to take your Python skills to the next level, this ...
- 学习使用jQuery进行Ajax通信,与SharePoint Web服务和REST API交互。 - 实践构建基于jQuery的SharePoint用户界面增强和定制解决方案。 - 探讨性能优化策略,确保在SharePoint环境中高效使用jQuery。 通过这本书,...
4.3 Adding a Little Color with jQuery 4.4 Controllers Talking to Controllers 5 Managing State and Files with Controllers 5.1 Enabling Filters and Results with Controllers 5.2 Logging In 5.3 ...
标题 "homepage-with-api" 暗示我们正在讨论一个基于Web的项目,它依赖于REST API来构建一个基本的首页。这个项目很可能是一个前端应用程序,它通过与后端服务器进行交互,利用RESTful API获取数据并展示在首页上。...
PhoneGap Project JQuery Mobile Templates Server Connectors Updated to the WTP Framework Deployment Mode Flexibility for Tomcat App Servers Custom Deployment Server Pivotal tc Server 3.0 Support ...
ASP.NET MVC 2.0 is now available and shipping with ... Topics include transitioning from ASP.NET development, as well as an overview of related tools and technologies, including LINQ, jQuery, and REST.
具有JQuery的JSP调用ReST服务; Servlet容器运行应用程序。 上传项目 下载项目字体并执行: mvn spring-boot:run 然后转到 :green_book: 该存储库是《 Spring Boot 》一书的一部分 :face_with_head-bandage: ...
8. **AJAX和JavaScript**:Rails与jQuery等JavaScript库的集成,使得创建动态、交互性强的Web应用变得容易,书中会讲解如何实现无刷新页面更新。 9. **部署与维护**:讲解如何将Rails应用部署到生产环境,以及如何...