Thursday, October 06, 2005

Enterprise Architect

Wot I've Found Out About Enterprise Architect: Some Notes - to be continued...

The root view in the project browser is called "Views". All the different specific views (Logical, Component, Deployment, Use Case) hang off this. Could this be related to the suggestions in this document:
http://www.phruby.com/publications/OOPSLA98_TechNote.pdf
which also refers to this document:
http://www.phruby.com/publications/Uml_Mulhouse_Springer.pdfThis seems to contain a discussion of a UML repository in terms of its
"views" (Analysis, Use Case, Logical, etc.) and the "levels" (System, Architectural, Class, Procedural) thereof.

So if you create a new object which is going to sit in your architecture, it makes sense to create an object hierarchy within Views, doesn't it? We'll see... Well, in fact, there doesn't seem to be an option to create a package within Views - so that can't be the right way to do it! Whereas, within a specific view (e.g. Component View), you CAN create a package (rightclick -> "New Package..."). Of all those views it looks like the place you're meant to create a package hierarchy is in the "Logical View". The help file says that this is: "The class model and domain model view".

So, within Logical View, I create a package: com.jeannot.test. Note that it just creates a single package with that (dot-separated) name. To create a full hierarchy you have to create nested packages one at a time, e.g. "com", "jeannot", etc. I assume this is how it works: I think when I tried to import packages from pre-existing Java code, it did create the package hierarchy for me. I can't remember exactly.

Anyway, having created a package hierarchy, you can create classes to put in the hierarchy. So much for classes. If you have a class in the Logical View, you can create a class diagram and sure enough you can drop your classes onto it. What happens when you try to use it in other views? For example, I create a Sequence Diagram in the Dynamic View: when I drop classes from the Logical Model into it - it works OK! Fine then.

I still don't quite like the way it puts a package prefix in the class name box. e.g. my class com.jeannot.test.TestClass1 appears in the Class Diagram as "test::TestClass1". Maybe it's just supposed to give you a hint where it's
come from, without having a possibly wide string giving the fully-qualified name. Still, I don't like it. In the Options dialog, under "Diagram", there is a checkbox option to "Disable fully scoped object names", which does appear to suppress this package name display. Hurrah.

Something else I just noticed. When you start drawing dependencies, sequences between classes, they get set up in the class definitions themselves (see the Link tab of the Class dialog). If you then delete that class from a diagram, the link ON THE DIAGRAM disappears, but it's still there in the underlying class. So that if you put that class back on the diagram, the link reappears. You can delete it from the class, of course, in which case it won't reappear, until you set one up or draw one again.