Class Notes (8): Webservices

with No Comments

These are the class notes for the “Introduction to XML and editing ancient documents” seminar I am doing this summer semester at LMU, Munich

What is a web service? The World Wide Web Consortium (W3C) defines a Web Service as ‘a software system designed to support interoperable machine-to-machine interaction over a network’. Webservices provide us with a live feed of the data. By live I mean that it is updated when the dataset is updated. As opposed to a static representation of the data which is only valid at the time where it is downloaded.

We see webservices all around us but do we realise it? As an example we will look at the website for the ski-resort at Zugspitze – the highest mountain in Germany. On the right in a widget the website displays a live feed of the current weather at the site. This is probably served to the website through a web service.

The technology for creating web services come in different variants as does the format of the results. A popular format is XML, which works well for us. A newer variant of webservices are called RESTful webservices and are designed to use the protocols already a part of the Web. This means that this type of web service is usually called with a URL pointing to a method and containing different parameters.

We will now have a look at the Flickr web service and most importantly the API explorer to create such a URL. We will test the URL with the Web Service Transformation Interface.

Today’s class began with a look-back at what we did last week, where we transformed XML into HTML and used CSS to style it. There was some confusion about how the three files from last week were linked. So we took another look at how the XML file contained a link to the XSLT file which we wanted to transform it with. Then we looked at how the XSLT file output HTML in which there was a link to the CSS stylesheet which we wanted to style the HTML output with.

Then we had a look at webservices and I went through the points above. We had a look at Flickr’s API garden, which I think is a great place to learn and understand about webservices. We also had a chat about APIs and how they are used to develop apps. This led to a look at Instagram, an image social media platform (I guess you could call it) which to my eye seems to be intentionally split into many apps and representations of the same data instead of the more traditional development of a lone-standing website. For instagram the input/editing of images happens through mobile apps. The actual website does not have any of that functionality as far as I can see. If you want to do a search, through a web browser, of hashtags or usernames on instagram you have to use a second website.

So that was a bit of a break from coding today, but next week we will take another look at transformations of XML into various formats with XSLT in preparation for the DIY projects.