views:

147

answers:

1

I have an asp.net mvc wizard with 5 steps. My business model is implemented using DDD. The architecture of the web application is something like this.. View->Controller->WCF->DDD->Repository and Database. Business data validation is implemented in DDD, and WCF makes a call to it to validate data.

I am finding that every step in the wizard I need to call WCF(as part of server side validation) to check if data is valid, and then return result to Controller.

Is this wrong ? Should data validation be part of the model that lives closer to the Controller ? Is there a better solution ?

A: 

Data Validaion should remain in the model itself , i this way the validation logic is cetralized , and if you want to change the change the business rules for validation , you need to change it at one place only.

avanishkumar