CSLA on Web App

CSLA on Web App

Old forum URL: forums.lhotka.net/forums/t/12002.aspx

st3fanus posted on Tuesday, June 04, 2013


Currently I'm developing application on WPF and SL 5 with CSLA 4.

I really love programming style , tool, and pattern (MVVM) on those platform.

For cross platform development, I have to embrace Web Based.

My Big Interested on CSLA is about mobile object philosophy so that we just manage one single location of business rules because the business object could run on client for Interactive and on server for backend performance reason. So we are able to get more maintainable application = Lower Cost Development.

COMPARE to web based to get interactive experience ( Without Round Trip ) on UI on web tech ( HTML , CSS, Javascript ) I have to DUPLICATE Some Business Logic on Client Tech ( Javascript ) ?

So my conclusion is on web based at least I will have duplication business logic on java script for interactive experience beside on CSLA object for another one. Am I right ?


Could anyone give me suggestions or thoughts on this issues ?


thanks a lot


JonnyBee replied on Tuesday, June 04, 2013


For basic rules you can use standard DataAnnotations on CSLA properties. 

For more advanced rules that you want to run interactively - then yes you must follow the guidance for that. 

Nice tutorial here on OdeToCode: 

Custom Data Annotation Validator Part I : Server Code
Custom Data Annotation Validator Part II: Client Code
Custom Data Annotation Validator Part III: QUnit Tests

Copyright (c) Marimer LLC