On 30 Sep 2010, at 20:35, Allen Ingling wrote:

> On Thu, Sep 30, 2010 at 2:28 PM, Remco Poelstra <re...@beryllium.net> wrote:
> 
>> Hi,
>> 
>> 
> Maybe a class cluster would be useful here?
> 
Clustering might be a solution but it's a bit of a heavyweight pattern.

Trying to dynamically match a stepwise revealed information structure to a 
particular class in a hierarchy sounds fragile.
If an individual hardware item property doesn't match the class hierarchies 
expectations then you have to subclass.

If a specific class is not necessary for each hardware item then it might be 
possible to think in terms of a single
or small number of generic classes. 
The specificity of these base classes can be extended by the use of associative 
storage property (an NSDictionary instance).
ie: dump all the hardware properties into the dictionary then query it as and 
when required.

This would give a lot of type flexibility without excessive subclassing.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to