Quest in Time

Wednesday, February 09, 2005


Microsoft have started up a new community website devoted to organising and publishing patterns, and have several of the major players on board including GOF and Fowler. This would seem to fit it with the Software Factories initative for Model Driven Development, which underpins their DSL developments.

This is a great idea which I hope won't get tangled up in politics.

Monday, January 31, 2005


I've been ill for the last week, so have not been doing much. Since I would like to use a RUP like process, and we have already adopted Prince2 for project management, I've been doing some initial tailoring of RUP to remove the overlap.

From previous work on this we have already adopted a six stage/phase process, adding Prince2 Initiation before Inception, and Closure after Transition. My work 'offline' this week has been to remove the Project Management and Config Management disciplines from RUP so as to leave just the 'Specialist' activities.

Prince2 advocates a product based approach, where RUP is activity based, so there is some interesting alignment to do. Worse Prince2 (for all its IT heritage) suits a waterfall approach, so there is much to do to make it handle a RUP style iterative and incremental.

Tuesday, January 25, 2005

To Tree or not to Tree

I feature that I believe is common to all VS2005 DSL's that I dislike is that they are inherently treelike, and have treelike visualisations. If this is correct then its a key difference from UML (all all the other OOAD modeling languages I've used).

Most of the OOAD methods and techniques I use (CRC, robustness, separation of concern) have always been done with modeling languages that support flat graphs or nodes (classes) and arcs (relationships).

Can these work with trees (acyclic directed graphs?)? If not then we will need a whole new set of techniques.

Most of the above techniques have been around for years, do Microsoft or others, already have a set of tree based techniques, that we can just learn? If not then method maturity may become an issue, i.e. We have lovely shiny new DSL's, but don't have the experience and hindsight to use them effectively.

If its possible to map these techniques successfully onto this world of trees then it may not be such a problem.

Monday, January 24, 2005

Visual Studio DSL Metamodel

Hunting through the MSDN blogs relating to Visual Studio 2005 (VS2005) and DSL has begun to reveal useful stuff. From this point forwards I'll be focusing on DSL as it is being implemented in VS2005.

The basis for Domain Specific Languages is that each problem or solution domain should have a specific modeling language. In VS2005 Microsoft (MS) are providing a toolkit, not just of MS defined domains and languages, but allowing new DSL to be defined. DSL are defined in terms of models which are themselves defined in DSL.

This parallels the relationship between UML and the UML Metamodel which is itself described in UML. Thus I will refer to DSL definitions as conforming to the VS2005 DSL Metamodel, though I have not seen this term coming from MS.

Since VS2005 DSL is extensible in terms of its Metamodel, it is this that limits the DSL that may be defined. I think that this is the basis for most of the arguments between the UML and MS DSL camps, so that's where I'm concentrating my efforts at the moment.

Microsoft have issued a couple of walkthroughs related to this metamodel, unsurprisingly documented in VS DSL, my first task will be to translate these into UML for comparison. As far as I can tell I won't be able to do the reverse (i.e translate the UML metamodel into VS DSL), but more of this later.

Thursday, January 20, 2005

Project mis-management

We are in the budgets and planning cycle for the next financial year, which in my case involves making sure we have enough resources to meet the IS projects sanctioned. Thus I have been re-establishing my love-hate relationship with Microsoft Project's resource leveling function.

Every time I resource leveled the project several of the tasks ended up after the end of the project, or summary bar. After fighting with it for 2 days I worked out that if leveling had calculated that a task should be delayed 2 days, the task would be moved by 8, but the summary bars would still be assuming it moved 2.

A long search of Technet did not reveal any similar issues, but did reveal a service pack, which I downloaded anyway. This fixed the problem, but the documentation for the pack did not reveal a fix of this or a similar problem.

Should anyone by using Microsoft Project 2003 I strongly suggest downloading Service Pack 1.

Sunday, January 16, 2005

Domain Specific Languages - a reflection on past projects

I've yet to get my hands on the Microsoft DSL Tools beta, as I first have to get the Visual Studio 2005 beta and its only available on CD (as far as I can tell).

