Showing posts with label WebApi. Show all posts
Showing posts with label WebApi. Show all posts

Sunday, June 29, 2014

My takeaways from 'Creating Reactive User Interfaces with Adaptive Consulting's Reactive Trader'

I was listening to the Hanselminutes podcast the other day and the epsidoe featured an interview with a developer in the financial industry. They're making real-time interfaces and they posted a showcase project on github to demo the features.

They've used KnockoutJS + SignalR on the web side of the things and I got a few interesting takeaways from this talk:

  • You can use reactive extensions to treat configuration changes as streams. This allows you to easily push config changes to clients and trigger the re-configuration on their systems.
  • They're pushing out data as JSON right now, but in order to use less bandwidth, they'll move to binary JSON. Furthermore, they're going to push out delta values as in order to save even more bandwidth.
  • Using Reactive extensions on a stream of stock information is incredibly powerful.


Saturday, January 4, 2014

Aspect oriented model validations for WebAPI

We're building a brand new web app with the 'latest and greatest' stuff: MVC5, WebAPI 2 and AngularJS. I was looking for a nice way to do model validation in WebApi and I found this article:

http://www.asp.net/web-api/overview/formats-and-model-binding/model-validation-in-aspnet-web-api

Check it out - it's very elegant. So Angular's $http.post() will do some task and if things work out, you get the 400 statuscode and it'll call the success handler. If not, it'll trigger the error callback and I'm displaying the validation messages. Very clean, very re-usable and very few lines of code.

Works fine with a combination of attribute validations, like [Required] and [Range] with IValidateableObject.