Book a Demo

Author Topic: MDA- Which Language type to use for PIM  (Read 7858 times)

casper

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
MDA- Which Language type to use for PIM
« on: October 27, 2005, 01:04:26 am »
I hope I'm asking the right question. I like to know in which language type I should write my PIM (Platform Indipendent Model). Since there's something like a common type in the Language Datatype editor, my idea was that I should write my PIM in the common type.

But unfortunaly I only can select the datatypes to a class. So I'm left with two options;

1) Use a platform specific Language (C#, Java, etc) for my PIM
2) Make a datatype of the common type version.

p.s I also checked if the OMG specified something like a platform indipendent language.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDA- Which Language type to use for PIM
« Reply #1 on: October 27, 2005, 01:34:36 am »
I've created my own language type called "Conceptual"  for this purpose.

The EA help tells you how to do it.

if you use a PSM language, you implicitly bind the PIM to the concepts of the implementation language.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

casper

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: MDA- Which Language type to use for PIM
« Reply #2 on: October 27, 2005, 02:18:46 am »
Okey maybe I'll do that as well.
I was wondering: can I add one or more datatypes with the same Common Type? If so which one will be used when converting?

For example;






C#CommonTypenHibernate
intIntegerInt16
''IntegerInt32
''IntegerInt64

thomaskilian

  • Guest
Re: MDA- Which Language type to use for PIM
« Reply #3 on: October 27, 2005, 02:22:42 am »
You either have to make context dependent decisions oryou make the changes manually (by design). In the PIM you work abstract (integer, string) and when you concrete your model you have to think about physical representation (int16/32,etc.).

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: MDA- Which Language type to use for PIM
« Reply #4 on: October 27, 2005, 03:44:52 am »
If you also add the range of valid (including "invalid" !) values to your PIM data, that helps to distance yourself from making too early a decision.

Some languages (now mostly historical) allowed you to specify the range of values in the declaration, so you never made the mapping to machine types yourself. **

(This is an area where C's "platform independence" is in conflict with its concept of being a "high-level assembly language".)

PS. that feature ** would be a nice enhancement to code gen templates ...
« Last Edit: October 27, 2005, 05:08:31 am by mikewhit »

casper

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: MDA- Which Language type to use for PIM
« Reply #5 on: October 27, 2005, 05:21:31 am »
Okey still I'm left with the question; Is there a way to change how EA chooses which type to use while converting. Because nHibernate has different Integer values (int16, int32 and int64)  and there's only one Integer Common type. So I end up with all the Integer values from my PIM being converted to int16 in my nHibernate PSM.
It seems that EA just choose the first one found.

thomaskilian

  • Guest
Re: MDA- Which Language type to use for PIM
« Reply #6 on: October 27, 2005, 11:37:16 am »
Quote
...
Some languages (now mostly historical) allowed you to specify the range of values in the declaration, so you never made the mapping to machine types yourself...

You're talking of lovely Lady Lovelace, aren't you?

thomaskilian

  • Guest
Re: MDA- Which Language type to use for PIM
« Reply #7 on: October 27, 2005, 11:39:42 am »
Quote
...

As I said: going from Independent to Specific platform forces you to think about physical reprensentation. Only you can decide what int-type to take. The machine can't do that for you.