Read other interviews here

TextUML is a textual modeling tool for UML that lets you create models at the same speed you write code . That sounds promising, doesn’t it?. Intrigued to know more  about this tool, I had a coffee with Rafael Chaves (the creator of this tool) to better understand TextUML (why creating it?, how is it developed?, what are its main features?, what kind of models are supported?,…).

This IS the result OF the interview (once transcribed, translated AND edited TO shorten SOME OF the questions/answers), hope you enjoy it!

Jordi Cabot (JC) – Hello Rafael and thanks for accepting this interview. To begin with, I’d like you to briefly describe what is TextUML?
Rafael Chaves (RC) – TextUML offers a textual notation for UML, it does not provide new concepts. It is just an alternative concrete syntax to UML different from the graphical one most people is used to (and that many people have problems with)

JC – We’ll come back later to these problems but first, what diagrams are covered?
RC – First, it is weird to talk in terms of diagrams since diagrams are really a graphical construct but trying to make a parallelism, the focus is on class diagrams, activity diagrams and future plans for state diagrams. The reason is that I’m interested in model-driven development and these are the diagrams that are most interesting in that context.

JC – If you are interested in MDD then, does TextUML support Action Semantics (kind of basic pseudocode programming language part of UML since version 1.5) to define with precision the behavior of each operation?
RC – In fact, this is how the tool started. In the beginning, you could only model behavior with TextUML and I was relying on other tools for modeling the structural aspects. However, then this reliance in third-party tools became annoying and I realized that to implement the structural modeling in TextUML was easier than the part I had already implemented so I just extended TextUML to cover those aspects as well.

JC – How do you organize the information in a TextUML model (since you don’t use the concept of diagram)
RC – I decided not to impose any constraint on this. You can have a file per class, per model, per package,… the compiler can handle ALL these cases

