Author Topic: Uml to typescript  (Read 1030 times)

PiotrS24

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Uml to typescript
« on: August 30, 2018, 02:01:36 am »
Hello,

I'm thinking about writting a diagram converter for typescript.
I know there is documentation in this area.
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/software_engineering/grammar_editor_for_imported_co.html
and
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/software_engineering/codetemplates_2.html
how difficult it is to do, looking at the documentation I have the impression that it is 2-3 months of work of one person
I found entries from 2016 that Sparx does not want to write such a generator. Has anything changed in this area?
Have You better example and better documentation for MDA ?
Kiedyś poświęciłem dniówkę aby coś poprawić ale rezultat był słaby

How do you propose to go about it and how long will it take?

regards
Piotr

qwerty

  • EA Guru
  • *****
  • Posts: 10284
  • Karma: +222/-177
  • I'm no guru at all
    • View Profile
Re: Uml to typescript
« Reply #1 on: August 30, 2018, 06:11:51 am »
Not sure about that area, but from my impression you should think about scripting (use the API with your favorite programming language) to achieve your goal.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6670
  • Karma: +63/-6
    • View Profile
Re: Uml to typescript
« Reply #2 on: August 30, 2018, 10:10:39 am »
I don't know much about typescript, but usually the time is more in learning how to use the grammar and code templates.

Generally I'd estimate 1-2 days for 90%+ coverage in code templates. For a grammar I'd say 1-2 weeks for 90%+ coverage, although that varies a lot more depending on what kind of language documentation exists and how much of the syntax can legally appear at the file/class level vs inside operations only.
Eve

support@sparxsystems.com

PiotrS24

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Uml to typescript
« Reply #3 on: August 30, 2018, 04:12:36 pm »
Hi, thanks for answer,

TypeScript was made by microsoft.
The idea was to make a language similar to C # so that c # programmers would have an easier time with the transition. What is the fact :)
How would you look at this:
https://github.com/rbuckton/grammarkdown/blob/master/spec/typescript.grammar
could such a code be a good starting point?

I know TypeScript at 50%, I have coded for a year but I also do design models in EA and I miss the visualization of larger applications and the ordering and verification of code.
EA gives me an overview of the c # project and it works. it would also be good to have one at EA.
Unfortunately, I did not find any case that would do it, which is why I became interested in MDA

Summarizing:
I already know the estimated time, thanks
Could you write what would have to be done to have such a list in points - it would be easier for me

Maybe it would make sense to use this:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.typescript-javascript-grammar
this is a plugin written by MS and used by the code editors to verify the TypeScirpt syntax

Thank you very much ...

PiotrS24

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Uml to typescript
« Reply #4 on: August 30, 2018, 04:28:50 pm »
small second request

could you send me a grammar to C # (if possible), TypeScript is similar,
I looked at the example which is in the EA - SSL.nbnf directory and this is a good starting point. However, I know c # and by analogy it would be easier for me to do TypScript grammar

PiotrS24

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Uml to typescript
« Reply #5 on: April 03, 2019, 06:16:22 pm »
Hi

is it possibile to get some sample (working gramar to any language, C# is the best for me) ????

I think, I Will start these work on 1-2 month

regards Piotr

qwerty

  • EA Guru
  • *****
  • Posts: 10284
  • Karma: +222/-177
  • I'm no guru at all
    • View Profile
Re: Uml to typescript
« Reply #6 on: April 03, 2019, 09:47:30 pm »
I think only a few languages can be successfully parsed by a (context free) EBNF. Pretty sure EA's parser will get hick-ups when adding context sensitivity. And all languages with pre-processors will finally kill any attempt to parse them since you can put in context from compile time. This will simply (depending on the code) result in just different models. IIRC C# falls in all those bad categories.

q.