Sunday, April 27, 2008

Graphical vs Textual DSLs

At ALT.NET there was a good talk about the merits of graphical DSLs. BizTalk and SSIS come to mind when talking about this. Say we have some data work to do and we do it in SSIS. Once we have constructed our migration or data manipulation, we can save the project.

What we have done in actual fact is saved the graphical representation of what we made. Once this solution is checked into our source repository, it is saved in a non-deterministic fashion. If we modify our solution and commit our changes again, there is no guarantee that everything that was not changed will be in the same place.

To see this directly, you can do a diff on the two versions. Since there is no way to visualize the differences, this information does not tell you anything. One is forced to probe over the details of each property to see what has changed. The best hope is that the person that made the modifications had left some good comments to go on.

So it seems like textual DSLs are the way to go. Once we have changed what we want, the diff between two versions will be very easy to analyze. This is good, but I believe there is a point in between. This is a hybrid solution that will use a textual DSL and a visualization tool to make a graph of what the text describes.

How this can work is the way Visio can make a class diagram for you. If you use the reverse engineering tool to do this, it will place classes in places it's algorithm thinks is best. This of course will not be the ideal most of the time. One will want to move things around so that the information is better conveyed.

These adjustments are what can be cast aside into a secondary file. One would not care what changes this file went through in the repository. The real information is still stored in the textual representation. Hopefully, with more attention to the preference file (storing changes only in an additive way) can help version this too.

A quick analogy can be drawn up to the .suo files that Visual Studio creates. Your solution has the same projects and settings. But the windows that you had open and a number of other preferences are stored in the suo file. These generally do not make it to the source repository.

If there was a way to use a textual DSL to describe your SSIS work, a lot of responsible programmers would be happy. Maintaining an SSIS project would be far easier - or any other drag and drop ridden solution.

Thoughts?

No comments: