MDrivenText
No edit summary
No edit summary
Line 1: Line 1:
Proposed new ViewModel data textual representation.
This is the proposed new ViewModel data textual representation.


Goals: Text based modeling, more to-the-point, less bloated, easier to write format than json (specially true if you consider attribute values that in turn are strings that may have special chars like ',",{ etc )
'''Goals:''' Text based modeling, more to-the-point, less bloated, easier-to-write format than json (especially true if you consider attribute values that in turn are strings that may have special chars like ',",{ etc)


====== How does the format look: ======
====== How the Format looks: ======
  viewmodel ValueOfFirstColumn{   
  viewmodel ValueOfFirstColumn{   
   column NameOfAColumn{ValueOfThatColumn}   
   column NameOfAColumn{ValueOfThatColumn}   
Line 24: Line 24:
  }   
  }   


An Example if the ViewModel is named "class", has a nesting "attribute" and another nesting "role"
An Example of when the ViewModel is named "class", has a nesting "attribute" and another nesting "role."
  class Thing{   
  class Thing{   
   SuperClass{SomeSuper}   
   SuperClass{SomeSuper}   
Line 38: Line 38:
  }
  }


====== Definition of format ======
====== Definition of the Format ======
classifier+space+Key{ ===content===}
classifier+space+Key{ ===content===}


The ===content=== is defined as:  [classifier+space+]Key{===content===}  
The ===content=== is defined as:  [classifier+space+]Key{===content===}  


Every key must be unique in its list
Every key must be unique in its list.


Format treat multi or single relation the same - and to a certain extent even attributes
Format treat multi or single relation the same - and to a certain extent even attributes.


<nowiki>A list property can be set in 2 ways; classifier+space+key{} repeated with unique keys , or nameoflist{key1{} key2{} key3{}} (explicit form)</nowiki>
<nowiki>A list property can be set in 2 ways; classifier+space+key{} repeated with unique keys , or nameoflist{key1{} key2{} key3{}} (explicit form)</nowiki>


Why have classifiers and not always use explicit form : easier on the eye to read - resembles c#.
Why have classifiers and not always use the explicit form: easier on the eye to read - resembles c#.


What are classifiers : The definition of the target structure is a ViewModel, ViewModelName and NestingNames corresponds to classifiers.
What are classifiers: The definition of the target structure is a ViewModel, ViewModelName and NestingNames corresponds to classifiers.


====== How does the format differ from json? ======
====== How does the format differ from json? ======
* - json has "" on identifiers MDrivenText does not
* json has "" on identifiers MDrivenText does not.


* - json make heavy use of comma as seperator - MDrivenText does not
* json makes heavy use of commas as seperators - MDrivenText does not.
* - json handles arrays differently than properties with [ enclosures, MDrivenText derives this knowledge from context
* json handles arrays differently than properties with [ enclosures; MDrivenText derives this knowledge from context.
* - MDrivenText has special meaning ViewModel/Nesting classifier separate from other properties
* MDrivenText has special meaning ViewModel/Nesting classifier separate from other properties.
* - json must handle mulltilinks as arrays - MDrivenText collects keys based in Nesting classifier to build lists
* json must handle mulltilinks as arrays whereas MDrivenText collects keys based in Nesting classifier to build lists.
* - MDrivenText only has three language fixed elements the {}, space and double quot - the first build structure - the second separates definitions - the third is standard string enclosure. All other characters are part of content
* MDrivenText only has three language fixed elements: the {}, space and double quot - the first build structure - the second separates definitions - the third is standard string enclosure. All other characters are part of the content.


====== What are the use-cases? ======
====== What are the use-cases? ======
Initially it will be used in MDrivenDesigner to provide textbased editing of classes, statemachines, viewmodels and actions. This in turn will be the initial format when experimenting with other ways (than MDrivenDesigner) to change the model
Initially, it will be used in MDrivenDesigner to provide textbased editing of classes, statemachines, viewmodels and actions. This in turn will be the initial format when experimenting with other ways (than MDrivenDesigner) to change the model.


How will the format be implemented - is this a new transformation?  
How will the format be implemented - is this a new transformation?  


We will use TajSon functionality and route all logic through the TajSon Mechanisms
We will use TajSon functionality and route all logic through the TajSon Mechanisms.


Plans are to allow for a generic editable textual representation of any viewmodel.
Plans are to allow for a generic editable textual representation of any viewmodel.
[[Category:MDrivenStart]]
[[Category:MDrivenStart]]

Revision as of 11:16, 10 January 2023

This is the proposed new ViewModel data textual representation.

Goals: Text based modeling, more to-the-point, less bloated, easier-to-write format than json (especially true if you consider attribute values that in turn are strings that may have special chars like ',",{ etc)

How the Format looks:
viewmodel ValueOfFirstColumn{  
  column NameOfAColumn{ValueOfThatColumn}  
  column NameOfAColumn1{ValueOfThatColumn}  
  column NameOfAColumn2{ValueOfThatColumn}  
  column NameOfAColumn3{ValueOfThatColumn}  
  nesting ValueOfFirstColumnOfNestedObject{    
    column NameOfAColumn{ValueOfThatColumn}  
    column NameOfAColumn1{ValueOfThatColumn}  
    column NameOfAColumn2{ValueOfThatColumn}  
    column NameOfAColumn3{ValueOfThatColumn}  
    }  
    
  nesting ValueOfFirstColumnOfNestedObject{    
    column NameOfAColumn{ValueOfThatColumn}  
    column NameOfAColumn1{ValueOfThatColumn}  
    column NameOfAColumn2{ValueOfThatColumn}  
    column NameOfAColumn3{ValueOfThatColumn}  
    }  
}  

An Example of when the ViewModel is named "class", has a nesting "attribute" and another nesting "role."

class Thing{  
  SuperClass{SomeSuper}  
  attribute Attribute1{    Type{string}  }  
  role Detail2{  
    Cardinality{0..*}    
    TargetType{Detail}      
    BackName{Thing2}
    BackCardinality{0..1}
    Aggregation{composite}
    IsNavigable{true}
    RoleClass{TheRoleClass}  } 
}
Definition of the Format

classifier+space+Key{ ===content===}

The ===content=== is defined as: [classifier+space+]Key{===content===}

Every key must be unique in its list.

Format treat multi or single relation the same - and to a certain extent even attributes.

A list property can be set in 2 ways; classifier+space+key{} repeated with unique keys , or nameoflist{key1{} key2{} key3{}} (explicit form)

Why have classifiers and not always use the explicit form: easier on the eye to read - resembles c#.

What are classifiers: The definition of the target structure is a ViewModel, ViewModelName and NestingNames corresponds to classifiers.

How does the format differ from json?
  • json has "" on identifiers MDrivenText does not.
  • json makes heavy use of commas as seperators - MDrivenText does not.
  • json handles arrays differently than properties with [ enclosures; MDrivenText derives this knowledge from context.
  • MDrivenText has special meaning ViewModel/Nesting classifier separate from other properties.
  • json must handle mulltilinks as arrays whereas MDrivenText collects keys based in Nesting classifier to build lists.
  • MDrivenText only has three language fixed elements: the {}, space and double quot - the first build structure - the second separates definitions - the third is standard string enclosure. All other characters are part of the content.
What are the use-cases?

Initially, it will be used in MDrivenDesigner to provide textbased editing of classes, statemachines, viewmodels and actions. This in turn will be the initial format when experimenting with other ways (than MDrivenDesigner) to change the model.

How will the format be implemented - is this a new transformation?

We will use TajSon functionality and route all logic through the TajSon Mechanisms.

Plans are to allow for a generic editable textual representation of any viewmodel.

This page was edited 47 days ago on 03/26/2024. What links here