Hypertext Transfer Protocol (HTTP) is not just for browsing the web.
Although that was its original purpose, the same protocol can be used to retrieve and send data programmatically, enabling applications that run on the desktop, or behind another web page, to interact with applications on the internet.
You might do this to draw on services from websites such as Google, Windows Live, Amazon or Wikipedia; or to create private applications that store data on the internet and can be accessed from any computer; or for business transactions.
Programmatic access gives you full control of the user interface, and also lets you merge web functionality into other applications.
The wider context is the trend towards web-hosted, on-demand applications and the shift of data from desktop PCs and local networks to internet locations. This is very convenient, but not all applications work best in the browser. Using web services with desktop applications gives you the best of both worlds. You can also devise ways of caching internet data locally, for when the internet is offline.
What follows is an example using the Google calendar API. Google calendars are a great way to store your appointments on the internet, and to share forthcoming events with others. Each Google user can create multiple calendars. It’s a free service, and so is ideal for small businesses as well as individuals. You can add comments to events, making this an effective collaboration tool.
Programmatic access to Google calendars makes them more powerful. You can write applications that take data from Google calendars and store it offline, or that copy data to and from other calendaring software, such as Outlook. Another idea is to integrate the Google calendar into custom applications for planning rotas or scheduling deliveries.
Google’s calendar API is part of a larger set of APIs for its suite of online applications, covering blogging, documents and spreadsheets, classified advertisements and more. This family is called Google Data APIs. It is separate from other APIs, such as Google Maps and Google Gadgets.
The Google Data API is based primarily on Atom, an XML standard for news feeds similar to RSS but with more features, extended with the Atom Publishing Protocol to support posting and editing as well as retrieval. This means that applications interact by sending and receiving XML data. The API conforms to the REST principle, by which internet resources are updated using the POST, GET, PUT and DELETE methods that are part of HTTP.
An advantage of using XML and HTTP is that you can interact with the calendar API using almost any language. Google has also created wrappers for Java and .Net, and the example below using Visual Basic .Net to list, create and delete Google calendar appointments. The free Visual Basic Express edition works fine.
All OnlineTags: Visual Programming
