CSLA .NET

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

ReadOnly And/Or Editable Business Objects

rated by 0 users
This post has 3 Replies | 1 Follower

Not Ranked
Posts 3
anna Posted: Sat, Oct 20 2007 5:52 PM

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.

 

Top 10 Contributor
Posts 1,244

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

 

Not Ranked
Posts 3
anna replied on Mon, Oct 22 2007 8:34 AM

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.

Top 25 Contributor
Posts 198
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.
Page 1 of 1 (4 items) | RSS

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?
Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems