Book a Demo

Author Topic: Class in model and design  (Read 5544 times)

lex_cz

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Class in model and design
« on: July 03, 2005, 02:54:57 pm »
Hi,
I want to model my project independently on language. So in class model I use Language: <none>. Lets say I have a language independent class: CTimestamp

Now I want to make a Java implementation of this class.
I created a new package: PROJECT_JAVA where I generated new class CJTimestamp with the same attributes and methods as in CTimestamp (but Language is set to: Java). Now I can generate the .java implementation, etc.

Is this whole idea of language independence a good idea or isit completely wrong ? Should the CTimestamp class contain all attributes and methods or should it be only "described" in the model ? Any better ideas ?

Thanks for help
Martin

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class in model and design
« Reply #1 on: July 03, 2005, 07:58:55 pm »
The ideal way to do this from an MDA perspective is to use transformations.  EA provides a few, but you could write others.

This way you would describe your model in a platform independant way once.  Then transform it to Java.  When making changes always make them to the platform independant model and EA will synchronise the changes into your platform specific model.

Simon

lex_cz

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Class in model and design
« Reply #2 on: July 04, 2005, 10:50:16 am »
Hi Simon,
thanks for the answer. Yes I was thinking about MDA transformations, but this is "advanced" level for me. As a beginner I need something less complicated (where probably more hand UMLing will be needed).

So, principially is it a good idea what I did or am I completely wrong :) ?

Thanks for help, Martin

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Class in model and design
« Reply #3 on: July 04, 2005, 03:08:11 pm »
Well, I would say that what you are doing is reasonable.  (Even if a lot of work)  As far as I can see you are essentially doing a transformation by hand.

I would certainly include everything in both models.  If you don't do that then the Java model is incomplete and can't really be used for anything without looking up the original model.

Simon