Hi guys, tonight, I thought about how a Spring metamodel should look like so that we can get from UML to code in three transformations:
1) UML to Spring 2) Spring to 3GL 3) 3GL to Java text Looking at the current metafacades, I wanted to divide the code into three categories: Cat#1) PIM processing code Cat#2) PSM processing code Cat#3) pure helper methods for templates These three categories would then have to be redesigned into: 1) A model-to-model transformation script: UML to Spring 2) A model-to-model transformation script: Spring to 3GL 3) PSM metafacades, written in Java as usual I found good examples for each of them, e.g.: 1) SpringServiceLogic.getOperations() collects operations from the <<Service>> class and from abstract superclasses of it. This is already a pure M2M transformation. 2) SpringDependencyLogicImpl.handleGetTransformationConstantValue() calculates an integer constant to be used to index transformations from entities to value objects (note the different meaning of the word "transformation" here). 3) SpringServiceLogic.getRemoteURL() builds a String representation from various settings that come from tagged values. So, how about this migration path from the current Spring metafacades to a Spring metamodel (note: this applies to the Spring cartridge alone, for bpm4struts, I suggest a totally different approach!): a) I design one metaclass for each existing metafacade, plus additional metaclasses like "Dao" and "ValueObjectTransformation". b) For each metafacade operation, I look at its category: Cat#1 and Cat#2 methods have to be rewritten in ATL. Cat#3 methods have to be moved to new PSM metafacades created in step c). c) For each one of the PSM metaclasses, I design one or more metafacades that still support the templates. All Cat#3 methods of the original metafacades will be moved into these new metafacades and will be simplified. All this should start with a very basic metamodel. As a proof of concept, I'll deliberately ignore all complexity and will try to model basic Services, Entities and their DAOs with only create, update and remove methods, no queries and value object transformations, yet. What do you think? Cheers, Matthias P.S.: BTW, I found a strange thing in SpringServiceLogicImpl.java: protected java.lang.String handleGetBeanName() { return this.getBeanName(false); } Doesn't that cause an endless loop with a stack overflow? P.P.S: What worries me is the question: How do I access namespace properties from inside an ATL script? --- Matthias Bohlen "Consulting that helps project teams to succeed..." Internet: http://www.mbohlen.de/ [EMAIL PROTECTED] Phone: +49 (170) 772 8545 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf