• 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: EOGenerator & Inheritance (on Inheritance vs Status pattern)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOGenerator & Inheritance (on Inheritance vs Status pattern)


  • Subject: Re: EOGenerator & Inheritance (on Inheritance vs Status pattern)
  • From: David Avendasora <email@hidden>
  • Date: Mon, 13 Feb 2006 05:09:13 +0000


Or maybe your model should have a 'status' field and avoid all that nasty inheritence altogether. :-)

I probably agree that in this model, a status (state) field would be better because you are looking at a single item that changes state over time and that's not a good use of inheritance. But a misuse of inheritance does not make inheritance nasty - it mostly works well in EO in all three flavours (apart from a known bug with flattened).



I and a new OO programmer and I *really* appreciate everyone's advice on OO design!


In this case, these three part types have some very specific differences. It is not one part that changes. My application is being built to manage the manufacturing in a bakery.
- Raw parts are sugar, flour, oil, etc. and are usually procured from outside vendors.
- Intermediate parts are things like dough, toasted coconut and such where an intermediate part has a Bill of Materials and requires work within the manufacturing line to have produced.
- Finished parts things like like cookie, bar, etc. and are parts made up of any number of Raw and/or Intermediate parts. Since they are sold to customers they also have to have additional attributes like UPC code, customer specific attributes.


Does this still sound like something that would work better as an implementation of the Status Pattern, or should I stick with Inheritance?

Thanks,

Dave
_______________________________________________
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


  • Follow-Ups:
    • Re: EOGenerator & Inheritance (on Inheritance vs Status pattern)
      • From: Ian Joyner <email@hidden>
References: 
 >EOGenerator & Inheritance (From: David Avendasora <email@hidden>)
 >Re: EOGenerator & Inheritance (From: David LeBer <email@hidden>)
 >Re: EOGenerator & Inheritance (From: Geoff Hopson <email@hidden>)
 >Re: EOGenerator & Inheritance (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: tomcat deployment
  • Next by Date: Re: EOGenerator & Inheritance (on Inheritance vs Status pattern)
  • Previous by thread: Re: EOGenerator & Inheritance
  • Next by thread: Re: EOGenerator & Inheritance (on Inheritance vs Status pattern)
  • Index(es):
    • Date
    • Thread