[EMAIL PROTECTED] wrote:
Would you like to go into more detail on what you're thinking?  Not sure what 
you mean with "inside the java cartridge after a model-to-model transformation 
has taken place in the Spring cartridge".
(end of quote)




It's a bit out of scope here, but I'll try to keep it short:



Pre- and postconditions are nice for methods in all classes, not only in Spring 
services. Today, if we wanted to have them in the Java cartridge, too, then we 
would have to copy the template code that is currently in the Spring cartridge 
and put it once again in the Java cartridge.



How does M2M-T change this picture? Well, the Spring cartridge would not 
contain templates for Java classes any more but would transform the Spring 
service from the UML model into an abstract syntax tree (AST) representation 
that would be interpreted by templates which reside in the Java cartridge. This 
AST would be an instance of the Java metamodel.



The pre- and postconditions would simply be nodes in that AST.



That way, *any* cartridge could emit pre- and postconditions without knowing 
how to produce code for them. This knowledge would be centralized in the Java 
cartridge.



Different example: The AST produced by the Spring cartridge could be passed to 
a C# cartridge which would generate the pre- and postconditions in C#. This 
assumes the existence of an "NSpring" framework, of course. Anybody going to 
write it?  :D 



Cheers...

Matthias
--
Matthias Bohlen

"Consulting that helps project teams to succeed..."



Internet:

   http://www.andromda.com

   [EMAIL PROTECTED]
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2549#2549
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to