Microsoft TechDays Сергей Звездин
Microsoft TechDays Два комплементарных подхода для доступа к сервисам через Web SOAP/WS-* REST SOAP/WS-* Вызов Web-методов в RPC-стиле, каждый из которых реализует свою логику Каждый контракт сервиса уникален для приложения REST Фокусируется на доступе к данным Данные адресуются с помощью URI Контракт сервиса имеет похожую структуру для различных сервисов
Microsoft TechDays ДанныеДанные SOAP-сервис КлиентКлиент POST /ServiceAccess/MyService1.svc Host: SOAPAction: GetBalance … <soap:Envelope xmlns:soap= … <GetBalance xmlns= … 2 POST /ServiceAccess/MyService1.svc Host: SOAPAction: GetBalance … <soap:Envelope xmlns:soap= … <GetBalance xmlns= … 2
Microsoft TechDays ДанныеДанные REST-сервис КлиентКлиент GET
Microsoft TechDays Использует встроенную инфраструктуру HTTP HTTP методы GET POST PUT DELETE Унифицированный синтаксис URI Легковесный и простой протокол
Microsoft TechDays Обращение к коллекции объектов Обращение к объекту по PK Обращение к полю объекта Обращение к коллекции объекта с сортировкой Обращение к коллекции объекта с фильтрацией gt ’ ’ Обращение к коллекции объекта с разбиением на страницы
Microsoft TechDays Ruby on Rails Restlet (Java) Django (Python) PHP ADO.NET Data Services Входит в Visual Studio 2008 SP1 SQL Server Data Services
Microsoft TechDays REST-сервис
Microsoft TechDays Встроенная поддержка в VS2005/08 для генерации прокси-класса
Microsoft TechDays Нет встроенной поддержки для генерации прокси-класса, но … REST-сервис очень простой ATOM JSON LINQ to XML WCF JSON Serializer
Microsoft TechDays
Facebook Flickr ( Del.icio.us ( Yahoo ( Amazon S3 ( Amazon Simple Queue Service ( home-page) И много других
Microsoft TechDays © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.