-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Hubi
is like a database migration tool but for ubiquitous language i.e. through versioned files you have:
-
Documented language of the domain: it's easier for people to catch up on your domain and spot errors on how it is modeled;
-
A repeatable structure: it's possible to automate part of the software/documents writting relative to your domain. keeping it consistent;
-
Domain progress: it's easy to check how the domain has evolved over time.
# src/domain/user.yml
name: User
description: A person who has an account
attributes:
- name: name
description: How to address the person
required: true
- name: birthday
comment: This field was added later
type: date
required: false
You just read this file, and understood that the domain it belongs to has the concept of users which needs to be "translated" into code, and, if storage is necessary, into a data schema too.
When this file changes, someone has to apply those to the codebase and database. If your domain is concentrated into one project that's simple, but if you have domain knowledge spread accross different projects, with only humans working on it, there's a change that from times to times someone will forget to update all something properlly, specially when it doesn't trigger any CI error.
(In both scenarios documentation is seldom updatedy)
If you let hubi
apply the changes for you, it'll create the code, the data schema and documentation, every time. You'll be free to focus on "translating" the domain rules to software without worring about eventual inconsistencies.
Just run the comand bellow to make hubi
read the file, and start working:
$ hubi save --same-folder --translator joi
Hubi's site is generated by Hubi itself in a process known as "feeding yourself your own dogfood"