I'm beginning to learn ASP.NET MVC and plan to use jQuery Mobile. I'm trying to decide whether it is worth including CSLA in the mix and would like some input.
Jquery and Microsoft.Mvc.Validation java scripts understands DataAnnotation rules and so does the CSLA rule engine.
So you could use DataAnnotation rules for input format rules and do more advanced CSLA rules in the post back.
As to the new WEB.API I have not looked into that yet.
The benfit would be to work in a known environment and use CSLA objects for the Model.
Regardless if you do validation on the client side, you will always have to do the same validation on the server side whether it is w/ CSLA or EF or whatever else you would do on the server. You can never trust that is sent from the client is valid. It is true, you may be able to avoid duplication for some of the simple field validation like required, data types etc... if you use CSLA as your form model, or if you use another common practice like using View/Form Models for your views, but that will only work for the simplest of validations on the client side. When you start doing heavy / rich client JS, the default MVC Jquery validator kind of falls apart (anything to do w/ dynamic loading and adding of input elements requires a heavy dose of coding on the client side). I've been down that road, and it was a difficult one when dealing w/ advanced / rich scenarios on the client side.
My current preference for rich client side apps is creating models/viewmodels on the client w/ a client side MVC/MVVM library like backbone or knockout (there are many out there http://microjs.com/ has a good list of js libraries) and then on the server side for your domain models you can use CSLA for its rules/validation engine. I don't really use any of the other features CSLA features other than the validation engine for these types of applications (no use for n-tier, n level undo, etc...).
Copyright (c) Marimer LLC