Crossing the Chasm: ServiceStack and RestAngular
This post is simply a list of gotchas for anyone using the ServiceStack services/API framework in conjunction withRestAngular client-side JavaScript framework.
ServiceStack
For me, ServiceStack is the best API framework available to anyone working on the .NET server-side stack. Sure Web API is getting the most traction as a Microsoft product, but its still playing catchup in my eyes. ServiceStack was espousing the virtues of a clean, lightweight service framework based on Data Transfer Objects (DTOs) way before Web API and may even have been the inspiration behind Web API. Not that being first gives it any more credence, but rather the original thoughts and principles were there and have been built upon and extended throughout the versions of ServiceStack. That solid and simple foundation gives me so much confidence in the product.
RestAngular
It is said that there is a JavaScript library for every function imaginable nowadays, and it does seem to be true. In my opinion, there is value in the argument that this isn’t necessarily a good thing. (if the functionality required is simple, straightforward and small enough then it is more beneficial in the long run to roll your own rather than potentially having to debug through open source code written by someone else.) Which is why I was surprised to find a dearth of choice in solid client-side REST consumer libraries out there. Sure, you could write you own, but it does seem like an ideal candidate for a boilerplate library (common requirement, infrastructure code, large and complex enough not to want to write your own from scratch). I settled on RestAngular because it seems to be the best of the bunch. (Still, I found there to be a distinct lack of support and documentation out there on RestAngular.) If anyone out there can correct me on this, I’m happy to listen.
Click here to discover the gotchas I have discovered so far.