NOTE: This is not a duplicate of the several questions dealing with the choice between ServiceStack and WebAPI.
I am trying to decide the extent to which I want to use ServiceStack in my ASP.NET web application:
Option A: Go all-out ServiceStack by ditching MVC controllers and replacing them with ServiceStack-based services and Razor views.
Option B: Use ServiceStack-enabled MVC controllers to get better performance and scalability.
The clear advantage of A is the added flexibility it gives me in structuring my views. However, I am concerned about two things:
All the serialization/deserialization of request/response DTO's to/from Json or Xml performed by ServiceStack is bound to come at the cost of performance compared to pure C# objects that MVC controllers deal with.
Serialization can be somewhat flaky when dealing with complex object graphs. E.g. in cases involving circular references like
Parent.Child <-> Child.Parent
one must use the IgnoreDataMember attribute, or else serialization will blow stack. Also, sometimes deserialization can throw obscure "Object reference not set" errors that are very hard to diagnose.
Does anybody have any thoughts on this dilemma?