Hello,

Thanks for your suggestions. I have improved the naming and definition to
this:

Object subclass: #SlotExampleMovie
slots: {
#name.
#year.
#director => ToOneRelationSlot inverse: #directedMovies inClass:
#SlotExamplePerson.
#actors => ToManyRelationSlot inverse: #actedInMovies inClass:
#SlotExamplePerson }
classVariables: {  }
category: 'SlotAssociations-Tests-Example'

Because it is for now just an example I haven't renamed the Slot classes
yet.

Jan.




On Tue, Feb 24, 2015 at 8:03 AM, Marcus Denker <marcus.den...@inria.fr>
wrote:

>
> On 23 Feb 2015, at 22:34, Ben Coman <b...@openinworld.com> wrote:
>
> I haven't played with the relation example yet, but will real soon.  Just
> some initial thoughts...
>
> I like RelationSlot.  To me association seems one-way while a relation is
> two-way.
>
> btw, Is there some reason to not match the syntax of the often cited paper
> "Flexible Object Layout" ?
> I see one advantage is that its easier to read all the slot names
> vertically aligned.
>
> Object subclass: #SlotExampleMovie
> slots: {
> #name.
> #year.
> #director => ToOneRelationSlot opposite: #directedMovies class:
> #SlotExamplePerson.
> #actors => ToManyRelationSlot opposite: #actedInMovies  class: 
> #SlotExamplePerson.
> }
> classVariables: {  }
> category: 'SlotAssociations-Tests-Example'
>
>
> Also maybe an alternative slot class name so that it reads more like a
> sentence... "#director related to one #directedMovies in class
> #SlotExamplePerson"
>
> Object subclass: #SlotExampleMovie
> slots: {
> #name.
> #year.
> #director => RelatedToOne inverse: #directedMovies inClass:
> #SlotExamplePerson.
> #actors => RelatedToMany inverse: #actedInMovies  inClass: #SlotExamplePerson.
> }
> classVariables: {  }
> category: 'SlotAssociations-Tests-Example'
>
>
> Something like those would be good… yes, I think having the slot name in
> front is important.
>
> Marcus
>
>

Reply via email to