Back to list
Views:   0
Replies:  0
Reply 1
In general you always want to reduce code duplication as much as possible. 

Having said this, Validation is an area where this is almost impossible. The reason is that to get the best user experience requires that validation takes place in the UI (Presentation layer) in addition to the Business Object and Data Access layers.

In Web Apps there may be up to three places where data validation takes place (UI, Business Objects, and Data Access). A large chunk of the validation code is not reusable because of the difference languages involved, i.e. JavaScript vs .NET.

In a Windows app it is usually easier to share Validation code because it is all written in .NET.
So, the short answer is, yes, you can add Validation in the View in addition to the Model, but see if there is a way to share (i.e. refactor) the validation rules. 

Hope this helps. 

Jack Poorte, Oct 11, 2013
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas