===== From WebServices to SemanticWeb ===== ==== Abstract ==== We are all facing the tendency of quick data explosion. But the nowadays the problem of storing the data is as urgent as the problem of sharing and communicating the data. Over the past years there have been developed several approaches to access the data and also provide a way to manipulate the data. SOAP services, RESTful services or LinkedData? Each of these approaches have proved to work under certain conditions very well but there is no universal solution. This presentation aims to open new views on widely used technologies to help to apply them more effectively. ==== Major features of SOAP and REST services ==== * Application state and functionality is divided into resources * Every resource is uniquely addressable using a universal syntax for use in hypermedia links * All resources share a uniform interface for the transfer of state between client and resource, consisting of - A constrained set of well-defined operations (HTTP GET, PUT, DELETE, POST) - A constrained set of content types, optionally supporting code-on-demand (application/json, text/xml) * A protocol that is: - Client/Server? - Stateless - Cacheable - Layered ==== Re-use of common protocols ==== * REST HTTP (authentication, content type negotiation, session support via cookies) * SOAP The intend to implement this in SOAP independently to transport protocol led to: - Either introducing authentication-related information into method calls: * ''addUser(AuthenticationToken token, User newUser);'' - Or using using XML authentication ?? == Linked information in REST == Clients start at a single resource such as the user resource that represents themselves, and navigate to location resources and other user resources. Request: ''GET http://example.com/users'' [{userId: 1}, {userId: 2}, ...] vs [{userId: "http://example.com/users/1"}, {userId: "http://example.com/users/2"} In later case we do not need to construct URLs like ''%%http://example.com/users/{user}/%%'' in our application making it service-location independent. ==== What is SemanticWeb? ==== Is HTTP is XML enough for computers to understand it? Have a look at example: Address: Bierkade 45
Mobile: 06 21 38-02-44
For human being it is very easy to grab necessary information out of this, but for programs nearly not possible, as HTML describes how the information should look like. Can we add semantic to HTML? As it was originally designed for presentation, there can hardly be any way to make computers to understand it. One can use classes: Address: Bierkade 45
Mobile: 06 21 38-02-44
or RDFa http://www.w3.org/TR/xhtml-rdfa-primer/ vCard http://www.w3.org/TR/vcard-rdf/ Address:
Bierkade 45/span>,
Mobile:
06 21 38-02-44
but it looks a bit messy. Another alternative is XML, which was designed for data presentation:
Bierkade
45 06 21 38-02-44
What problems we are facing when looking at these two XML samples, representing the same information (e.g. "John //lives at// Bierkade 45"): - Are we talking about the same user and the same address? -> There is no notion of "unique identifier" - The structure the interpretation of XML is application dependant. \\ Can we use the same approach (i.e. dictionary) to express relations? (e.g. "John //lives at// Bierkade 45" is the same as "Bierkade 45 //is address for// John") ==== Triples as a way to represent the world ==== The example of how dossier changes. Table columns are changing type. Example: ranges. 1..2, 1 (1, 1) inclusive, exclusive 1..inf) {{http://www.w3.org/TR/xhtml-rdfa-primer/diagrams/social-network.png|Good example of foaf vocabulary usage}}