We were lucky enough to get an interview from Pedro J. Molina. He has been a well-known protagonist in the Language Engineering field for quite some time. For me it was such an honor to finally meet him, even if virtually.
In this interview he tells us about his experience using DSLs, his activities at Metadev (the company he founded) and he shares with us some of his insights on how we can improve the community.
I hope you will enjoy this interview as much as I did. Below you find the video and the transcript.
You can also check out two videos of two of his products: videos of one of his latest projects: Quid and Essential.
Transcript of the Interview
Federico: Thank you very much for agreeing to this. It’s very nice to meet you, virtually. For our viewers that never got the chance to meet you can you start by telling us a bit about yourself?
Pedro: Hi Federico, my name is Pedro J. Molina. I started working in Conceptual Modeling in 1996 at the Technical University of Valencia in Spain. At the time I was researching on models for business applications, specifically on the UI, when we created a spin-off company and we moved to Denia, also in Spain. So, we implement our ideas about modeling and code generation in this company called CARE Technologies. I was working there for 5 years, the main product we built was called Olivanova Model Execution. At that time, I finished my Ph.D. on Specification and Code generation of User Interfaces for Business Applications. Later on, I joined Capgemini at Valencia. Then I worked as a Software Architect and Consultant for banks like Bancaja, and Mercadona: the biggest supermarket brand in Spain. For Bancaja we built the project PISA, a model-driven migration project. We presented this at the Code Generation Conference that Mark Dalgarno was hosting in Cambridge (UK) yearly. I joined the program committee and the conference every year. It was a lovely place where to meet all the community of Code Generation, DSL, and especially people from the industry. We met guys working on .NET, Java and different approaches. It was lovely.
At the conference I also met the guys working at Icinetic, a startup based in Seville dedicated also to Code Generation. I decided to join them as Chief Research Officer and later on CTO. There, we grow a product called Radarc for code generation built on top of Visual Studio as a plugin using DSL tools, T4 templates, all these .NET technologies. Later on, we decided to move the focus to build tools for end users. We created sold a project for Microsoft Corporation and built: Windows Phone App Studio that was a great success for Microsoft. I lived 4 months in Seattle at that time. Later on, we launched Buildup (a Mobile App Builder with native code generation for iOS and Android). The last product I build for Icinetic, was Hivepod. Hivepod is an App Builder oriented to model microservices with automatic cloud deployment and provisioning (Amazon, Heroku and so on).
In the last two years, I set up on my own and created Metadev my company, to create products and provide services related to DSLs and code generation. In the last 20 years, I kept myself working in modeling, doing DSLs and code-gen because I really love it.
Federico: Well, you have a lot of different experiences. One of my regrets is that I wasn’t able to attend a code generation conference. At the time when I was a PhD student we didn’t have much funding for such things.
Pedro: I think we have now more choices. I think that the community is reuniting again. So, there are new chances to meet for you.
Federico: That’s great. You have described all your experience and interest in domain specific languages. I think that many have asked this question, but can you tell us what are in your opinion the main advantages of DSLs and why someone should being interested in them?
Pedro: I think that one of the main advantages is that DSLs allow you to work at the right level of abstraction. Creating software is quite complex and we have many concerns to reconciliate. Having tools helping you to keep you focused on the current problem to be solved is key to success. This is one of main advantages.
The second one, for me, is technology independence. I think it is a strong driver for a lot of customer I work with. Being able to describe business models, business rules, that we can reuse when technology changes is a very strong advantage for any organization wanting to play in any sector in the long term. Sometimes I describe my job as a tailor: you know, fashions come and go. Any season you have different technologies, but the business rule is still there. So, if you can capture that in a way that survives the next wave of technology you are in a good track.
Federico: Yes, maybe young developers are so focused on the importance of technology. They see a new technology as the main element of software. Maybe it takes a while to understand that business logic is more important and more valuable.
Pedro: Another advantage also is Agility and Quality. A lot of people these days are looking for agility, but if you are in a position that you control the DSL, you control the code generator you can change quite fast. And you have a reproducible process: you can repeat it with the same expected output and quality assurance. And you have agility when adopting new technology or evolving a software architecture. I think tooling is key and provide a lot of agility in customizing DSL.
Federico: Yes, I agree very much on this point and also the fact that you can involve more people that understand the code because the abstraction is higher. You can use the feedback cycle and be more agile.
Pedro: And finally, another advantage is raising the abstraction level with DSLs. We reduce accidental complexity on tooling. And, at the end, we apply the Pareto’s Rule: make easy 80% of the job and just make doable the other 20%.
Federico: Nice. I hope this would convince someone to try DSLs.
Pedro: We have to keep repeating it. When asking to work on this this is the set of advantages that we have to do display.
Federico: Yes! For me it’s a bit frustrating seeing how well they work and how difficult it is to convince people that are not aware of DSLs to take a look. So, maybe explaining the advantages can convince them to do it.
Pedro: In our experience it was much much easier to convince manager because you talk about technological independence, quality, all the advantages, than convincing developers. In the latest years there are a lot of… you know it is like a taboo word to talk about code generators. A lot of developers seems to see code generation as if it is going to change the way they work, maybe it is going to replace them. But this is not the point. This is just another tool that make you, as a developer, more proficient. These days we have a lot of automation efforts. So, people know that if we can automate it, let’s just put the machines to work and we can do other things. We are paid to use our brain. Let’s do the machines do the boring work.
Federico: Exactly. We can take out the boring stuff, that is part of the life of every developer and focus on more interesting things. You have already raise a very good point: that management is easier to convince than developers. Now looking at companies, do you think that DSLs works better for some kind companies?
Pedro: Yes, a first group of companies that could benefit from DSLs are ones with a long-term vision that can invest in modelling their business rules and knowledge. Definitely, a DSL requires an initial investment and a learning curve for the team that is going to adopt it. Very short projects, or proof of concepts, may not be suitable to get the expected Return of Investment (ROI). However, cost in tooling has been dramatically reduced in the latest years.
We have better tools for parsing, for modelling and for representing structure. Also, we can reuse data that we already have and open-source.
Another group that have good reasons to use DSLs is companies having to comply with strict regulation and security policies. That’s because for them, model, code generators and model interpreters can automate and enforce a lot of regulatory policies. In these domains, failing in regulation compliance can be associated with strong fines or loss of trust. So for banks, insurances, and these kinds of companies this has a lot of sense.
Federico: Also, in the medical sector.
Pedro: Yes, sure.
Federico: I agree very much with what you said that new tooling reduces the cost of developing this structure. Maybe we still miss the people that know how to use these tools.
Pedro: We still need to evangelize. As you do with your work.
Federico: I try. And about these tools, which are the are the Language Workbenches you prefer or suggest people to look at?
Pedro: Well, we have a lot of choices. I cannot be very objective, as I, myself created and maintain one: Essential. We have MPS, Metaedit, The Whole platform or Rascal to cite a few, are amazing tools. Like everything, there is no single tool for every problem and different problems needs different approaches. I am glad we have more and more choices to use when creating DSLs. In general, I prefer tools that expose simple APIs and simple concepts instead of too much complexity. Especially in some environments, when you get with some complex projectional editors I think that users can get lost. And my bet with the DSL I create is to provide something as simple as possible. It has to let people focus on what they are building as opposed to any of the accidental complexity.
Federico: Well, I really like the JetBrains MPS but I am scared of the complexity, honestly. Because there are too many things going on. I am very happy that you named the Whole Platform that I think that is very interesting and should be named more.
Pedro: Yeah, I met Enrico and Riccardo at Code Generation and I was surprised. I think that their tool is lovely. I think that more people need to take a look at it. We would have a link, so people can take look at it: Whole Platform.
Federico: Absolutely. Can you tell us also about Essential and where you see when it can be the best choice? If there is a particular kind of application or environment where you can say to use Essential instead of the others?
Pedro: I use Essential to prototype code generators. With Essential I can model meta-models quite fast and work with models. After that we apply model transformations to create quite fast a prototype of code generators. So, that’s why I can build proof of concepts for code generators for customers and later on use them as bases for code generators. Basically, is also a tool that you can use for laying all the basics for model-driven engineering. Because you can create models, meta-models and transformations: model-to-model and model-to-text.
Essential IDE – Hello World sample
Federico: Okay. So, we would make sure to add some links to some more in-depth explanation, so people can take a look: Essential. We have talked about the tools that you like, and I was also curios about people that you admire the most in the field? So, people that we should follow.
Pedro: Terrece Parr is one of my favorites: as the author of ANTLR and StringTemplate he has contributed a lot to the fields of parsing and templates for code generation. I think we all read his books and use his software a lot.
On the other hand, the work of Bred Victor on WYSIWYG editors and direct manipulation interfaces is amazing in the way it helps people to understand what’s going on. Clearly, he has influenced my work a lot: looking for simplicity and for direct manipulation. To provide feedback to users directly, as they type.
Federico: That’s interesting. I will be sure to take a look. Of course, I am very familiar with Terence Parr and his amazing work. I am using ANTLR a lot. But I wasn’t aware of Bred Victor.
Pedro: I would provide the link because it has a great website with lots of samples and you can spend a lot of time playing with them. Yes, really playing because there are interactive webpages and you can play with different pieces.
Federico: Well, I hope that I would not play all the time and reduce productivity. Why do you think that in Language Engineering seems more well-known in Northern European countries, while Southern European countries seems less well-known?
Pedro: Yes, that’s true indeed. Germany and Netherlands are especially very well represented in the industry and creating many applications. The automobile industry and aerospace are natural markets for DSLs usage.
On the contrary, on the academic side, I think Latin countries are well represented. For example, with the work of Jordi Cabot (Nantes before, and Barcelona now), Obeo at Toulouse and different research groups in Spain and Italy to cite a few.
In any case, I still see Formal Methods, in general, has a better reputation in Europe than in North America. America is used to be more pragmatical in these kinds of things. But this is something that is changing quite fast. Looks for example at domain like Artificial Intelligence, Machine Learning or Data Science: it is full of models! And people appreciate them.
Federico: So, maybe we just need to do more evangelization in companies. I am happy that you named the work of Jordi Cabot. I think his blog is very important in the field. So, there is hope, that we will reach the public. At least in the industry, because, as you said, in the academy we are in a good position. We can step up also in the industrial field, to reach what they are doing in Germany. About making DSLs more widely known, do you think that there is something in particular to make more people aware of DSLs?
Pedro: Sharing results on success cases a great way to explain the benefits of DSLs. I usually find people still perceive DSLs as something complex, slow to build and expensive. Tools have matured a lot in the last 20 years and now we have the technology to make DSLs in much cheaper ways. Explaining cost/benefits analysis with real numbers uses to open the eyes to many customers in doubt. I think these kinds of things works a lot. There are a lot of fields where we can contribute with DSLs: for example, take a look to blockchain and Smart Contract with languages like Solidity. There is a lot of news these days where small mistakes can cost a lot of money. So, we have a lot of tools that can help you verify that you are building the right smart contract.
Federico: Solidity is a very good example. When I saw it, I thought someone that knows about DSLs can build something much better!
Pedro: Yes, because when you see that kinds of languages with the point of view of a language engineer. You can see that maybe they build that language quite fast, with no time put in the small details. There is space for improvement.
Federico: I have also the feeling that we talk about DSLs only to other language engineers. So, we talk about language workbenches, but we do not talk so much about applying DSLs. As you said, we could apply DSLs to blockchain or to specific project. Maybe that would make easier to potential users of the DSLs to familiarize themselves with them and to get the advantages. Now, let’s talk about your company: Metadev. I am interested in what kind of services do you offer? What kinds of clients do you work with? If you can share it.
Pedro: Sure. I decided to create Metadev to build tooling for creating DSLs on the web. We have developed in-house tooling based on Essential. Essential core was created originally on .NET, but now is ported to TypeScript as the main language. This allows us to transpile to JavaScript and run models and editors on the browser or in the cloud using NodeJS on the server-side. With these technologies: we create tools for building software. Quid is the first one. I would talk about it more in-depth later. We provide services to create DSLs using these technologies. We do consulting, mentoring and custom software development. We help also software teams that are creating software and hep them with mentoring professional services
Federico: You have named Quid: how do you pronounce it?
Pedro: Well in Spanish is “Qid”. It is a Spanish word, but maybe in English would be more about Quid, as in UI, right? Maybe coming from Italy, with Latin roots, “Qid” is the right pronunciation for me. But we can say Quid.
Federico: Can you tell us the goal of the project?
Pedro: Quid is a first DSL we wanted to publish for creating and prototyping User Interfaces. UI is my main focus. It was the topic of my PhD. The goal is to provide a tool for prototype UI and especially Web Components. Web Components is an emerging technology that browsers are incorporating. We see that we will need tooling for composition and authoring them. I think that this is emerging market and we can push Quid as the first tooling to do these kinds of things that we need.
Federico: I think that is nice to have someone that is an expert in language engineering that provides DSLs instead of tools to build DSLs.
Pedro: I wanted to keep the focus all the time, with my work, in final products that people can use. Not just only meta tools. I wanted to provide the examples, what we can build with this kind of tooling to be effective. And also, to keep our foots on the earth. To do checks that our tooling is complete, that it scales, that it is robust enough to do the real work.
Federico: Maybe many DSLs are built for a specific client, so they are closed. No one knows about them. So, it is also more difficult to provide the examples. Now, I have one example that I can point out to people when I talk about DSLs. So, thank you for that. What do you think are the ideal users for Quid? Who do you think would benefit more from it?
Pedro: Designers and developers wanting to prototype User Interfaces. Quid removes syntactic delimiters as much as possible to reduce syntactic noise and uses an indentation-based language to represent composition. The WYSIWYG editor allows to see the result on real-time: that something I wanted to provide: real-time feedback for users, making them quite productive to fix the design on the fly, as fast as possible.
The point here is that frameworks and technologies for Web components are emerging and it is not clear which one is going to the winner: React, Angular, Vue.js… who knows? Quid allows starting to work with them today, doing code generation to different technologies right now. In a few months, Quid will focus on generating high-quality code and support for the framework with more adoption. I think it is a way to start working with web components today and not awaiting what is going to happen. And later on, it doesn’t matter which framework is going to win. We can generate code for the winner or the two that you are expecting. I think this is an example of one main advantage we were talking before: technology independence. Because you can take a look at the model of web components: a web component is just component, properties, methods and events. It is the same that we had twenty years ago with Visual Basic and Delphi, and now for the web.
Federico: So, in a way, you help companies to make their investment more safe. Because no matter which technology will prevail the effort in build their components will still be saved.
Pedro: Yes, I am a strong believer that the value is in the model. It is the main selling point. The value is in the model, the code is discardable. We can throw it away, as long as we have the knowledge in the model.
Federico: Good point. Before you talked about Essential. Can you discuss if there is a relation between Essential and Quid?
Pedro: Yes. We can say, Essential is in some way, the father of Quid. Years ago, I used to work a lot on .NET with Microsoft DSL Tools and creating DSLs. In such days, EMF started to grow as a metamodeling environment on the JVM and Eclipse.
I needed tooling at that time, because there were no choices available to work with DSLs in the .NET environment. This was one of the main driver to create Essential. I decided to create Essential as the metamodeling core library I need to work with DSLs. Essential is an IDE and library (or a Language Workbench if you prefer) that provides tooling and an environment for parsing, creating models, metamodels, M2M and M2T transformations. I have used Essential as a core technology for a lot of my work. In the last year, as I have said before we ported Essential to TypeScript to be able to work on the web. I seek to be independent of traditional IDE like Visual Studio and Eclipse, because it is a problem when they update you have to rewire all your tooling to keep following the environment. On the other hand, if you are on the web you have zero installation costs for users. You can update every day and do the migration faster. So, I feel that the future for modelling is on the web. I think more colleagues are on the same page: TypeFox, for example, Obeo, also Markus Voelter, with Convecton, all they are looking at the web as the main plaform for modelling tools. Note: Of course Convecton is been built by a great team at Itemis, not just by Markus himself.
So, coming back to your original question Quid uses everything from Essential: models, metamodels, grammars, and code generation engine. And in this case, in Quid we put everything on the browser. But we can move some parts of the model server-side and run them with NodeJS as needed.
Federico: with Metadev you have your products, but you also offer training, can you elaborate on that?
Pedro: Yes, at Metadev we mentor development teams: We train them in technology, for example in the MEAN Stack (MongoDB, NodeJS, ExpressJS, and Angular), C#, Containers, Continuous Integration, TDD, Source Control tools.
For customers wanting to create or use DSLs, we build custom DSL and teach them how to extend and maintain the tooling: metamodels, parsing, code generations or interpreters.
Federico: About consulting projects: there are any kind of typical projects you work on?
Pedro: Sure! Related to DSLs we recently used Quid as the base DSL for defining the User Interface and Front-end for an international bank. Later on, we use the DSL for code generation following the architecture and technologies already defined by the bank.
It is very common to use a common DSL and adapt the code generation for the specific customer: ranging from Oracle DB + Java, SQL Server + C# .NET or MEAN Stack with cloud deployment. I have a lot of experience adapting to the stack of technologies that the customer already has. To provide an accelerator for them to be able to translate the model to the stack they already utilize.
Federico: So, you have a core that you can already reuse in Quid and adapt it to different clients.
Pedro: Yes, the front of the product is the DSL. It didn’t change or changed very little, but the code generation part can change a lot depending on the target platform they are using.
Federico: Now I would like to go toward the ending of the interview understanding your vision for the future. I will start asking about what are you working on at the moment, what are you more excited about?
Pedro: Well, with the launch of Quid, one month ago, there is a roadmap of features to incorporate. We have received fantastic feedback from a lot of people. And this also encourage us to prioritize this feedback and the features we want to incorporate into Quid in the following months.
Also, we are working on A DSL tool for defining API services. I work a lot with OpenAPI. I think there is a lot of value in defining these kinds of contracts. So, we are working on that. I hope we are going to release, in the following months, another DSL targeting API definitions.
Federico: Okay, when you do release it, please let us know.
Pedro: Yeah, sure I would love to have your feedback.
Federico: Finally, what do you think is missing in our community to reach the next level?
Pedro: As I have said before, I miss the good old days where people from industry and academia met every year at Code Generation in Cambridge, UK. It was a very good way to do what everybody was doing, once per year and to take the pulse to the community.
I know that recently Tijs van der Storm and Markus Voelter and taking the lead to have an annual meeting. Also, I think that we need to try to meet once per year in the community to have this kind of things moving on. And to take a look at what others are doing. Also, as I have commented your blog is a quite valuable reference for DSLs and training. Also, we have the modelling portal from Jordi Cabot, providing a lot of information for people to want to know more about DSLs. So, keep pushing the great work! I will be happy to contribute with my two cents to make DSLs more visible.
Federico: Thank you. I think that you have contributed a lot to this community around the years. You gave very interesting points for you viewers to explore the subject. And, of course, we are going to add some videos to the presentation, so that they can look with more details at the work that you have done. So, thank you very much for this interview.
Pedro: Thank you, Federico. It was a pleasure to speak with you, today.