I have managed to read up a bit, and at least it turns out not be something that Microsoft dreamed up. I'm still feeling my way here, and articles like this one in Martin Fowlers bliki, give me a sense of the size, and complexity, of the subject without making me feel I understand it.

It has caused me to reflect however on the last major project I worked on (in a previous organisation). This was a suite of bespoke applications for use in UK electricity market. In order to give some indication of scale here are a few statistics.

  • Length - 2 years to live plus 2 years on-going development
  • Team - on average about 6 Java developers, 1 ASP developer, 2 Analysts, and 8 testers/test automation developers
  • Size - 3 applications comprising about 5000 Java classes
  • Technology - Java (1.6.1), ASP, CORBA, SQL Server

This project started when Java was very young, and J2EE was still years away, but the idea was to deliver an enterprise application, with a B2B messaging infrastructure, workflow, distributed processing, and a web based interface. In the absence of standard solutions for much of this the project had to roll its own.

The project built 4 key infrastructure components on which the entire solution was based.

  • A Database Agent to manage persistence, object relational mapping, instance management, and compiled queries
  • A Job component to manage distributed processes over CORBA
  • A Message component to handle parsing and validation of all incoming and outgoing messages
  • A Workflow component to handle consequential processing of incoming messages, exception handling, manual steps, and escalation

I believe that in each case Domain Specific Languages played their part even if I didn't think of it this way.

The project used most of the Rational tools suite, Rose, RequisitePro, and SQA, and UML throughout the life cycle.

The message catalog and business workflow documents were centrally produced for industry wide use. Each was produced by a separate body and they did not synchronize their issue. So we could get a new version of the catalog that defined messages that were not used in any process, and new versions of the processes that referred to messages that were not in the catalog. As the rate of change was significant, we found that we were repeatedly throwing away are Use Cases and starting again. We defined some use case stereotypes which separated use cases in to message handling, and process types. After we started using these we never threw the model away again. We also standardised on a way of laying out the use case diagrams. Both these standards and the stereotypes were only used on diagrams of the messaging use cases, so I believe that using the extensibility mechanisms in UML we had created a DSL for the B2B massaging domain.

The Database agent design originally required that the developer implement a lot of code for each persistent object, and prepare the SQL tables by hand. A redesign introduced a metadata database, and a code generator which would automate this process (outputting about half the Java files mentioned above). I think that this metadata database was implicitly a DSL for our Persistence domain.

As Activity charts were not part of either UML or Rose at this time, we used state charts to diagram workflows in analysis, but had build a data driven workflow engine to implement and execute them. The mapping between the UML statecharts and the workflow metadata was explicit and may well have had DSL aspects.

In the first case above the DSL was formed through the extensibility mechanisms inherent in UML, a more extreme example can be found in the work of Jim Conallen in modeling web based applications in UML.

In the latter 2 cases while UML was still used at some point a non-uml tool took over that was designed deal with the specific domain.

I may still be missing the point, so I'll keep looking for further enlightenment.

Time Passes

Other projects have been getting in the way over the last few days.

One was an architecture workshop for an application re-write. The old version was written in a proprietary Java framework, which as these things tend to do, whet suddenly obsolete and unsupported.

As an organisation we made a decision about 12 months ago to move to a single platform for all our application delivery, but to stick to industry standards that we already had some exposure to which for us meant J2SE/J2EE or .NET. Either of these platforms would have done, and I am personally ambivalent (I like both). In the end we settled on .NET, and so the workshop was considering how we might structure such an application.

I've used Jacobson's analysis class stereotypes (boundary, controller, entity) before, both before RUP and with RUP, and found this and his robustness analysis techniques very valuable. We talked about their application in this project, and have agreed to use them. I'm now pondering whether to use them in isolation or go for a full RUP based process.

Thursday, January 13, 2005

Rational Software Modeller (RSM)

Thanks to Keith Mantell for pointing out that this was in fact available. Knowing this I renewed my search of the IBM site and now know that these excellent tools are unlikely to be in my budget range.

I've been trialing RSM for the past two weeks alongside the latest version of Rose. Of the two I much prefer RSM though its a very different paradigm to Rose so it took a little getting used to.

Keith also asked a few questions in relation to my perception of complexity in UML 2.0. I'll deal with this later, as it needs a bit of time for thought.