Re: Best methodology for reusable components
Re: Best methodology for reusable components
- Subject: Re: Best methodology for reusable components
- From: Tom Woteki <email@hidden>
- Date: Mon, 9 Feb 2004 19:53:39 -0500
This is an interesting idea in response to an interesting question that
I've often asked myself. Thanks for the notion.
I usually take a different approach to achieving the aims of the
original question. Using the shopping cart as an example my recipe
would be as follows:
Encapsulate the shopping cart in a pure Java class that hides the
implementation of the shopping cart and has no user interface details.
This class is then highly reusable in any application. Then fashion any
number of WOComponents which provide various user interfaces to the
shopping cart. Use the validation mechanisms of the WO framework to the
maximum extent possible to ensure that the data passed by a given
WOComponent from the user into the shopping cart are valid.
One thing this avoids is the need to copy .wo folders and the
configuration management problems implied therewith. (Even so you could
combine Geoff's suggestion with the previous one.) The approach
parallels that which one typically uses when EOModeler-generated
EOEnterpriseObjects are involved. In such cases, business logic is
typically implemented in the model object, not in any given
WOComponent.
Tom
On Feb 9, 2004, at 3:34 PM, Geoff Hopson wrote:
When I want to reuse the WO components from my framework, the code to
manage the component is fine in the framework, but make a copy of the
.wo folder (containing the .html and .wod) of every component you want
to override from your framework and put it in your application. When
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.