• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best methodology for reusable components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best methodology for reusable components


  • Subject: Re: Best methodology for reusable components
  • From: Dev WO <email@hidden>
  • Date: Tue, 10 Feb 2004 13:20:04 +0100

Thanks for the input Tom,
I think a combination of the 2 methodologies would give the best:
-Creating Java class for completely abstract mechanism like shopping cart, customer database, even product management
-Creating a framework with user interface (but no graphical or layout stuff)
-Import the framework in every new app
-Copy the .wo folder from the framework into the application, and personalize it and link it to a CSS for layout


That should give the highest reusability I think.

Thanks for all your inputs, it helped me clarify many things

Xavier


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.

References: 
 >How To Check Attribute's Width Programmatically? (From: email@hidden)
 >Re: How To Check Attribute's Width Programmatically? (From: Kaj Hejer <email@hidden>)
 >add java file in WOLips (From: "WebObjects EMail" <email@hidden>)
 >Re: add java file in WOLips (From: Kaj Hejer <email@hidden>)
 >Best methodology for reusable components (From: Dev WO <email@hidden>)
 >Re: Best methodology for reusable components (From: Geoff Hopson <email@hidden>)
 >Re: Best methodology for reusable components (From: Tom Woteki <email@hidden>)

  • Prev by Date: Re: Shared vs regular editing contexts
  • Next by Date: Re: Custom Login Framework
  • Previous by thread: Re: Best methodology for reusable components
  • Next by thread: RE: How To Check Attribute's Width Programmatically?
  • Index(es):
    • Date
    • Thread