Grasping the concept of Classes & Categories
Alexandre Bergel
bergel at iam.unibe.ch
Fri Jun 17 12:18:35 UTC 2005
Actually, Squeak supports namespace, however they are no tool supports for this.
I would encourage you to use different names (sic...).
Cheers,
Alexandre
On Thu, Jun 16, 2005 at 12:52:41PM -0400, Daniel Salama wrote:
> Hello all,
>
> I've been playing with Squeak for some time and have a question. if I
> wanted to use a Squeak instance to serve different applications (say
> multiple applications using Seaside), how unique do classes need to
> be? Sorry for the vague question. Let me be more specific.
>
> I have two applications that both need a class Customer. However, one
> of the application requires that class Customer have a set of
> attributes and methods very different from the second application who
> uses the class Customer for a totally different industry.
>
> If I create a category for each of the applications, can I have a
> class Customer for Category A and another class Customer for Category B?
>
> In a way, I think I'm going to try to answer the question myself, but
> would prefer to get clarification or validation from you guys, who
> are much more experienced than me. The Smalltalk way would be to
> reuse code as much as possible. Therefore, I should probably
> carefully design a class Customer so that it may be sub-classed into
> more specialized classes such as IndustryACustomer and
> IndustryBCustomer. Is this the Smalltalk mentality? Coming from other
> environments which don't "encourage" you to work efficiently may be
> what's confusing me.
>
> Thanks,
> Daniel
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.iam.unibe.ch/~bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
More information about the Squeak-dev
mailing list
|