CSLA newbie looking for advice and recommendations.

CSLA newbie looking for advice and recommendations.

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


RockoWPB posted on Monday, June 25, 2007

The app I’m writing is not anything ground breaking, but I have had problems finding examples or answers to some of my questions. The app requires the ability to save output to many different format XML files as well as many different DB server types. Each XML file represents a single transaction which includes a host of traditional data as well as external documents encrypted into it. The XML files are the desired output from the program, the databases are just used for reporting purposes and may not be available all the time and will only contain a subset of the data that is in the XML file.

 

The UI is in WPF, my BO’s are CSLA 3.0. I want to have my BO’s write to a dataset in the business layer, then when requested pass the dataset to my persistence layer to save to my output to the different types. Using a dataset to pass betweenlayers also allows me to save and load the data locally in the disconnected scenario.

 

The problem occurs in that I haven’t found any examples of CSLA apps being architected this way, specifically the BO’s writing directly to a dataset, they only seem to write to a database. My second question is am I better off writing a wrapper class that contains my root BO and the code to load and save the dataset or should I include the load and save the dataset logic in my root BO.

 

Hope this makes sense. Any insight would be greatly appreciated.

Rick

Brian Criswell replied on Monday, June 25, 2007

Do a forum search for dataaccessobject.  This design pattern allows you to make your business objects unaware of what they are writing to.  The links in the forum messages will show a description of the design pattern and how to implement it.

Copyright (c) Marimer LLC