Re: ERXPatcher and component templates
Re: ERXPatcher and component templates
- Subject: Re: ERXPatcher and component templates
- From: Lachlan Deck <email@hidden>
- Date: Tue, 13 Feb 2007 13:23:04 +1100
Hi David,
On 13/02/2007, at 2:45 AM, David Aspinall wrote:
Many of you have probably encountered a situation where different
clients like minor changes to a shipping application's user
interface. As we strive to hold onto a common codebase for 90% of
our product we start to see pages with large numbers of
WOConditionals checking for one client code vs another.
I am investigating use of a feature like ERXPatcher to switch two
components at runtime in a simple way.
I've just been through this and came up with a different solution.
This may or may not suit you, of course, but we're finding it very
convenient. A single application instance can serve multiple virtual
hosts simply based on the request. But it sounds like you've got an
instance per site - so this may be a slightly different scenario.
Overview of ingredients:
(a) FakeBundleOrFolder/ [1]
<SomeCustomer>Resources [2]
...
(b) Override WOComponent.template() and if an override component
exists, grab it and return it, otherwise call super.
We therefore don't need to restart the app just to add another site
or indeed drop in a replacement component for one site.
Let me know if you need more...
with regards,
--
Lachlan Deck
1. essentially a parent dir somewhere convenient (utilise a property
to indicate at runtime where it is)
2. e.g., main domain for site where you'll put any components that
should override the default set in the application/framework bundles.
_______________________________________________
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