All Projects → mvcds → hubi

mvcds / hubi

Licence: MIT license
Humanitarian ubiquitous language helper

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Gherkin
971 projects
shell
77523 projects

Projects that are alternatives of or similar to hubi

Fastcore
Python supercharged for the fastai library
Stars: ✭ 565 (+3223.53%)
Mutual labels:  developer-tools, documentation-generator
Nbdev
Create delightful python projects using Jupyter Notebooks
Stars: ✭ 3,061 (+17905.88%)
Mutual labels:  developer-tools, documentation-generator
gogen
Clean Architecture Code Generator
Stars: ✭ 42 (+147.06%)
Mutual labels:  code-generator, domain-driven-design
Plastic
This project provides encapsulation of things like Domain, Application Rules, Business Rules or Business Logic in Application.
Stars: ✭ 30 (+76.47%)
Mutual labels:  domain-driven-design
AutoLoadOne
AutoLoadOne is a program for PHP auto include classes by parsing a project and generates an auto load class
Stars: ✭ 37 (+117.65%)
Mutual labels:  code-generator
php-json-schema-model-generator
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
Stars: ✭ 36 (+111.76%)
Mutual labels:  code-generator
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (+58.82%)
Mutual labels:  developer-tools
android-trinity
android-trinity is tiny proactive framework with much of the scaffolding code required to start a new Android Application.
Stars: ✭ 44 (+158.82%)
Mutual labels:  developer-tools
badge-generator
Magically generate Markdown badges for your docs 🛡️ 🦡 🧙
Stars: ✭ 104 (+511.76%)
Mutual labels:  documentation-generator
ShaderBoiler
Aimed to eliminate preprocessor hell in shaders and kernels.
Stars: ✭ 30 (+76.47%)
Mutual labels:  code-generator
GraphQL.Tools
GraphQL.Tools is a GraphQL to C# compiler (code-generator) which turns your GraphQL schema into a set of C# classes, interfaces, and enums.
Stars: ✭ 49 (+188.24%)
Mutual labels:  code-generator
portal
An api-driven, in-kernel layer 2/3 load balancer.
Stars: ✭ 101 (+494.12%)
Mutual labels:  developer-tools
cqrs-event-sourcing-example
Example of a list-making Web API using CQRS, Event Sourcing and DDD.
Stars: ✭ 28 (+64.71%)
Mutual labels:  domain-driven-design
okty-config
Configuration repository of the simplest application to create docker projects
Stars: ✭ 13 (-23.53%)
Mutual labels:  yml
treblle-laravel
The offical Treblle package for Laravel
Stars: ✭ 43 (+152.94%)
Mutual labels:  documentation-generator
xsdata
Naive XML & JSON Bindings for python
Stars: ✭ 144 (+747.06%)
Mutual labels:  code-generator
copygen
Go generator to copy values from type to type and fields from struct to struct (copier without reflection). Generate any code based on types.
Stars: ✭ 121 (+611.76%)
Mutual labels:  code-generator
wordup-code
Visual Studio Code extension for wordup that makes it easy to develop, manage and export WordPress plugins or themes.
Stars: ✭ 12 (-29.41%)
Mutual labels:  developer-tools
python-autoclass
A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).
Stars: ✭ 30 (+76.47%)
Mutual labels:  code-generator
legesher
Because language shouldn't be a barrier to code
Stars: ✭ 29 (+70.59%)
Mutual labels:  developer-tools

Hubi Build Status JavaScript Style Guide Coverage Status GitHub licenseBCH compliance

Hubi is like a database migration tool but for ubiquitous language i.e. it reads some of your versioned files to write code, data schema and documents.

how to use hubi

When to use hubi

Use it in one or more of the following situations:

  1. If you want to have a documentated language for your domain, especially when it needs to be consulted by non-technical stakeholders.

  2. When working on a project spread into different repositories e.g. back- and front-ends, so changes in one of them needs to be repeatead in the other ones in order to make the end-result work.

⚠️ Hubi does not connect, or tell you how to connect, the project's repositories.

  1. Your repositories are modeled in a way where it is possible to share domain knowledge across them interchangeably.

  2. You want to reuse a repository's slice of the domain (the way you've coded the model) in another repository from different projects. This is the least advisable scenario, as each repository generally has a slightly different perspective on how the domain looks like.

Basic Use

Declare how your domain should look like in a YAML file, refered to as domain file, and then execute hubi with the options provided by its API .

Each one of this files is responsible for a piece of the domain. Its rules can be found at hubi's domain file guide 📗.

Installation

As hubi is a development tool, it is recommended that each project have it installed by using the developer flag.

$ npm i hubi --save-dev

or

$ yarn add hubi --dev

Example

In an imaginary project, the stakeholders have decided that it is necessary to show the user's birthday in their profile page. So the file relative to the user concept is changed:

 # Domain file @ project/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: eyes
     description: The color of the user's eyes
+    deprecated:
+    - message:
+        We've discovered that this is a useless information for us.
+        Will be deprecated soon
+    - error: false
-    required: true
+    required: false
+  - name: birthday
+    comment: This field was added later
+    type: date
+    required: false

With one command, it is possible to spread this change to the code, data schema and documentation. You decide which translations hubi writes:

$ npm run my-custom-hubi-script
> hubi save --same-folder --translator joi & hubi save --output documents --translator site

In the example below, a Joi schema and an entry into the project's site were changed to reflect that change.

Contributing

Take a look at our 📗 contributing guide to improve hubi.

How does hubi relates to domain driven design (DDD)?

The only relation is that hubi is based on the concept of “ubiquitous language”, something Eric Evans presents in his book about DDD.

I don't know if he come up with this idea or only used it as his book's initial seed. A language-to-rule-them-all is a communication tool that simply states that we should encode domain knowledge (terms, phrases, etc) into the codebase in order to bridge the gap between developers and domain experts.

But you can still use ubiquitous language regardless of DDD because it stands on its own. So, even if you don't know/use it, you can still use hubi to reap the benefits of speaking a single language - at the same time you document your domain as code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].