Microsoft Evolution Days 2015
- Microsoft Switzerland & Digicomp Academy AG
- Rating speaker: 4.85/5 & Content: 4.85/5
AngularJS and WebAPI
I had the pleasure to talk at the Microsoft Evolution Days. This is the third time for me to talk for Microsoft. I am really thankful having the possibility to talk there.
The talk was about WebAPI (REST) and AngularJs and how these both technologies can work together.
Right here I want to show you a few slids and drop a few line on each. Hope you enjoy it.
OData is a "feature" a webapi should implement these days. It extends the normal REST-Features of a webapi and can give you some really useful features out of the box like datashaping, paging, sorting etc.
Something the people sometimes mix is the "REST" word and "WebAPI". This is something completely different. REST is a paradigm how a service can be build. WebAPI is a technique to achieve this giving you the best experience when you are a C#-Developer. I think thats an important difference you have to understand before staing in this topic.
This is a RESTful service. It is providing you these endpoints to get and store, manipulate and delete data. This can also be built with nodejs, Ruby or whatever you want.
The older ones in the audience really knew this old stuff like "Xml" ;-). If you never heard of it: Google it! Well, nowadays data is transfered via JSON which is not as heavy and easier to read and understand. Heres an example.
And now comes the best part: With an WebAPI or REST-Endpoint you can provide your data to whatever endpoint you want. So the client does not matter anymore. If there is a customer who wants to have a desktop implementation: Go ahead! Just consume the data of your webapi in your maybe WPF application. You want to have an app? Xamarin? There we go: Same thing here. The only thing your consuming application has to suppot are HTML-Calls. Thats it. It realy does not matter which client applications you use. The API can (or should) even exit on another server. Nowadays also an MVC-Application is consuming an webapi to consume data. This is a modern architecture for distributed systems.
jQuery was the first try to do client side work. That worked (AJAX!) but was it really ool stuff? I do not talk about the possibilities here, but talking about how it could be developed. Did we have Seperation of Concerns? Single Repsonsibility? But we do love clean code! A real Architecture was not possible with jQuery. Angular was the step to give this to us.
In Angular you can have services and Controllers, the MV*-Model with databinding and all this good stuff. Angular has the possibility to create your application with modules. Which for me is one of the best features AngularJs offers us. This modules can be loaded in your application and your structure gets better.
Angular 2.0 goes a step further. Not that it is way more faster (we are talking about 5-10 (!) times faster). it also provides Typescript, like a typed version of Javascipt with a great syntax, but also goes into components which live in your application and defining their own behaviour. They are like little microservices which you can develop completely separated and stick together in the end. This is flexibility as it should be.
In the end I showed demos touching the cross-platform features of angularJs, which, I think, are the best part of developing with AngularJs.
I loved this talk and again: Thank you Microsoft for giving me this experience one again. The feedback was quite good, like "mindblowing" and I could answer a lot of good questions. Digicomp also did a great job. I loved it and I hope I can be part of this again next year :-).
Many thanks to Microsoft and Digicomp for letting me give this talk. Thanks for having me.