Model Xtractor - Online Class Diagram Editor
Model Xtractor - Online Class Diagram Editor User Account   
    RSS Posts | Model Xtractor
  • Diagrams
  • Metadata
  • Blog
  • Support
  • Tutorial

Associations and Generalizations

Leave a Comment » Feb 22, 2010
Bookmark and Share
Categories: Tutorial

Associations are the most common relationships between types. In Model Xtractor, associations are the result of expansion of regular type member items that return another type, or a combination of types. When type members are properties or fields, they can be further refined into aggregations or compositions.

Aggregation and Composition

Regular member items with a non-void and not a generic returned type expand into associations. In Model Xtractor, depending on member’s kind, their connector may show at one end if it’s about an aggregation or composition, or if the item returns multiple objects:

  1. Functions (like GetAccessControl here) expand into associations.
  2. Fields and properties that return Object-based types automatically expand into aggregations.
  3. Fields and properties that return structures (.NET ValueType-based objects, like struct, enum, most primitive types) automatically expand into compositions.

Click for the published entry of the diagram
EditViewPrint

Generalizations

Types can expose <<extends>> dependency items to their base types. For instance, both DirectoryInfo and FileInfo inherit from or extend the FileSystemInfo class:

Click for the published entry of the diagram
EditViewPrint

When expanded, the <<extends>> dependency becomes a generalization connector to the base class, like the one from DirectoryInfo to FileSystemInfo. Drag and drop the highlighted <<extends>> item of FileInfo outside the shape, and it will also become a similar connector to FileSystemInfo. The item disappeared from the shape, because it was delegated to the connector and automatically hidden. When you select and delete the connector, it will reappear back to its original shape.

An interface cannot implement other interfaces, it can only inherit from or extend them. Interface types can inherit from more than one interface, so in that particular case of multiple inheritance you may find multiple <<extends>> dependency items in the interface shape:

Click for the published entry of the diagram
EditViewPrint

Leave a Comment

Accepts [code lang=".."] .. [/code], where lang is one of: csharp/vbnet/java/js/c/cpp/xml/sql/as3/php/ruby

E d i t   D i a g r a m s   O n l i n e !
Advertisement
Last Recommended Diagrams
  • WCF Binding
  • Membership (System.Web.Security Namespace)
  • System.ServiceModel.Syndication Namespace
  • System.Configuration: Sections and Groups
  • System.Configuration: Specific Sections
  • mx.utils
  • mx.preloaders
  • mx.controls.menuClasses
  • mx.controls.listClasses
  • mx.controls.dataGridClasses
Last Recommended Diagram
WCF Binding
WCF Binding
© 2010 Model-Xtractor.com - All Rights Reserved.
  • Terms of Use
  • Privacy Policy
  • News
  • About Us
  • Contact Us