This is first tutorial in a series of “Creating NanoRIA”, in these tutoriales we will discuss creation of Web Service and small range of client. Today we’ll talk about server-side, than in the next tutorials we’ll create WPF client, Flex and Flash Lite clients, so potential end-users will be able to run our app on: Windows, Mac OS, Brew, SymbianOS and WindowsMobile.
Introduction
Lets pretend that we work for some company, and they want widely accessible application (Macs, Windows, Mobile devices etc.) which will let users to get access to news, some media data (photos), and weather information. Of course we won’t create that big stuff, we’ll emulate these functions, we will read news from EuroNews.net and BBC.com, then we pull some images from Flickr.com and weather from webservicex.net, but we still can pretend ;).
For this tutorial you’ll need:
- RSS.NET framework for parsing RSS feeds.
- FlickrNET framework for working with Flickr.com.
- Microsoft WebDeveloper Express for developing and testing our work.
- Web Services (similar tutorial with some info can be found in this blog .NET+Flex).
- And some knowledge of C# (you can read this and this entries in my blog or review documentation of WebDeveloper).
- And Flickr.com developer API key, which you can get after registration via your profile
Planning
Ok so we’ve agreed that we pretend that we own Flickr, BBC and Euronews (cool isn’t it? :D), lets see what we have.
We have:
Quite nice, so we have to make these data avaliable in appropriate form for users, for news I suggest that we gather em all in one place, and than sort them by date, and since downloading a lot of news could be a problem for mobile users, we have to define two ways of getting news: for desktop computers and for mobile users. Then we will pass bunch of links to flickr photos, and information about current weather.
In order to do this, we will create a series of Value Objects (also known as DTO), which will be sent by our server to client.
Our Web Service will have 4 methods:
GetNews - Retrieving latest news.
GetNewsLite - Same but for mobiles.
GetPhotos - Photos from flickr
GetWeather - Weather.
Let’s start.
(more…)