Author Topic: How to share a class  (Read 3270 times)

Miroslav Fris

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • That's me!
    • View Profile
How to share a class
« on: November 23, 2002, 12:14:57 am »
 ::)
Please, can anyone explain me, how to share a class or class interface in a different model. The example, what I mean follows:

One EAP is model of a COM component, which has a interface/s.

Two completely different projects modelled in two EAP files want to see and use the interface of that COM component.

The interface of the COM is not final is beeing developed together with those projects using the component.

I can probably import the class of the COM to the projects (haven't tried yet), but what about sharing ??

Please what is your practice ??

Thank you very much.

Jumbik

  • Guest
Re: How to share a class
« Reply #1 on: November 25, 2002, 11:00:58 pm »
Hi mfris,

your question about "shared interface" is more general and principal. When you make a one model from another model, it creates dependency between "pieces of solutions" with only one direction from "using" to "used", where one is "client", second is "source".  It is the same, as relation between components in SW, but here, in models, it is on more abstract level. In another words, if you make a replication from one model to another model or distribution  by XML, you make the same process, as in component technology (for instance in "your COM") "compiling components, adding reference, linking components". You make not anything as "shared global interface in COM". See the process of distribution or replication only as technique how to link models as physical pieces of solutions from source to client. Answer to your question is: Make replications between models with this view on it (models are compound from components of models, replication is linking). If you are developing the source, you must recompile it = "re-replicate" it...

Jumbik.  

Miroslav Fris

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • That's me!
    • View Profile
Re: How to share a class
« Reply #2 on: November 26, 2002, 09:57:48 am »
Yes, I understand. Thank you very much for your hints.

Mirek

Jumbik

  • Guest
Re: How to share a class
« Reply #3 on: December 05, 2002, 03:15:57 pm »
Hi mfris,

see also topic ‘Controlled Packages’ in EA Help. I think it is very powerful, namely with cooperation with some version tool (CVS or VSS). I have tried it and played with it now, it is really very suitable for distributed component application ( 8)  ). Models will be distributed to separate XML packages in ‘libraries’.

Steps are similar as in component technology:

In source model make Controlled Package (by Configure),
Develop and Save it,
Put saved file into version tool (CVS or VSS)

In another model using the Package from source model:

Get file from CVS or VSS
Import as XML to model
Use elements from it…

You can also set importing XML file to ‘read only’, if it is needed (only for use in second model). Advantage of Controlled Package consist in configuration of saving and reloading, for instance in setting stable path name to XML file.

You can use also Export to XML or Import from XML (of Package) for this purpose, but it is not automatic, not once adjusted (with relation to file).

Jumbik.

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: How to share a class
« Reply #4 on: December 05, 2002, 08:20:13 pm »
« Last Edit: December 05, 2002, 08:20:47 pm by jaimeglz »