Hi,

I had thought about rebuilding part of the Subrvey object, but it seemed like its 
objects were so interconnected that rebuilding a part of it would be difficult.  

I will take another look at how I could design the objects so that parts of them could 
be rebuilt easily.  

I think I still might have a problem if one of the "top-level" containter objects has 
a problem.  I'm not sure if I can rebuild that "top-level" object without rebuilding 
all of other objects that it contains (and the objects contained in those objects...).

Thanks for the suggestion,
Jon

>>> [EMAIL PROTECTED] 10/30/03 15:16 PM >>>
Why rebuild the entire object from the database?  Just update the part
that has changed.

>
> Hello,
>
> I have a question about designing a multi-user application with objects.
> I am creating a Survey system, and I have an large object design to
> represent a survey:  there are over 50 types of objects chained together
> in some way.  For example, a Survey has Questionnaire -> Pages ->
> Questions.  Questions have Choices and Responses .  The Survey also has
> Participants who have Responses to Questions.
>
> In a perfect world, I would like to build a large object structure to
> represent my Survey and persist it in the Application scope so that all
> users modifying or taking a Survey would access the same object.  A Survey
> manager who adds a new Question to the Questionnaire would add a Question
> object to the Survey object in the Application scope.  Survey Participants
> would immediately see the new Question because they are referencing the
> object in the Application scope.
>
> I have 2 concerns about this approach:
> 1) If I run into modifying any part of the Survey object, I will have to
> rebuild the entire Survey object in the Application scope and each user
> will be locked out of the application until the Survey object is rebuilt
> properly from the database.
> 2) Modifications of any part of the Survey object will have to use
> exclusive locks on the entire Survey object.  (This might be prohibitively
> slow if there are 100's of users.)  If exclusive locks are not used, if
> there are 2 simultaneous calls to modify the Survey object and 1 of the
> calls fails, the Survey object will be rebuilt due to the error while the
> second call is in the middle of modifying the Survey object.
>
> Is there as standard O-O design methodology to give me some direction?
>
> Is it a bad idea to persist large, complex, dynamic objects in the
> Application scope?
>
> Should I break the object structure into pieces and persist in the
> Application scope the parts of the object that are less likely to break,
> and build the other objects dynamically in the Session scope?
>
> Or, should I feel comfortable putting the whole object in the Application
> scope and spend my time writing really good error-handling code to
> minimize the need to rebuild the object on a failure?
>
> Thanks for the help!
> Jon
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]
>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to