Re: Best methodology for reusable components
Re: Best methodology for reusable components
- Subject: Re: Best methodology for reusable components
- From: Geoff Hopson <email@hidden>
- Date: Mon, 9 Feb 2004 20:34:32 +0000
I would say you are on the right lines...put your eomodel, business
logic and WO components in one or two frameworks (depending on whether
you want to split the view code from the model code...whatever...).
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
you do a 'pageWithName', the resource manager (or something like that)
looks in the app wrapper first for the WO component definition, then
looks in the associated frameworks. In this way you can override the
framework definition of the component (eg change layout, colours etc.),
can add new definitions in the WOD file (as long as the basic objects
are there), and everything should still work. Be aware that if you put
in a new method call in the WOD in the application, that the method
won't be there. IN this case, you will have to subclass the component
class, and put the subclass in your application (or another framework).
Sorry for rambling...but I hope you understand what I am trying to say.
Best wishes,
geoff
On 8 Feb 2004, at 15:02, Dev WO wrote:
> Hi,
> I was wondering what would be the best way for not wasting time
> redoing things in WO.
> Let's say I'll have different project that will gather information
> about customer (address, name, etc), so I could do a component that
> will gather these information and put it to a specific database, and
> another one that will retrieve them from a database.
> So my first though is to make these component as framework, but I'm
> not sure I understand very well the purpose of a framework...
> So can someone help me clarify this, and the best way to do it?
> (another example for reusable component would be a virtual shopping
> cart, is it possible to make one that will be used by different Web
> Application/ different Web sites? and what's the best methodology?)
>
> Thanks
>
> Xavier
> _______________________________________________
> 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.
>
>
--
Geoff Hopson
Objectology Ltd.
http://www.objectology.co.uk/
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.