none
service validation in different layers? RRS feed

  • Question

  • Hello - How would you go about implementing validation in the following architecture where technically validation could be implemented in multiple layers?:

    * WCF service calls BLL
    * BLL calls DAL  
    * DAL calls stored proc 
    * stored proc gets/sets data in database table 

    Personally, when I implement a service I think of SOA as the intended use of the functionality.  It is the quickest implementation of validation and seems to provide the most bang for the buck. However, if I'm working with someone who doesn't have any real SOA experience but has done a lot of database work then he may be database centric and argue that validation should be implemented at the stored proc and database level in case anyone tries to call the stored proc or database directly. 

    I can understand that perspective as well and it raises a question - how much validation should be implemented throughout the layers?  Are there any existing architecture patterns that define different models or implementation levels describing which model should be used or which model should be used in different scenarios?

    Monday, October 29, 2012 5:02 AM

All replies

  • There are lot of assumptions built into your statements. I would suggest you take a look at some of the blogs and video materials from Udi Dahan, especially if you are serious about SOA.

    http://pauliom.wordpress.com

    Monday, October 29, 2012 11:29 AM
  • I think my question is fairly straight-forward and I think any consultant who has a few years WCF SOA experience has probably encountered this grey area.  I went to Udi's blog but the first page or two seems training-related.  I executed a search on his site for "validation" but did not get back any results....

    Monday, October 29, 2012 5:10 PM
  • The point is there in SOA you need to take a good look at how you creating your autonmous components to help understand where you validation needs are. Udi et al have a lot of interesting posts about how to do this. BTW there are some specific validation topics, e.g. http://www.udidahan.com/2007/04/30/generic-validation/

    The challenge *is* in the expressions such as 'WCF SOA'. I'll leave at that. It can get quite heated and I'd rather let the material out there speak for itself.


    http://pauliom.wordpress.com

    Friday, November 2, 2012 2:07 AM