lutaml / lutaml-uml

UML module for LutaML
2 stars 2 forks source link

UML syntax: Packageable element, ElementImport, PackageImport #13

Open ronaldtse opened 4 years ago

ronaldtse commented 4 years ago

Packageable element

ElementImport

PackageImport

<<access>> and <<import>>

Screen Shot 2020-08-03 at 9 43 50 PM

Proposal:

package Order {
  import_package <<access>> Customer
  import_package Types
}

package Billing {
  import_package <<import>> Order
}

package Customer {
  import_package <<access>> via(BankAccount) "Banking Information"
}

package Types {
  class "Postal address" {
    +Name
    +Street
  }

  class -Date
  class "Banking Information"
}
w00lf commented 4 years ago

@ronaldtse i think we better use separate association defninition:

package Order {
}

package Billing {
}

package Customer {
}

package Types {
  class "Postal address" {
    + attribute Name
    + attribute Street
  }

  - class Date
  class "Banking Information"
}

Customer >>| access | Order
Types >> Order
Order >> Billing
"Banking Information" >>|access:BankAccount | Customer

Where >> is an import notation, additional || marks can give additional info about import type and via which attribute

ronaldtse commented 4 years ago

First of all I personally find the separate association definition very difficult to understand because the ascii arrows are too different and separate from the entity definitions. If I have a choice, I will always use the in-class relation definitions.

The second thing is that there needs to be a "full syntax" for associations too. e.g. an association can be a generalization of another association , which is not possible to express in the plantuml type arrow syntax.

w00lf commented 4 years ago

First of all I personally find the separate association definition very difficult to understand because the ascii arrows are too different and separate from the entity definitions. If I have a choice, I will always use the in-class relation definitions.

The second thing is that there needs to be a "full syntax" for associations too. e.g. an association can be a generalization of another association , which is not possible to express in the plantuml type arrow syntax.

Ok, got you, lets introduce then import_package notation as you mentioned before.

ronaldtse commented 4 years ago

Ok, got you, lets introduce then import_package notation as you mentioned before.

I wonder if we should use just import instead of import_package? Maybe there are no other things we can import?

File inclusion could use include while package import can be import?

w00lf commented 4 years ago

Ok, got you, lets introduce then import_package notation as you mentioned before.

I wonder if we should use just import instead of import_package? Maybe there are no other things we can import?

File inclusion could use include while package import can be import?

As I mention in #12 i think we need to use hashbang or any other symbols for file imports, that way we don't need to remember difference

ronaldtse commented 4 years ago

Maybe we need to differentiate between model keywords and processing keywords, but until we have to, let's omit that difference for simplicity?