Developing a C# and TypeScript collaboration framework

OData support
Supervisor:
Dr. Asztalos Márk
Department of Automation and Applied Informatics

In web applications a tipical technology stack is ASP.NET backend with JavaScript frontend. Client side development can be made easier if we can use similar structures in the client as on the server side. Some of these structures are the data structures used in the communication between the two layers. Changing from JavaScript to TypeScript also helps identifying errors compile time because of TypeScript’s static typing.

To make the development of the client quicker and less error-prone, I designed a platform-specific application for generating client side TypeScript structures from server side .NET components. My application is also capable of mapping ASP.NET Web API controllers to client API by parsing the structures in the DLLs. Client API by default uses jQuery for handling AJAX requests.

A very important feature of TypeWatcher is that its functionality can be extended with plugins. To illustrate this, I created a Kncokout.JS plugin that users can use to generate Knockout models and I also implemented a client API plugin that uses Fetch API instead of jQuery for AJAX communication.

To demonstrate how the development of the client is different and easier with TypeWatcher, I created an example application where I’m generating clint API from Web API controllers along with data objects and models in Knockout.JS.

Downloads

Please sign in to download the files of this thesis.