JC – Before you were saying that graphical notations have SOME problems. IN your opinion, what are the main benefits of using a textual notation?
RC – AT least from a developer’s point of view, a tool that allows you to work the way you are used to gives you an advantage. Graphical models have an appeal for people working at high levels of abstraction but for developers is much more natural to use a textual notation: you can use all the tools you are used to (vi, emacs, eclipse text editor, subversion to easily merge your models,…

JC – But then you lose the high-level view of the model with which you can quickly identify, for instance, what are the main elements and get an idea of what the model is about
RC – You don’t necessarily lose that. You can visualize your TextUML using any of the graphical UML2 editors in Eclipse

JC – So basically you ARE offering a bidirectional transformation WHERE TextUML can be used AS textual front-END but THEN models can be opened WITH other editors
RC – Yes, the only thing is that you cannot modify TextUML models outside TextUML, otherwise when  going back to TextUML you will lose the changes.

JC – Now some questions about the development process. When did you start developing the tool?
RC – 2006

JC – This is a side project for you, right?
RC – Exactly. I have had some  help from people at some specific points (special thanks to Attila Bak AND Vladimir Sosnin) but mostly it is the work of a single person. The problem is  that UML is  very large even if we just focus in the kinds of diagram I’m interested in.

JC – So basically you are the single developer but in fact the TextULM project is an open source project, isn’t it?
RC – Yes, it didn’t start that way but in 2008 I changed it to open source to see if the project would get more traction. I’m happy WITH the decision (though NOT AS happy AS I thought I would be). I don’t see any downsides and I got some help. Moreover I don’t have ANY commercial interest IN this tool so I’m happy to share it

JC – Regarding the tool architecture, what is the relationship between TextUML and other textual modeling frameworks in Eclipse like TCS, XText, EMFText,… Have you thought about (re)implementing TextUML using one of these existing frameworks (e.g. you could define the subset of the UML metamodel you are interested in and the textual notation you want to use and let those frameworks do all the “dirty job” of parsing the models and so on)
RC – Sure. When I started the project those frameworks were not available but now I’m confident the features they offer ARE enough TO implement what the CURRENT TextUML features AND it would be a MORE sustainable way OF developing TextUML but it IS a matter OF putting the effort OF migrating everything AND I don’t have the time right now. I’d be glad if somebody steps up TO do the job.

JC – But you don’t see any downsides in that option. Sometimes I have the feeling that, in general, these frameworks are really good as long as what you do follows closely what the framework creators had in mind but if don’t it IS easier TO implement it yourself.
RC – Yes. I think that, FOR instance, XText works well WHEN the abstract syntax AND the concrete syntax ARE closely related (basically a 1-1 relationship). A good compromise would be TO CREATE a TextUML specific metamodel (CLOSE TO the constructs OF the concrete syntax) AND THEN define a transformation BETWEEN this metamodel AND UML metamodel

JC – What other Eclipse plug-ins ARE used by TextUML?
RC – UML2, EMF, a little BIT OF EMFQuery, SableCC for the parsing and the basic platform capabilities

JC – What was your motivation TO start the project, that you couldn’t find any tool with support for Action Semantics at that time?
RC – Yes. I knew there were other tools but it was very difficult to get information about them, I guess they only sell to big ticket clients and I thought that a tool for executable UML could be useful to all kinds of applications like regular business applications

JC – and talking about MDD, have you created any other tool that offers code-generation capabilities (e.g. that given a TextUML model as input creates some kind of code)?
RC – I’m interested IN that (BOTH IN natively executing UML models AND IN generating code FROM them) but this IS outside the scope OF TextUML. It’s a parallel project

JC – Do your eat your own dog food? Is TextUML developed using modeling and model-driven techniques?

RC – Parts of the tool are generated just by using the UML2 Eclipse components. I did need to define some extensions to the UML metamodel used in TextUML and I used TextUML to model them. Then, that textUML file was used to generate the extensions (using EMF) for TextUML itself.
Going forward and if I find the time for that, it would be possible to use Xtext and similar to generate the model parser automatically

Do you know the users of your tool? What’s the feedback you GET?
RC – I have very little feedback. It IS difficult TO know how many users I have. Basically, I ONLY learn about them WHEN they report problems.

JC – How did you decide the syntax?
RC – I have tried TO define a syntax that makes the parser easier TO implement AND I’ve also tried to keep some consistency but I have not put much effort in looking for the best syntax possible. It is impossible to find a concrete syntax that makes everybody happy. The design of the tool allows to change the concrete syntax. 80% of the code of the tool is agnostic wrt the concrete syntax used. I always had in mind the idea of having different textual notations available

JC – Have you thought in extending TextUML with some basic OCL support (i.e. mixing simple OCL constraints inline with the textual definition of the class diagram as a way to simplify the writing of basic OCL constraints)
RC – There is some overlap between Action Semantics and OCL and at some point I was trying to see if it was possible to merge them or use both of them at the same time but a lot of effort is needed to bridge them. The corresponding metamodels do not work together that well. I wanted to allow using OCL expressions within Action Semantics specifications but I realised that would require changing/extending the metamodels. For instance, the concept of variable in OCL is not equivalent to the concept of variable in Action Semantics. Also, I was interested in the concept of OCL collections (and all operations defined to manipulate them) since because I needed that kind of support and Action Semantics has no direct support for them. In Action Semantics it is very convoluted to apply an operation on all instances of a class and things like this so as a workaround I ended up avoiding the Action Semantics support for building sets of objects and trying to mimic what you have in OCL by having some predefined classes in TextUML that represent collections and provide some operations for them (for more details on this check this blog post

JC – What are the tools you see as competitors of TextUML
RC – I don’t think there IS a direct competitor. Emphatic follows a similar approach but FOR Ecore models. FOR UML, we have yUML, UMLGraph but I consider those tools different FROM TextUML because those tools produce diagrams NOT models. IN TextUML, generating a diagram IS just a side function that I added because most people asked FOR that

JC – So you see those other tools just AS visualization tools
RC – Yes, they ARE MORE FOR people that uses UML AS sketch , NOT FOR MDD purposes

JC – What has been the most challenging aspect IN developing TextUML?
RC – Getting around the own UML specification. Still now sometimes I cannot find the RIGHT answer TO my question because the specification IS vague OR even conflictive. I’m missing a reference implementation that I can compare against

JC – What are your future plans regarding TextUML?
One goal is to complete the support for activities and the other would state modeling, i.e. allowing the definition of state machines

JC – What’s your opinion ON DSLs?
RC – I see applications FOR BOTH approaches (UML AND DSLs). We have DSLs IN programming languages AS well but people ARE NOT abandoning Java. IN SOME applications it IS useful TO use a syntax that helps you TO explain the concepts OF a specific DOMAIN but IN others you can use a generic syntax (maybe specializing it a BIT, FOR instance Java AND C# have annotations, UML has profiles). There ARE domains that ARE very generic LIKE business applications. I don’t see the benefits of creating DSLs for each silo of business applications

JC – How do you see the future evolution of the modeling tools market
RC – I have some wishful thoughts. I would like to see a new generic modeling language with the same goals of UML but without repeating the same mistakes (hard to learn, to extend, to understand because is so huge). I believe the OMG is moving towards this same direction. I’d LIKE a MORE modular LANGUAGE WHERE different pieces (NOT ONLY those defined by the OMG) can be combined AND WHERE extensions ARE FIRST-class citizens

JC – IS there anything ELSE you would LIKE TO ADD before finishing the interview?
RC – I think we have covered basically ALL. Just one thing we have NOT mentioned IS whether we can say a textual UML tool IS UML-compliant. I guess that most people think that this IS NOT possible but the UML defines two different types OF compliance: abstract syntax compliant AND concrete syntax compliant. TextUML IS abstract syntax compliant. This IS the most important compliance since tools do NOT care about concrete syntax (e.g. WHEN sharing models)

I hope you enjoyed the interview. CHECK also the previous episode OF the “a coffee with ” series WHERE we talked about MOSKitt (Eclipse Modeling Platform)

Want to build better software faster?

Want to build better software faster?

Read about the latest trends on software modeling and low-code development

You have Successfully Subscribed!

Pin It on Pinterest

Share This