Using Together in Delphi

Using Together in Delphi (John Kaster)

 

Together for Delphi (both Win32 and .NET) and C#

  • New LiveSource class diagramming (two-way modeling)
  • New UML diagram suite – you could use this just as a diagramming tool
    • Class, Use Case, Sequence, Collaboration, State Charts, Deployment, Activity, and Component Diagrams
  • Design Patterns
    • Get started quickly with industry recognized GoF (Gang of Four) design patterns, or add your own (e.g., shopping cart)
  • Refactorings
  • Audits and Metrics – static code analysis
  • Document generation (generate documentation)

Together – Diagramming Types

  • Class Diagram (used by ECO)
  • Collaboration Diagram (shows how pieces talk to each other)
  • Use Case Diagram (avoids talking about terminology that will confuse non-programmers)
  • Activity Diagram
  • Component Diagram
  • Deployment Diagram
  • State-chart Diagram
  • Sequence Diagram

Design Patterns

  • Powerful Reuse Capabilities
  • Defined in Pattern Registry
  • Managed via Pattern Organizer
  • Supports C#, Delphi, Design Projects
  • Create/Edit Patterns
  • XML File Defines Model and Link Information

Audits

  • Source code conformity rules
  • Violations displayed
  • From Design Issues to Naming Conventions
  • Descriptions & How to Fix

Metrics

  • Evaluate Object Complexity
  • Quantify your code
  • Highlight Redesign Needs
  • Change Impact Analysis

Documentation Generation

  • UML Documentation Wizard
  • HTML Generation

Refactorings

  • Safe Delete
  • Changing Parameter
  • Creating Inline Variables
  • Extracting
    • Interface
    • Method
    • Superclass
  • Introducing
    • Fields
    • Variables
  • Moving Members
  • Pull Members Up
  • Push Members Down

If you use the Rename refactoring to rename a VCL control, it will change the Name property inside the DFM, and will also rename Button1Click methods.

 

Audits & Metrics: can save profiles for which rules you have enabled and disabled; can specify per rule whether it’s considered a warning or an error. Actually goes after your code, not the UML.

 

Q: Can we run audits from the command line, e.g., as part of an automated build? A: Don’t know offhand (the Together team is in St. Petersburg, so he doesn’t talk to them quite as often as the Delphi team). I’ll e-mail him and ask.

 

Q: Is there a way to disable an audit for a particular block of code (e.g., the way you can disable a particular compiler hint for a block of code)? A: Don’t know offhand; have to e-mail him.

 

Together diagramming:

  • “Generalize” = drag from one class to another; makes the source descend from the target
  • If you change the code, the diagram doesn’t refresh right away – looks like LiveSource isn’t really live

Documentation generation: same thing as JavaDoc or NDoc, using /// comments in your code. But includes a UML diagram with an imagemap, so you can click on a method name in the UML diagram to jump to its documentation.

 

Ten-second feature-matrix summary (not published yet, but this is supposed to be the final version and it’ll be up “any day now”): Language-neutral UML is only in Architect. Most diagrams are only in Enterprise, as are doc generation and audits&metrics. All Professional can do is create and print class diagrams.

 

I’m still not particularly clear on when, or how, I would use Together in a Delphi app…

Leave a Reply

Your email address will not be published. Required fields are marked *