The most interoperable, most flexible and simplest web service

Json is the data language spoken universally.

HTTP is the network protocol supported universally.

A web service using HTTP and Json is naturally the most interoperable type. 

Web services and their clients are often strongly bonded - clients must send and receive specific type of data required by their services.  This is not good for rapid evolution (i.e.  agile development). Fortunately, Json allows untyped data easily.   Untyped JSON in a WCF service sounds ideal.  It is ideal if it can be made work easily.

Wait, why do we need WCF for this?  WCF is extremely helpful, or almost indispensable when we deal with complicated protocols such as SOAP. Json is simple and straightforward that it would be senseless if setting up an untyped Json WCF requires numerous configurations (e.g. end points, contracts, behaviors).  We can just have a simple ASP.Net page taking POSTed Json data and return Json data. This can be done in minutes using DataContractJsonSerializer and JsonValue, or Json.Net which has the best performance. An ASP.Net page functioning as a RESTful service is simple, quick to implement, easy to maintain, and robust.

 

This article was updated on 16:27:01 2024-03-24