Re: [Andromda-user] RE: [Andromda-devel] Prototyping Web ServicesCartridge

2003-08-23 Thread Harald Weyhing




Hi Tony,

Fully agreed. Thank you for this really verbose explanation. 

Cheers 
Harald




Anthony Mowers wrote:

  
  
  
 
  
 
  Harald,
 
   
 
  I have  thought about this PIM (Platform Independent
Model) and PSM (Platform  Specific Model) thing a fair bit now and I have
come to some conclusions that  might provide some help to other people struggling with
these  concepts.  I agree with your definitions of PSM, UML profiles, and
PIM  but I'd like to elaborate some more on my understanding of  things. 
 
   
 
  I  believe it is possible for two people to look
at the same model. One  person to call that model a PIM. The other person call
 it a PSM.  Yet, both these people can still be correct.  Whether  or not
something is a PIM or PSM depends upon the perspective of the  audience. 
I mean this in the same sense that it is possible for a model to  be both
a model and a meta-model dependent upon what level of abstraction that  audience
is expecting to see modelled.
 
   
 
  Consider as an example a UML profile for designing
 distributed applications.  A PIM that conforms to that UML  profile could
be used to generate a J2EE based application or a  .NET based application. Therefore
one might imagine that the same  PIM could be transformed into two completely
different PSMs: one for the J2EE  based application and another for the .NET
based program.  The  J2EE oriented PSM would naturally contain model element
types with  names from the J2EE domain.  The .NET oriented PSM would similarly
 contain model element types with names from the .NET  domain. 
 
   
 
  If we  take this example further we see that is
possible to generate still more  PSMs.  A given .NET oriented PSM could be
used to generate a .NET  application in any of several programming languages:
Java, C#, Visual Basic, or  C++.  Therefore a single .NET based PSM could itself be
 used to generate serveral language dependent PSMs.  The element  type names in
each language dependent PSM would probably have  names from the particular
language domain. Therefore from the  perspective of the problem domain of
generating a java program the .NET oriented  PSM might more aplty be called
a PIM given that it is langague  independent.
 
   
 
  Therefore calling something a PIM or PSM is probably
not a  meanfully statement until one has first defined which level of abstractions
you  are trying to model at.  In other words you have to define what  mean when
you say 'platform independent' and what you mean by  'platform specific'.
 
   
 
  Take as an example my AndroMDA cartridge prototype
for XSD (Xml  Schema Description) generation.  In the case of my prototype
 I want to be able to use essentially the same PIM, with only some  minor
annotations, to generate a database schema, an EJB schema,  and/or a XML
schema. In particular I want to implement the XSD  generation from the PIM. 
Therefore it seems sensible that a PSM for XSD  generation would have model
elements with type names like 'ComplexType',  'SimpleType', 'Element' and
'Attribute'. Then I want to implement a way to  transform that XSD oriented
PSM into XML for the final XSD file  generation.
 
   
 
  Tony
 
     
 
   
 
   -Original Message-
  From:  Harald Weyhing [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 22,  2003 11:22 AM
  To: Anthony Mowers
  Subject: Re:  [Andromda-user] RE: [Andromda-devel] Prototyping Web
Services  Cartridge
  
  
 
  Hi All,

As of my understanding the UML profile is yourspecific extension to the
UML with stereotypes, tagged values and constraintsto the UML model.
You create a UML profile to be as exact as possible whilemodelling the
PIM or the PSM. For example, if you create the<>
Stereotype you might want to say, that this is going tobe persistent.
While your transformation to PSM you will change this to<>
to express that this is a J2EE platform specific UMLmodel, <>
will say, that this is forHibernate.  Now, OMG does not say, that a PSM
is UML, but for thisexample this is irrelevant. While doing the transformation
to EJB or Hibernateyou will take some mechanism that add platform specifc
artifacts to yourModel, the PIM. 

So, if your Model describes all platform specificdetails you need for
generating code to your platform this should be  aPSM. Still, it will
many times be possible to have a PSM that can be used togenerate code
for many other platforms too, but perhaps there are some missingDetails
to fit perfectly. 

I would conclude to say that you have todecide which Details are platform
specific and wich are not. After that youcan try to describe a transformation
from a PIM to the PSM. With this in mindI came to the conclusion that
the car rental example is platform specific forEJB (CMP) and EJB (Hibernate)
but platform independent for EJB. 

Isthere this much space for interpretation or am I missing something?
   

Cheers 
Harald


  

[Andromda-devel] alternative script helper class

2003-08-23 Thread Wouter Zoons




hello,

I have an issue trying to assign a custom ScriptHelper instance
from within my cartridge descriptor, I have something like this: