About reflection and it engineering
ducasse
ducasse at iam.unibe.ch
Wed Nov 5 20:42:03 UTC 2003
hi adam
did you read the TypeObject pattern because it is interesting too and
somehow related?
You have one class that represents the type VideoTape then a class
representing the actual physical
instance that has a reference to its type VideoTape.
For plant collector like me, you can see that when you want to model
plant, the physical plant
in described by a class that coers its actual state and specificity
while the TypeClass covers the generic aspect such as the
classifications and other business that fanatic collector really enjoy.
Stef
On Mercredi, nov 5, 2003, at 21:21 Europe/Zurich, Sam Adams wrote:
> To be more direct, you create a class (say AccountType) in Squeak whose
> instances are different types of accounts, and then create a class (say
> Account) in Squeak whose instances are the individual accounts
> themselves,
> but act as if they were instances of the instances of AccountType. The
> AccountType instances would define the structure(data) and
> behavior(policies, notifications, etc) for the Account instances. Each
> Account instance would upon creation refer to its AccountType "class"
> for
> details of what kind of private data structure (variables) to
> construct.
> During later execution, the Account instance would refer to its
> AccountType
> "class" for its behavior, which would be shared across all Acount
> instances
> referencing the same AccountType "class".
More information about the Squeak-dev
mailing list
|