Webobjects design: multiple editing contexts
Webobjects design: multiple editing contexts
- Subject: Webobjects design: multiple editing contexts
- From: Mark Wardle <email@hidden>
- Date: Tue, 24 Mar 2009 12:44:06 +0000
Hi all.
I'm pretty happy with the mechanics of WO now... but I sometimes feel
I'm "doing the wrong thing" in some aspect of design/architecture.
I am making the leap to using multiple editing contexts (using PW).
I'm using component actions exclusively at present.
When is the appropriate time to create an editingcontext - within a
component's constructor? If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a UserEdit
component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions). At present, I have a
constructor that creates a new editingcontext, and any setters that
use EOs are careful to get a copy of the EO in the correct
editingcontext.
What if I then have subcomponents that need to use the parent editing
context? Is it appropriate to get the parent's editingcontext from the
EO itself?
Once I start thinking about that, it looks like I'm writing lots of
code which is fairly repetitive and thought that there must be a
better way? Am I missing something obvious? I don't want to make
things highly modal, and I usually don't wish to preserve state
between components unless the user specifically requests it.
Any design tips gratefully received!
--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden