Friday, January 25, 2008

Article Review: Top 5 Web Service Mistakes

Recently in searching the web for data caching strategies inside web services I ran across the article on The Server Side regarding the Top 5 Web Service Mistakes. While this article is nearly two years old now I thought it was very timely in the wake of reading the book on Service Oriented Architectures by Thomas Erl (see previous post on Book Review). The author reviews 5 different mistakes that are common when web services are employed on an application architecture. The five are as follows
  1. Using .NET specific types
  2. Not taking advance of ASP.NET
  3. Not enough bang for the buck
  4. Using web services for data access
  5. Trusting the client application

I especially like the numbers 1, 4 and 5. The idea of web services and one of the main benefits of using the cross platform availability. However if you use .NET specific types (such as datasets) then users of other platforms will have difficulties consuming your services. This will destroy one of the principles that SOA's are built upon and that is interoperability.

The fourth common mistake addressed in the article (Using web services for data access) is something that I have seen on many projects. By exposing CRUD through web services you are needlessly coupling the consumers of your services to the back end architecture. In this case even small changes to the back end will ripple through the applications that are depending on your service. Instead it is better to have rich XML messages that pass the data that is needed by your service and let your service perform the needed business logic. In this way you can take advantage of another principle of SOA which is composibility.

The fifth common mistake is the web security. Failure to check input validity can expose your services to attacks. WS-Security can be used to help identificataion and authorization. The new WCF framework is really powerful in this regard and gives options through the configuration file that can make security much more transparent for the system administrator.

Overall I give this article a thumbs up. Although it is two years old I think it speaks volumes to the misunderstandings of web services and SOA.

No comments: