jQuery in Action, 2nd edition*
The moose likes OO, Patterns, UML and Refactoring and the fly likes MDA? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "MDA?" Watch "MDA?" New topic
Author

MDA?

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

What is MDA all about? :roll:


Groovy
Jim Arlow
Author
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
This is what I say in Enterprise Patterns and MDA:
"The essence of MDA is that the creation of an executable software architecture should be driven by the formulation of models rather than by manually writing source code. Source code is generated from the models by a compilation step much as machine code is generated from source code. The MDA initiative aims to move software development to a higher level of abstraction."
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

Jim,
Thanks.
Do you think that MDA has a bright future?
Richard Quist
Ranch Hand

Joined: Feb 18, 2004
Posts: 96
Originally posted by Jim Arlow:
The MDA initiative aims to move software development to a higher level of abstraction."

Jim,
Can you comment on the state of the tools? Are they sufficiently robust to support concrete implementations of their abstract models? (I have this image of some of the early WSYWIG code generators that provided "insert your custom code here" blocks which the tools were supposed to leave untouched when regenerating code....but didn't always deliver on that promise)
Thanks
[ April 20, 2004: Message edited by: Richard Quist ]

Rich
SCJP 1.4
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

Can I use Java for MDA?
Pat Moran
Greenhorn

Joined: Feb 11, 2004
Posts: 20
I have been experimenting recently with Websphere Studio Application Developer (WSAD) for the development of Java MVC (Model-View-Controller) patterned applications based on the Struts Framework. The amount of Struts framework code automatically generated by WSAD for this design pattern is incredible. I am now convinced that MDA code generation is a reality, not just a hope for the future.


pm
Jim Arlow
Author
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
Pradeep,
Most of the MDA tools support generation of Java.
Jim Arlow
Author
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
I think MDA has a bright future. The key thing that has to happen in software development over the next few years is that we need to move to a higher level of abstraction. In other words, we need new ways to specify software systems that are simpler, more effective and more "human friendly" that what we have at the present. This is the only way we will meet the increasing demands of complexity, change and time-to-market. It seems to me that there are only two ways we can ramp up the level of abstraction:
  • More powerful and abstract programming languages
  • Code generation directly from visual representations of software systems
  • In fact, both mechanisms are needed. Visual representations are good for expressing the high level architecture of a system, and can be used to generate large amounts of structural code, whilst programming languages are good for specifying the algorithmic details of system behavior.
    The MDA vision encompasses both perspectives. This is because UML has both visual and non-visual parts. UML has, since version 1.4, provided the semantics for high-level action languages that can be used to specify behavior. A good example of an MDA tool that incorporates an action language is iUML from Kennedy Carter.
    Once UML has an action language it becomes computationally complete. This means that UML models effectively become executable and you no longer need to write source code. Instead you create a UML model adorned with behavior specifications in an action language. This model may then be compiled to a target language such as Java or C#. These languages become the "machine code" for UML models. This approach seems to me to be the best of both worlds - you get to specify architecture visually and algorithms textually in a high-level action language. It is still programming, but at a higher level of abstraction.
    Not all MDA tools have an action language at this point in time. Those that don't require you to write behavior specifications in languages such as Java and C#. Even so, you can still generate about 80% of the code for a J2EE application.
    There are other reasons why MDA seems like a good idea. In particular, the separation of concerns between the PIM and the PSM is incredibly valuable. This enables you to preserve your analysis efforts across different platforms. I discuss the advantages of MDA in more detail in Enterprise Patterns.
    I believe a move to a higher level of abstraction in software development is both desirable and inevitable and MDA seems to be uniquely placed to take us there.
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    I don't think there is a perfect MDA tool on the market yet. Each has its strengths and weaknesses. For example, ArcStyler has flexible model transformation facilities whilst iUML has an action language. There's no double that these tools are very usable and are generating business benefits. I suggest you check out the various vendors sites and try to get demo copies so that you can see if they do what you want.
    Code generation seems to be pretty robust in most MDA tools.
    Nicholas Cheung
    Ranch Hand

    Joined: Nov 07, 2003
    Posts: 4982
    When the specification of a framework is being well-defined, it is always easy for code generation.
    Just like you can generate EJB related interfaces and the bean classes using WSAD together with its deployment code, and your example on Struct framework.
    To me, I feel MDA is quite new, and I think currently, as Jim said, there is no ideal IDEs for generating MDA codes. After the pattern, or model, become popular and well-defined, more and more IDEs will be able to generate corresponding codes.
    Nick


    SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
    Warren Dew
    blacksmith
    Ranch Hand

    Joined: Mar 04, 2004
    Posts: 1332
        
        2
    Originally posted by Jim Arlow:
    This means that UML models effectively become executable and you no longer need to write source code. Instead you create a UML model adorned with behavior specifications in an action language.

    Er, what's the difference between "writing source code" and "creating behavior specification adornments in an action language"?
    Nicholas Cheung
    Ranch Hand

    Joined: Nov 07, 2003
    Posts: 4982

    what's the difference between "writing source code" and "creating behavior specification adornments in an action language"?

    According to my previous experiences from Formal specification, source code is the code that, in a particular programming language, that used to write the system, being compiled into binary codes, and can be executed in target platforms.
    Specification language, such as OBJ3 and FOOPS, however, is used to declare, if the user inputs XXX, then YYY must be the result. They used term rewrite (equations) recursively to *compute* the input to get the result. Although it is executable, it is NOT a programming language, it aims to show the result ONLY. The use of formal method is to avoid ambigious between programmers on a certian UML diagrams.
    For example, 2 different programmers may have different understanding to the same set of UML diagrams. Sometimes, there will be no problems, as the resulting system finally the same under 2 programmers. However, sometimes may not. Thus, IF, the result of the system is same as what the formal method defines (or expected), then we can accept both systems as correct. However, if one of them does not have the same result with formal method, then that one is definitely incorrect.
    I feel action language is doing similar thing. It tries to assure the behaviour of the system, but NOT really a language that used in developing the real system.
    Nick
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    Er, what's the difference between "writing source code" and "creating behavior specification adornments in an action language"?

    The action language can be compiled into source code such as Java or C#. So, if you like, the action language is itself a "source code" although at a higher level of abstraction than what we normally think of as source code. For example, action semantics specify the ability to search for an object of a given type rather than having to traverse a list of objects using an iterator.
    Another difference is that an action language could be a visual language, as long as it conforms to UML action semantics. However, I don't know of anyone working on this.
    From a programming perspective, another significant difference is that the action language code is added directly to UML model elements. For example, a piece of code might be added to a state in a UML state machine. The MDA tool code generator takes this UML representation and formats it into source files etc. as required by the target language.
    Nicholas Cheung
    Ranch Hand

    Joined: Nov 07, 2003
    Posts: 4982
    Hi Jim,

    The action language can be compiled into source code such as Java or C#.

    Does this require special *treatment* on the coding of action language? or only if the action language is valid, it can then be compiled into Java or C#?
    Nick
    Pradeep bhatt
    Ranch Hand

    Joined: Feb 27, 2002
    Posts: 8903

    More powerful and abstract programming languages

    Does this mean we need news programming languages?
    Richard Quist
    Ranch Hand

    Joined: Feb 18, 2004
    Posts: 96
    Originally posted by Jim Arlow:

    From a programming perspective, another significant difference is that the action language code is added directly to UML model elements. For example, a piece of code might be added to a state in a UML state machine. The MDA tool code generator takes this UML representation and formats it into source files etc. as required by the target language.

    Is there a "common" or "standard" action language defined or being worked on?
    To what extent are the models portable between tools? Is there a danger that you would get "locked in" to one vendor's implementation because of proprietary formats, or is there a standard for model representation?
    Thanks
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    Does this mean we need news programming languages?

    I think we always need new, higher level, languages to increase developer productivity.
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    Does this require special *treatment* on the coding of action language? or only if the action language is valid, it can then be compiled into Java or C#?

    It's compilation.
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    Is there a "common" or "standard" action language defined or being worked on?

    There is no common or standard action language, but I think the OMG is starting work on one.
    To what extent are the models portable between tools? Is there a danger that you would get "locked in" to one vendor's implementation because of proprietary formats, or is there a standard for model representation?

    There is a high degree of portability of UML 1.X models between tools. This is because:
  • UML has a metamodel that describes the semantics of the modeling elements
  • XMI (XML Metadata Interchange) is the standard XML format for expressing models. XMI is the standard model representation for import/export. Some tools (such as MagicDraw use XMI as their native file format.


  • However, ambiguities in the UML metamodel means that UML 1.X model interchange might not work 100% accurately depending on the tools involved. Also, different vendors support different subsets of UML. These issues have been addressed explicitly in the UML 2 standard. The UML metamodel is much more precisely defined, XMI has been improved and the standard defines sepcific levels of support.
    So with straight UML, there is not much chance of a "lock-in".
    However, if you are using MDA, your PIM will we transferrable between tools, but your PSM will not. This is because the PSM has to be adorned with platform specific information, and different vendors have different ways of doing this. As well, if you have used an action language (in the PIM or PSM), this action language will not be portable at the moment.
    It's worth understanding the PSM compatibility issues as it highlights the way MDA works. To turn the PIM into the PSM, the MDA tool ususally applies something called a UML profile to the PIM. This is a set of stereotypes (e.g. <<EJB>>), tagged values (extra information added to modeling elements e.g. {type=session}) and constraints (conditions on modeling elements). Each profile defines an extension to standard UML customizing it for a specific purpose, such as modeling an EJB application. UML was designed to be extendible in this way.
    In MDA, the profile defines new types of modeling elements (the stereotypes) with extra slots (the tagged values) where the platform specific information (e.g. whether it is a session or entity bean) can be added. Because there are as yet few standard profiles, and those that exist (such as JSR26 for EJB) are sometimes not well suited to MDA, vendors provide their own solutions. So the code generator in a particular vendors MDA tool will understand that vendors profiles, but not the profiles of other vendors. This is the crux of PSM incompatibility.
    As standard UML profiles are defined, then there should be a much higher degree of compatibility between PSMs.
    So at the moment, you can reasonably expect to move the PIMs between different MDA tools, but not the PSMs.
    Richard Quist
    Ranch Hand

    Joined: Feb 18, 2004
    Posts: 96
    Jim,
    Thanks for the feedback. Sounds like we're in a stage similar to the mid-80's with the C language, and to a lesser extent C++ where vendor-specific implementations made code portability difficult, but not impossible for those who approached the tools with open eyes....
    Hopefully tool-creators and users will recognize the value in standards as the tools mature.
    [ April 21, 2004: Message edited by: Richard Quist ]
    Nicholas Cheung
    Ranch Hand

    Joined: Nov 07, 2003
    Posts: 4982
    Hi Jim,
    So, does action language a specification language, or a skeletion of *real* programming language?
    Are there any specification or standard for action language, like UML?
    Nick
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    Hi Nick,
    So, does action language a specification language, or a skeletion of *real* programming language?

    It's a real language. It has conditions, loops, side-effects etc.
    Are there any specification or standard for action language, like UML?

    UML 2 defines action semantics. This is a metamodel for action languages that defines the semantics of action languages but not their syntax. This allows many action languages (some visual, some not) to be created by vendors. There is a move in the OMG towards a standard action language, but I'm not sure how well this is progressing. Last I heard, talk was of a declarative language a bit like XSL. Personally I find this worrying because few developers are fluent in declarative languages, which can be quite hard to program in. What's interesting about action languages is that because they all share a common metamodel, it should be possible to translate from one to another.
    Kennedy Carter have implemented action semantics in an action language called Action Specification Language. The syntax of this language is open source but Kennedy Carter's specific implementation of that syntax in their MDA tool iUML is proprietary. I would personally like to see ASL or a variant become the standard action language. It is open source, has a proven track record and is easy to learn. However, the OMG is a consortium of vendors each pushing their own products. Adoption of ASL as a standard would give Kennedy Carter a big adavantage so there may be purely political reasons why ASL is not adopted.
    There is another action language implementation in the BridgePoint Development Suite but I know nothing about this as they won't supply me with an evaluation copy.
    Warren Dew
    blacksmith
    Ranch Hand

    Joined: Mar 04, 2004
    Posts: 1332
        
        2
    Originally posted by Jim Arlow:
    Last I heard, talk was of a declarative language a bit like XSL. Personally I find this worrying because few developers are fluent in declarative languages, which can be quite hard to program in.

    I've found that declarative languages are actually easier to program in for the kinds of problems that they are designed for. They are hard to program in for problems that they are unsuited for, which include many of the problems procedural languages are suited for.
    That might make them unsuited for general purpose programming within MDA. I'm not sure, though; certainly the majority of the functions I write in Java are small enough that I don't think a declarative language would be a problem.
    Luis Ernesto
    Greenhorn

    Joined: Apr 22, 2004
    Posts: 9
    excuse the ignorance , but how mda is related to soa? if is there any relation at al, and how are both related to uml :roll:
    Jim Arlow
    Author
    Ranch Hand

    Joined: Mar 11, 2004
    Posts: 38
    excuse the ignorance , but how mda is related to soa? if is there any relation at al, and how are both related to uml

    What's soa?
    UML is a visual modeling language. MDA is a way of building software.
    Pradeep bhatt
    Ranch Hand

    Joined: Feb 27, 2002
    Posts: 8903

    What's soa

    SOA- Service Oriented Architecture
    Ed Schwarz
    Greenhorn

    Joined: Apr 28, 2004
    Posts: 4
    I've found that declarative languages are actually easier to program in for the kinds of problems that they are designed for. They are hard to program in for problems that they are unsuited for, which include many of the problems procedural languages are suited for.

    Full Disclosure First: I work for Gorilla Logic, and we make a declarative executable UML engine.
    I agree with Warren, declarative languages are not the universal hammer that drives all nails. But a declarative approach to domain modeling - capturing a description of the semantics and invariants of a problem domain - can drive (i.e., imply) a surprising amount of process and dynamic behavior.
    In many ways, domain modeling is a much higher level of abstraction than most MDA tools aspire to. Developing applications at this level needs tools which will deduce patterns from requirements descriptions, rather than starting from a collection of (comparatively) low-level technical patterns which don't necessarily assure the completeness or comprehensiveness of the solution.
    That said, a certain amount of process present in most _application_ domains is "arbitrary" - it's not implied by the declarative constraints and invariants of the problem domain, it represents one choice among (potentially) many possibilities which are consistent with them. An actual application has to select and implement one, or the job won't get done! These aspects of the dynamic behavior of an application are probably more easily specified procedurally (using, e.g., action semantics).
    Again, a declarative domain model is valuable in building a long-lived system, because it helps identify which of the behaviors are "arbitrary" and hence more likely to change over time, or across different implementations in the same problem domain.
     
    wood burning stoves
     
    subject: MDA?
     
    Similar Threads
    UML on Star Trek
    Model Driven Architecture
    MDA Vs SOA
    Working with OptimalJ 4.0
    Working around dependencies