Test Driven Development and CSLA

Test Driven Development and CSLA

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


PaulSinnema posted on Sunday, November 16, 2008

Hi,

We've finally decided we'll go with CSLA. I've got a few questions;

Description:
The product, KLIB.Net, we're writing is an Application for social workers in Switzerland. It's going to be split in 2 Applications. One being the Server and the other the Client. The CSLA approach fits perfectly but....

Questions:

  1. We're going to use Scrum as our Project Process which means we'll use 'Test First' Development amongst many other things. We would like to build a Test Frame that's going to test the Server for it's ability to deliver the right Data and Business Logic to the Client. How do we set that up with CSLA (without building the Presenation and UI)?
  2. KLIB.Net is not a traditional application in the sense of tranactional data processing. Each change in the Presentation / UI layer has to be passed to the DB (even if the Data isn't complete and rules are broken). This loosly way of working of Data doesn't fit the traditional way of thinking about Data Persistance / Consistance. The business rules will reflect the incompleteness of the Data in the Presentation layer (business rules that were broken will present a visual attribute and Text to the User). Does CSLA allow Data to be passed to the DB if Business Rules have been broken?

Cheers,
Paul.

Marjon1 replied on Sunday, November 16, 2008

Answer to #2:

CSLA has the concept of warning and information based rules, which do not invalidate the object and therefore can be saved, this sounds like what you are looking for. I'm assuming of course that there is some concept of a broken rule, where the object is some state or stage were specific information would be required and these would then reflect your broken rules and then prevent saving.

Copyright (c) Marimer LLC