DomainLang

A small method for making a useful language

Start with a real business question, agree its meaning, choose the smallest suitable language and learn from people using it.

How it works

A small loop for creating a useful language

Begin with a business question, agree its meaning, try the smallest suitable language and use what happens to improve it.

  1. Name the need and people

    Identify the unclear decision or description and who must write, review or act on it.

  2. Collect examples

    Gather cases that should work, cases that should fail and awkward exceptions.

  3. Agree the meaning

    Define the important concepts, relationships, events and time rules before choosing syntax.

  4. Choose the smallest language

    Use the proposed CoreLang base when it fits, or choose text, a table, a diagram or another form.

  5. Try it and learn

    Check examples, show useful errors, observe authors and revise the language and method.

Read the connections
  • Name the need and peopleCollect examples: make the question concrete.
  • Collect examplesAgree the meaning: expose missing distinctions.
  • Agree the meaningChoose the smallest language: express only what is needed.
  • Choose the smallest languageTry it and learn: put the language in people's hands.
  • Try it and learnName the need and people: revise the question and scope.
Execution is optional. A controlled document, table or diagram may solve the problem without a new parser or runtime.

Begin with an example, not a grammar

Use the appointment rule from the home page: when the service cancels an appointment, it must offer another date within five working days. Ask a domain specialist for cases that should pass, cases that should fail and awkward cases that expose missing meaning.

The team may discover that a controlled document template is enough. Choosing not to create a new language is a valid result. These five steps are a proposed first method: the rebooking example will test and revise them, and an independent team has not yet tried them.

Five steps

  1. Name the need and the people. State who will write, review or act on the language and what decision or description is currently unclear.
  2. Collect examples and counterexamples. Use real-looking but non-sensitive cases to find missing distinctions, exceptions and time rules.
  3. Agree the meaning. Record the concepts and relationships independently of their final written or visual form. For the appointment rule, cancellation by the service and non-attendance by the person are different events.
  4. Choose the smallest language and tools. Reuse the proposed CoreLang base when it fits a business-related language. Choose text, a table, a diagram or another form when that better suits the people and task.
  5. Try it and revise it. Check valid and invalid examples, show useful error messages, observe people editing it and record what must change. Add an execution path only when running the language serves its purpose.

What the method should leave behind

Keep the original question, representative examples, the agreed meanings, rejected choices, validation results, user observations and unresolved questions. A parser test shows that text has the expected structure. It does not show that domain specialists understand the rule. An executable result shows that one example can run. It does not show that the language should become general purpose.

Related work

What the other projects contribute

  • CoreLang will test the method as both the first example and the proposed common base for related languages.