larsbaunwall / DomainLang

A DSL for Domain-Driven Design
https://larsbaunwall.github.io/DomainLang/
Apache License 2.0
10 stars 1 forks source link

Hey there! #1

Open svallory opened 1 year ago

svallory commented 1 year ago

Hi!

I started working on a language, similar to ContextMapper and DomainLang a couple of years ago but never quite got the time to get it finished. I wasn't planning on doing it open-source due to the nature of the business I want to build upon it. But, after seeing Context Mapper, I think the language, the parser, and LS can be open-sourced while the rest is closed.

I got a little confused about your statements regarding "why DomainLang" and your goals. I spent a couple of hours and it looks like ContextMapper has all the features you mentioned. They even have a VS Code extension.

Anyways... I have a .langium definition of a DDD-inspired DSL which also includes features for events and commands. I called it DISL (Domain Interaction Specification Language)

Do you want to chat and see if we should join our efforts?

larsbaunwall commented 1 year ago

Hi @svallory Thank you so much for your issue here. And thank you for your patience; trying to balance day-job and pet-project here 😁

Your project sounds really interesting - how far did you get?

My idea with DomainLang is to modernize the toolchain around DDD diagramming a bit. ContextMapper is an awesome project, and the DSL behind (the DDD-part) is great. However, it is highly entangled in xtext/eclipse, which I wanted to move into something a bit more digestible. And into something that would play nicely with VSCode / LSP from the get-go.

I followed the langium project on the sidelines and think that looks awesome. And applying my DDD experience, I thought I could make something useful on top of that.

I am totally up for discussing further ideas 👍

svallory commented 1 year ago

No worries about the delay! I'm also working a lot :/

My goal with the language is very different. I have two main goals with Disl (Domain Interaction Specification Language):

Firstly, I want to create a language that is formal but can be read and understood by anyone. Since the whole point of DDD is to write the code around the domain, and that is defined in conversions with domain experts, I want Disl to write documents that speak clearly to developers and the experts. For that, the language defines the domain at a much higher level than the implementation details.

Secondly, I want it to generate an entire project. Not several files, but an entire working project. And I want the generated code to be indistinguishable from one coded by a human.

I know, both are moonshots, but I'm working on the problems that come with that goal since 2017 hehehe Back then I was already tired of coding most of the things we do on a job (I have been coding 20 something years).

So I have a bunch of strategies for the issues with generated code, and semantic analysis. Most of the issues can be solved by having a bunch of specialized architects collaborating on a single project model and a self-updating library for real-world concept abstractions and software design patterns.

Once I got a proof of concept, I focused on the syntax. That's why the only public appearance of Disl is a vscode extension for syntax highlighting :)

There's an old screenshot there, but the language, especially on the rules part, changed a lot since 2018. And because of that the syntax highlight needs a lot of updates. But anyways, here's an updated snippet:

image

image

svallory commented 1 year ago

Hey @lancejpollard, you may wanna check this repo