Typesafe Enum Pattern appropriate here?
From: Arthur (webfoot86_at_yahoo.com)
Date: 12/23/04
- Next message: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Previous message: Robert Klemme: "Re: Christmas++"
- Next in thread: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Reply: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Reply: Universe: "Re: Typesafe Enum Pattern appropriate here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Dec 2004 08:57:57 -0800
A logical data model contains groups of items.... a GroupCollection of
ItemCollection.
What is the best design for navigating to a group?
1) Data.Group("A")
2) Data.Group(GroupEnumClass.A) <--typesafe enum pattern
It is probable that groups will be added. I have a colleague that
insists no.1 is the best approach. My concern is that this will lead
to runtime errors and a loss of clarity. Am I being too anal?
The application is written in VB.Net. Multiple applications are based
upon the same core, and so the core must know the interface of the
specific enum class if there is a base GroupEnumClass that is extended
by Application1GroupEnumClass, Application2GroupEnumclass, etc.
I'm thinking that generics, new in VS.Net 2005, and reflection may come
into play here.
Any thoughts or links that I can pursue? Thanks.
- Next message: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Previous message: Robert Klemme: "Re: Christmas++"
- Next in thread: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Reply: Mark Nicholls: "Re: Typesafe Enum Pattern appropriate here?"
- Reply: Universe: "Re: Typesafe Enum Pattern appropriate here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|