Self-describing REST service publishing and client code generation on the .NET platform

OData support
Supervisor:
Nagy Ákos
Department of Automation and Applied Informatics

Mobile technology has a significant impact in our life, affecting our everyday activities. The amount and size of data passing through the network is very important, so the REST (Representational State Transfer) service types are coming into view. The new types of services changed the process of development both the client-side and server-side. Compared with traditional Web services, REST significantly changed the communication with the server. We can’t use the previous server-side documentations and client-side code generations.

In case of traditional Web services the self-descriptive WSDL (Web Services Description Language) language is responsible for publishing the public interface of services. This public description not only describes the method of invoking the service, but allows to generate code on the client-side. In case of REST-based solutions there is no standard format yet, the public descriptions and code generations are cumbersome and difficult.

In my thesis I examined the currently available publication methods and solutions for the REST interfaces, as well as their processing options on the .NET platform. With the obtained informations I give a solution for publishing REST interfaces on ASP.NET Web API framework. Because the .NET Framework provides numerous code generation options, I made a C# code generator, which generates the client-side code. The generated code is based on the public description of REST services. I integrated the code generator into the Visual Studio 2015 development environment and then I analyzed the code generation usability of the .NET Compiler Platform (Roslyn).

The client-side developer doesn't need to write the communication-related code, he can use the generated code. This significantly reduce the time of development. My work can be extended and it is a reusable solution for other developers and of course it can give ideas for future implementations too.

Downloads

Please sign in to download the files of this thesis.