Book a Demo

Author Topic: from objects to classes  and traceability  (Read 4086 times)

ivan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
from objects to classes  and traceability
« on: September 22, 2005, 11:28:08 am »
Hi, I am  new to EA and have some probably basic questions but have not been able to find an answer in the forum or documentation.

I have an analysis diagram where I used from the  Analysis toolbar the object item for serveral elements in the diagram.  Then when going to design classes in another diagram I realize there is a class object that is not (i think) exactly the same as an object.

So the first question is what is the difference in EA between an object and a class.  
And then, If I am using the right elements (objects for one diagram an classes for the other) how do I keep traceability between objects and classes.
Or if I am not using the propper objects what is the group recommendation on this matter.

tks.

Ivan

thomaskilian

  • Guest
Re: from objects to classes  and traceability
« Reply #1 on: September 22, 2005, 01:56:25 pm »
Ivan,
an object is an instance of a class. While the class is only an (abstract) piece of code, an object is hardcore ;) (i.e. bits and bytes). Traceability is best achieved by setting the instance classifier for an object: right click the object on the diagram, Advanced Settings/Set Instance Classifier. Select the underlying class and you're done.

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: from objects to classes  and traceability
« Reply #2 on: September 22, 2005, 03:34:25 pm »
Hmmm,

If you do a 'paste' (i.e. control-drag) of the class from the Project View onto the diagram, and then choose 'as Instance of Element (Object)' instead of 'as Simple Link', will this populate the correct 'Set Instance Classifier' field?

TIA,
Gary

thomaskilian

  • Guest
Re: from objects to classes  and traceability
« Reply #3 on: September 23, 2005, 01:30:14 am »
It does. Don't you have a sandbox to test that? I guess it was faster than writing the quote. ;)
« Last Edit: September 23, 2005, 01:31:39 am by thomaskilian »

ivan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: from objects to classes  and traceability
« Reply #4 on: September 23, 2005, 07:11:49 am »
Gary:  Im kind of confused... Unless I am more confused than I think... I thought that analysis came before where I use objects that eventually might land in classes.... so how can i drag/drop a class at this stage?

Thomas:  if I have to set the instance classifier that means I have to do create the class from scratch and then set the instance classifier for the object to the class? this looks like double work....

something I found... is that I can go to tools/options/UML Element Toolbox/Use class elements for analysis and then i would have "classes" when I do the analysis and select my objects... but i am not sure if there is a problem with this approach....

tks...

thomaskilian

  • Guest
Re: from objects to classes  and traceability
« Reply #5 on: September 23, 2005, 08:29:13 am »
Quote
Gary:  Im kind of confused... Unless I am more confused than I think... I thought that analysis came before where I use objects that eventually might land in classes.... so how can i drag/drop a class at this stage?

This is used if you want to show the behaviour of your system AFTER having it designed (from scratch). The question only indirectly bothers yours.
Quote
Thomas:  if I have to set the instance classifier that means I have to do create the class from scratch and then set the instance classifier for the object to the class? this looks like double work....

Not really. If you start with objects and design classes afterwards (due to an analysis) you can then create the link using the above mentioned method. Probably you should go straight forward and relate classes already in an early stage, then adding methods/attributes to the classes, not the objects.
Quote
something I found... is that I can go to tools/options/UML Element Toolbox/Use class elements for analysis and then i would have "classes" when I do the analysis and select my objects... but i am not sure if there is a problem with this approach....

During analysis you normally have objects. You can already add attributes or methods, but I wouldn't do that on a too detailed level, rather go directly to classes. It's quite usual to have multiple steps object/class/object/... It depends on what you want to do. If you re-engineer a legacy system you will likely go through these steps. If you design from scratch, your (business) objects come from a (business) analysis only with some major attributes. Your domain model will then detail this and return a set of classes. You probably need to go once through the development cycle to get an understanding.

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: from objects to classes  and traceability
« Reply #6 on: September 23, 2005, 10:00:16 am »
>  It does. Don't you have a sandbox to test that?
> I guess it was faster than writing the quote.

Yea I did test it out first, but didn't want to come across as 'telling everyone HOW to do it'.

> I thought that analysis came before where I use
> objects that eventually might land in classes.... so how
> can i drag/drop a class at this stage?

Well, I don't know about other analysts but I usually show objects on diagrams just to show concrete examples of the abstract classes.

This also applies to the 'design' aspect, but I always start with classes (either in Analysis and Design).

Gary

thomaskilian

  • Guest
Re: from objects to classes  and traceability
« Reply #7 on: September 23, 2005, 01:24:50 pm »
Quote
>
Yea I did test it out first, but didn't want to come across as 'telling everyone HOW to do it'.

Why so humble? ;)
Quote
> I thought that analysis came before where I use
> objects that eventually might land in classes.... so how
> can i drag/drop a class at this stage?
 
Well, I don't know about other analysts but I usually show objects on diagrams just to show concrete examples of the abstract classes.

This also applies to the 'design' aspect, but I always start with classes (either in Analysis and Design).

Probably this depends on what you're doing. I ususally start an analysis with objects. The following class design does usually not directly refer to these objects since they are going to be redesigned. This object model is looked at as documentation of the current state. The following domain model (using classes) will show the target system. I think the extra level brings more transparency.

ivan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: from objects to classes  and traceability
« Reply #8 on: September 23, 2005, 01:30:50 pm »
>Probably this depends on what you're doing.
>I ususally >start an analysis with objects.
>The following class
>design does usually not directly refer to these objects
>since they are going to be redesigned. This object
>model is looked at as documentation of the current
>state. The following domain model (using classes) will
>show the target system. I think the extra level brings
>more transparency.

This is exactly what i am talking about... by redoing/redesigning I kind of loose automatic traceability... and that is what I would like to avoid...