Introduction

About

YADEL is a command line utility which converts a YAML with model definitions into Django models & Django model admins. YADEL borrows its name from [YA]ml and mo[DEL].

@startuml

skinparam linetype ortho

file YAML #f0d0d0 [
    **YAML Definition**
    input.yml
]

component YADEL [
    **YADEL**
    The **YA**ML Django Mo**del** Converter
]

collections Model #d0f0d0 [
    **Django Model's**
    models/{model}.py
]

collections ModelAdmin #d0f0d0 [
    **Django Model Admin's**
    admin/{model}.py
]

YAML --> YADEL : Reads YAML file
YADEL --> Model : Generates models
YADEL --> ModelAdmin : Generates model admins

@enduml

Rationale

Of course, we created YADEL for a reason. When new projects are started, a lot of initial questions related to the business logic rise. Before the development is started, answering & documenting those questions is highly recommended. Those questions / answers will most likely automatically result in business requirements.

Now when doing proper project management, those requirements will be written down in a documentation or user stories. Then developers will pick them up and start implementing them manually, step by step:

@startuml

actor customer [
    **Customer**

]

actor engineer [
    **Requirements Engineer**
]

file doc [
    **Documentation**
    Wiki, User Story, etc.
]

actor developer [
    **Developer**
]

node app [
    **Application**
]

customer <-> engineer : Finding requirements
engineer --> doc : Documenting requirements
doc --> developer : Interpreting requirements
app <- developer : Manually implementing requirements

@enduml

At the beginning, a lot of requirements are related to the defintion of the data / model layer.

This is where YADEL kicks in. Instead of writing all those answers down, converting them manually to business requirements (e.g. in form of user stories) and then instructing developers to implement them, YADEL aims to replace that manual process as far as possible:

@startuml

actor customer [
    **Customer**

]

actor engineer [
    **Requirements Engineer**
]

file yaml [
    **YADEL File**
    A YAML file with the requirements
]

component yadel [
    **YADEL**
]

node app [
    **Application**
]

customer <-> engineer : Finding requirements
engineer --> yaml : Documenting requirements
yaml ..> yadel : Reading the YADEL (YAML) file
app <. yadel : Automatically converting to\nmodels & model admins

@enduml