I decided to start the process of creating a web service using an MVC like design pattern by specifying the interface towards the consumers. The interface has to be “nice”, and by that I mean that the parameters and return values should be easy to understand and use.

I will show how to define an XML schema using a third party tool, Liquid XML Studio 2008. These schemas will be used when generating C# classes/types to be used as parameters and return values when defining the web service interface. A result of this is that the web service will look like it uses objects as parameters, but this is only a way to represent the XML documents that may be used as parameters.

Continue reading »

 

The other day I tried to compose an article about how to design an ASP.NET Web Service using an MVC like design pattern. I ended up with a huge article and decided to rewrite it and split it into a couple of smaller articles. I will try to write these articles as independent of each other as possible.

The idea to this subject came up when attending a course, held by Gabriel Svennerberg (http://www.svennerberg.com), dealing with Javascript, JSON and Javascript libraries such as JQuery and DOMAssistant. I wanted to try out the Ajax support in JQuery consuming web methods exposed by a regular SOAP web service as well as a WCF service. The business logic for these two interfaces were to be the same and their methods should have the same set of parameters, in and out. Therefore I wanted to create a couple of controllers and models to be used from the exposed methods. The methods themselves are the views in this MVC like architecture.

Continue reading »

© 2011 freddes.se Suffusion theme by Sayontan Sinha