Thursday, May 6, 2010

Delphi Non-Core Feature Survey: You Can Help

Delphi developers, I want to hear from you. Are you using Delphi's frameworks for unit testing, audits, metrics, and design patterns? If no, why? If yes, to what extent do you use these features? Click here to take the survey

Here is a little background. Since the release of Delphi 2005, there have been a number of interesting support features introduced in Delphi. For example, Delphi 2005 added support for easily creating unit tests. And audits, metrics, and design pattern support was added in Delphi 2006.

Initially Delphi's support for unit testing was available in all versions (Professional, Enterprise, and Architect). By comparison, the support for audits, metrics, and design patterns required Together, and this product was shipped only with the high-end versions of Delphi. And, on top of that, the Together product stayed with Borland when CodeGear was spun off. So what did that mean for these features as Delphi evolved?

I have to admit that I have not used the audits, metrics, and design pattern features of Delphi, though I have noticed the associated menu items in Delphi's menus. So, when I got a request from a client to include discussion of audits and metrics in an upcoming Delphi class that I am going to deliver, it was time to do some research.

What I found was interesting and puzzling. There is not a whole lot of information out there about these features. And, I did discover that not only are these features available in the absence of Together, but are now even included (with limited support) in the Professional sku of Delphi 2010.

I have now committed to writing training material on these topics, and this will also lead to my adapting this material for this blog as well for some magazine articles that I am writing. And this is where your help comes.

I want to hear from you. If you are a Delphi developer, I want to know which of these features you use, and to what extent. If you don't use these features as they ship in the product, do you use third-party tools that provide similar support?

I have created a short, 10 question survey that should take only a couple of minutes to complete. Please help me by filling out this survey. In addition, please ask your Delphi colleagues to help out as well. Click here to take the survey

Copyright (c) 2010 Cary Jensen. All Rights Reserved.


  1. Undocumented features might just as well be non-existant.

    BTW, there is a spelling mistake in the post "support where added". I think you mean /;support was added".

  2. I agree with you that a lack of documentation is a problem. I imagine that this is why these features are not used more often.

    Also, thanks for pointing out the grammer issue. It has been fixed

  3. About unit test:
    There are two problems:
    1. Wizard in delphi can be used after creation and in TDD you first create test and next implement.
    2a. There is hard to use mocks in Delphi
    2b. There are no contracts (interfaces without reference counting)

  4. There are several articles and videos on EDN about audits and metrics. Michael Rozlog does talks about Static Analysis - which is what the audits and metrics are all about. Mike's blog also has links. The GOF patterns give you all the details about each pattern when you click on one or more of them. Here are a few resources:

    Audits & Metrics: Delphi Static Analysis
    Learn how to get the most out of Delphi using the static analysis tools included in all versions of the product. Learn how metrics can help you find problematic areas in your code and how to apply audits to increase the overall quality of the code being created or refactored.
    Michael Rozlog – Embarcadero - CodeRage 4 replay:

    Deep Dive: Developer UML with Delphi
    Get the most out of the UML functionality in Delphi. This session covers the recommended UML diagrams for developers. It focuses on the “what & how” of using UML in day-to-day operations.
    Michael Rozlog – Embarcadero - CodeRage 4 Replay

    Rozlog - UML, Audits, Metrics -

  5. Undocumented features might just as well be non-existant.

    This is the big problem in tools of embarcadero.
    Those tools born and die without documentation.
    It's a shame.

  6. David:

    Thanks for jumping in and providing these links. Interestingly, it was Mike's video of audits and metrics that got me to take a closer look at these tools. I hope that over time I can add additional material that will help developers use these tools better.

  7. Hi,
    Modelling docs are in the Help and at

    As usual, suggestions are welcome, and the wiki is a good place to make comments.

    Regards, -Dee

  8. At one of the BorCon Europe conferences, I did a session on this, as this is very interesting. (I think it was in the Delphi 2006 era, but it might have been Delphi 2005 - I can look this up after I restored my laptop - the main HDD died).

    The main problems I saw back then, and most of them are still valid:

    - these features were only available in the top level products, so it was hard for them to gain momentum

    - especially code metrics and audits can make people feel uncomfortable because they actually show the state of their software.

    - modelling support requires a totally different way of thinking; programmers (in general, I see this outside the Delphi world too) have been code centric and keyboard centric for decades; they find it hard to understand and focus on the models and mouse centric way of handling models

    - the modelling support is very keyboard unfriendly

    - the modelling support requires a truckload of extra files of which is unclear which should go into version control

    - the modelling support was very unstable in the beginning; now it is a lot better, but that has scared a lot of users away

    - modelling made Delphi a lot slower (a lot better now too).

    - only the latest versions of Delphi have all refactorings and modelling features (big drawback when you use multiple versions of Delphi)

    - quite a few of the refactorings require modelling support. Because of the above, people are shy using that.

    In fact for most refactorings, I have seen a lot of people (including myself) move to Modelmaker Code Explorer. It is far more code centric, very stable, has excellent keyboard support, and supports Delphi 5 through 2010 (so I don't have to think which modelling or refactoring got introduced when: they all just work)

    I occasionally use modelling, and every now and then I use code metrics and audits.
    I find that because I do a lot of refactoring, the metrics and audits usually give me results indicating my code is good.

    Unit testing highly depends on what kind of code I write. For UI code, I don't use it at all.

    Writing unit tests is an art: you can end up with very big test case projects that take ages to build and run. Then you need a build/test process that can handle that (for instance by using continuous integration).

    For business code, I tend to write a small test projects of which some are based on DUnit/NUnit, and others are just plain console apps performing a specific or isolated test.


  9. Dee,

    But if I wanted to learn about metrics or auditing, why would I look at the documentation on modeling?

    Where can one add comments on the wiki in general (functionality vs content)? Searching on "metrics", the top of the results is "No page title matches", but below that is a list of 20 "Page title matches". The initial "No matches" is misleading and disappointing, one may think there is no good documentation. After all, I don't want to see some page that might just happen to have the word "metric" in it. But I would consider "Working with a set of Metrics" to be a relevant page that should appear in the top list of results. Of course, "Getting started with metrics" (audits) pages would be great for those with no knowledge but want to get started.