I haven't actually checked out ERTaggable yet. Is it good? Anyone have good usage examples? I'm curious, since what comes out of Wonder is usually at the very least conceptually interesting. (and it's f***-ing discouraging to have a couple of developers pump out new features faster than I have time to look at them!)

Anyway.

I've long since stopped trying to use inheritance since I always seem to run into trouble. So my advice is always to stay away from it - which is a shame since it sounds cool - and perhaps it's just me and my lacklustre programming skills - but I never found it worth the complexity.

But - how about something like this:

ProductType <-->> CustomField <-->> FieldValue <<-> Product

Here you're creating "CustomFields" for a type of product (like, for example, "engine" and "number of doors" for cars - or "size" and "color" for T-shirts).

I did this in a similar product a couple of years ago (where I required metadata) and used KVC-manipulation to access these "custom attributes" in components with keypaths like "[EMAIL PROTECTED]".

If you think you can use this and need help with implementation, the code probably still exists somewhere. I just need to dig it up :).

Cheers,
- Hugi

// Hugi Thordarson
// http://hugi.karlmenn.is/




On 7.5.2008, at 18:33, James Cicenia wrote:

You could use a tagging system. Wirehose has such a thing and I think that Wonder does too.

You could then use the tags to even drill to a set of products.

The tags could have validation logic based upon the type of product.

Just some thoughts.

James Cicenia


On May 7, 2008, at 1:21 PM, Jaime Magiera wrote:

Heyya,

This is slightly off-topic, but I figure fellow WO developers might have input: I'm rewriting the store functionality of ThoughtConduit and need to decide on a more refined version of my EOModel. In particular, I want Products to be able to handle things such as size and color (for t-shirts for example). I'm trying to decide how to approach that. I could subclass Product for each size and color, but that seems wasteful since only some products are shirts. Other types of products may or may not have qualifiers such as size or color.... but they may need other types of qualifiers. Alternately, I could let each group (it's a multigroup system) enter in a list of subtypes and use relationships on ProductItems to denote whichever. sigh. It's one of those things where it's best to get the model right before proceeding. So, I'm racking my brain. Maybe it's time to take a data modeling class :)

any thoughts?

Jaime Magiera

Sensory Research
http://www.sensoryresearch.net

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/james%40jimijon.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to