• 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: 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.

  • Follow-Ups:
    • Re: Best methodology for reusable components
      • From: Dev WO <email@hidden>
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>)

  • Prev by Date: Re: Postgresql Adaptor?
  • Next by Date: Re: Shared vs regular editing contexts
  • Previous by thread: Re: Best methodology for reusable components
  • Next by thread: Re: Best methodology for reusable components
  • Index(es):
    • Date
    • Thread