CSLA .NET

From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

ReadOnly And/Or Editable Business Objects

Last post 10-23-2007, 7:22 AM by DavidDilworth. 3 replies.
Sort Posts: Previous Next
  •  10-20-2007, 5:52 PM 18549

    ReadOnly And/Or Editable Business Objects

    I have a design question related to a Survey-like application that has (among other classes) two BusinessCollectionBase-derived classes for Questions and Answers and two BusinessBase-derived classes for individual Question & Answer objects.

    There are two applications that will interface to this business-layer; one that is purely read-only and will present the survey to the user and collect responses. The other is a management application to create surveys.

    In such a case, should I design two sets of business objects (read-only and editable) or simply design editable objects and have both applications interface to them. Will there be a significant difference in performance?

    Thank you.

     

  •  10-21-2007, 4:42 PM 18555 in reply to 18549

    Re: ReadOnly And/Or Editable Business Objects

    I would create the right object for the right use case.

    So for the Read Only scenario I would use a ROC. (It is lighter weight and does not contain validation rules.)

    I would use Editable objects for the other scenario.

    Joe

     

  •  10-22-2007, 8:34 AM 18564 in reply to 18555

    Re: ReadOnly And/Or Editable Business Objects

    Thanks very much. I am convinced of that now; I've been reading a few other posts and a use-case based design seems like the right way to go.

  •  10-23-2007, 7:22 AM 18600 in reply to 18564

    Re: ReadOnly And/Or Editable Business Objects

    As you get further into your project, you will probably find that you frequently need two copies of most entities - an Editable one and a ReadOnly one.  This is normal in a CSLA environment.
View as RSS news feed in XML

Please contact Magenic for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems