Reading Object Model Diagrams
As a senior developer i got to know that who all are having hands on experience on ArcObject, are also not able to read the OMD diagrams and somebody really don't know what are OMD's are. This is the reason i created this post who really want to know the basics.
Here all the screenshot and some of the text i am using are copied from one of the ESRI seminar .
Object model diagrams are almost like road maps of ArcGIS system. Similar to the way you'd use a map to learn a new city, we use the object model diagrams to learn how the ArcObjects are organized. If we plan to go new place, we discuss with who familiar with that area or we search the root in google maps or other source to familiarize with the roads and landmarks before actually go there. You use the map to do that, first you understand the map and it's symbols based on the legend given in the map because its tells us what all the different colors and different symbols mean.
Where to find the OMD's :
Go to installation path ArcGIS -> DeveloperKitxx(version no) -> Diagrams.
Ex:C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\Diagrams
Once you open the folder you will find no.of different .pdf files in a will organized manner.
Ex: EditorObjectModel.pdf, GeometryObjectModel.pdf, DotNetGeoprocessorObjectModel.pdf
When start reading the OMD, they look a little bit complex first too, but once start looking on that we will get lot of information.They are about 70+ diagrams to show all the thousands of classes.
The diagrams use, or are drawn with, the Unified Modeling Language. Its an industry standard when creating these diagrams. Before going to OMD we should know the below UML symbols.
What are all those UML symbols mean in the legend?
Lets discuss Relationship symbols in this post.
UML made of many symbols, but we really need to know about 12 of then to write some code.
The one - liner symbol called Association. These two classes or objects created out of these classes, are associated with each other. Here chicken has an associated nest. Relationship is one to one.
Association can be more than just a one to one relationship. It can be one to many. The star here signifies a many or multiplicity relationship. The class the star is closest to, that's many object.
The farm has many chickens.
The multiplicity reltionship can have an actual number. The number that has the closest to the object that has the multiplicity. Here a chicken as two wings.
The composed-of symbol has solid diamond. The object with the diamond is the composed-of object. Composed-of means that two objects go together all the time.You would not see one without of other.When we are moving chicken the composed-of object with go together, if we delete this object the composed-of object would get deleted. Here a chicken is composed of two wings.
The dashed line and the arrow indicates a creates relationship. Here one type of objects creates another one. Here a chicken create egg.
The last relationship Is a type of, here, is shown as triangle. When you see this symbol, you should think inheritance. Birds have some properties and methods that are inherited by chicken. Here we could say chicken is a type of bird.
That is the end of the relationship symbols.
UML class symbols and properties and method symbols, how to code using these object and using programmers interfaces we will see in the next post.