Re: Problem with webobject attributes in WOBuilder
Re: Problem with webobject attributes in WOBuilder
- Subject: Re: Problem with webobject attributes in WOBuilder
- From: Chuck Hill <email@hidden>
- Date: Mon, 19 Jun 2006 10:08:36 -0700
On Jun 16, 2006, at 5:27 AM, Mike Schrag wrote:
The design of WOComponent seems to be nearly identical to the
design approach Java's Swing JComponent took (who knows, maybe some
of the same people
As pointed out here, the thing to keep in mind is that your model
should NEVER link against the controller or view (if you see
WOComponent references in your model, it's a HUGE code smell). I
think it was Chuck saying, which I totally agree with, that your
WOComponents should really not contain any smarts. It's so much
easier to reuse (and to setup test cases) when all of the heavy
lifting is done in model objects. I don't personally have workflow
objects like Chuck mentioned, though I'm kind of curious to try
them out now and see how it works out. My WOComponents typically
implement workflow. In certain cases, this can run into
complications, though I tend to find that if I need to reuse a
component in multiple workflows, I can chop out the part that is
reusable into a smaller component, embed it into two higher level
components (one in each workflow), and pass in various action
methods to call rather than implement them internal to the reused
component.
That is what I would normally do as well. I've only used workflow
objects in a few cases where there was a very complex, state
dependent, transfer of control between pages. It allowed me to
abstract out that part and resulted in a significant simplification
of the pages.
Chuck
--
Coming sometime... - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
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