Burton Group on MDSD
The
Burton Group says that
"the use of domain-specific languages and custom meta-models is the greatest aid to productivity and making model-driven development a viable practice."Good to hear ... :-)
You can get the full report from Burton Group, it's called "Model-Driven Development: Rethinking the Development Process", and it's by Chris Haddad.
Handling Cross-Cutting Concerns in Model-Driven Software Development
A year ago I published a patterns paper on how to effectively handle Cross-Cutting Concerns in the context of MDSD. Meanwhile I have given tutorials based on this paper at OOPSLA 05 and ECMDA 05, and I will give one at AOSD 06. The paper has also been workshopped at the EuroPLoP 2005 patterns conference.
Based on the feedback I received from my talks as well as from the EuroPLoP writers workshop I have updated the paper a bit. I am using this as an excuse to "advertise" it once again. So if you're interested in that topic, go to voelter.de and
download the patterns paper.
openArchitectureWare File Releases
At Sourceforge, we have released a couple of new files for openArchitectureWare. This includes the pre-Alpha release of oAW4, some documentation for oAW 4 as well as a bugfix release for the 3.x Example Workspace (version 3.1 is now current).
Please find the downloads at
http://sourceforge.net/project/showfiles.php?group_id=88344
Languages, Models, Factories - Slides Available
At the
OOP 2006 conference I will present a talk entitled
Languages, Models, Factories - How it all fits together. It focuses on explaining commonalities and differences between Model-Driven Software Development (MDSD), Model-Driven Architecture (MDA), Executable UML (xUML), Architecture-Centric MDSD (AC-MDSD), Generative Programming (GP), Software Factories (SoFa), Model-Integrated Computing (MIC), Language-Oriented Programming (LOP),
and Domain-Specific Modelling (DSM).
The slides are now available at
voelter.de. And sorry for the 6 MB size - but because of the screenshots I cannot get it smaller.
And by the way: the slides are still in draft. I'd appreciate any feedback.
SOA and Components
Seems like finally they got it. Read the following statement that is taken from
IBM Developer Works. The page describes an initiative by IBM, BEA and the usual other suspects to build what they call a Service Component Architecture (SCA):
SCA encourages an SOA organization of business application code based on components that implement business logic, which offer their capabilities through service-oriented interfaces and which consume functions offered by other components through service-oriented interfaces, called service references. SCA divides up the steps in building a service-oriented application into two major parts:
The implementation of components which provide services and consume other services
The assembly of sets of components to build business applications, through the wiring of service references to services.
SCA emphasizes the decoupling of service implementation and of service assembly from the details of infrastructure capabilities and from the details of the access methods used to invoke services. SCA components operate at a business level and use a minimum of middleware APIs.This initiative writes down a couple of important concepts. SOA and CBD are basically the same thing; it depends on the viewpoint whether you put a service or a component into the "middle of the universe". Component implementations should be independent of the middleware technology. Specifically, that means that you can run the same components in the context of different middlewares (e.g. J2EE for production, Spring for testing). And finally, communication in SOAs is not restricted to web services.
Why do I make this a Blog post? Mainly because I have been talking about this view of the (SOA) world for a long time and I am really happy that this seems to catch on in the "industry" now. For example, if you look at my
talk about Component Based Development that I gave at the 2005 edition of ICALEPCS you can see this approach all through the slides.
If you combine the SCA approach with MDSD this can get you quite far, as outlined in the presentation I linked to above. I have defined a set of typical metamodels that you can use as a starting point for this kind of architecture.
You start by defining component types and their dependencies as well as data types (not shown). After drawing that diagram and generating the necessary skeleton component implementations, you can start implementing them.
Then you go on by defining collaborations of component instances; they play together to achieve some goal. No mapping to a specific technology, yet, just logical component instances playing together.
Finally, you can go on by deploying these collaborations to certain technical platforms. Based on these three models (plus some technology-specific information that you should incorporate by model-weaving), you can generate all the necessary code to put the component implementations into the infrastructure defined in the deployment model.
In order to allow for multiple compositions of the same component types, and also of several different (technology-)deployments, you must make sure that the dependencies are directed correctly:
So. I think SCA points in the right direction. Combine it with MDSD, and you are on a really good way. We have been using this approach in various projects, and a big international mobile phone company (my current customer) buils their SOA architecture around these concepts.
A final word: Microsoft's WCF (aka Indigo) looks very much the same ... one could get the impression they copied from there (rather than from my slides :-))
Meta Matters!
What do all (ok, most) of today's hypes -- MDSD, Ruby (on rails) -- have in common? Meta! I think that having access to the meta level gives you that extra bit of power you need for efficiently developing applications.
So, what does meta mean? Meta is greek and basically means "about". So, if you have a metamodel, then you have a "model about a model", i.e. a model describing the model at hand. If you've got a meta program than you have a program that knows something "about" the program you talk about.
So let's try to put some systematics into "meta". I think there are three dimensions that you have to define when talking about meta:
- When do you have access to the meta level? Is is before the program runs (as in code generation), during compilation (compile-time meta-object protocols) while the program loads (bytecode rewriting) or during the program's execution (reflection and runtime meta-object protocols)?
- What can you reflect about? Is it a program (as in reflection in Smalltalk, CLOS or Ruby) or is it more abstract models (as in MDSD)?
- And then finally, what you can actually do with this meta information? Can you only read it (as in Java's reflection), can you actually modify the structures you reflect upon (as in Ruby or in an MDSD generator), or can you reify the meaning of what you see (as in CLOS' meta-object protocols)?
There are certain especially useful combinations of these dimensions:
- In dynamic, reflective languages such as CLOS or Ruby you reflect on program structures. It happens while the program runs! So, while running a program you can reason about and also change the structures of the running program. Sometimes you can even change the semantics by changing the interpreter at runtime (e.g. in CLOS). Note that for write access to the program you need some kind of interpreted system - since you want to change program structures at runtime.
- In MDSD, you typically reflect on models using the metamodel (and maybe the metametamodel). Reflection happen before the program described by the model runs. You can read and write the model. Note that, technically, the generator is a model interpreter that can change the model during its own execution.
An especially nice trick is the following: If you use a language without reflection capabilities (i.e. without access to the meta layer) such as C or C++, and if you generate the respective program using a code generator, you can use the code generator to build your own meta layer into the program - enabling reflection, at least read-only, during runtime. This works since the generator has the meta information available (it's an interpreter...) and can put it into the generated program structures.
So? Where does this take us? Maybe it shows that the two approaches (MDSD and the new, dynamic languages) are not that far apart. And it also shows what is really the essence of the two approaches. However, all of that is not new. CLOS, for example, has had all that a long time ago. Why didn't it catch on? The reason is that this meta stuff isn't always trivial to understand and use... let's see how it catches on this time.
PLOPD5 Update
As you might know, I am number three editor for the forthcoming 5th edition of Pattern Languages of Program Design, a book series hosted by Addison-Wesley containing a collection of
Best Of patterns papers from a number of *PLoP conferences around the world (the other two editors are Dragos Manolescu and James Noble).
The work on this 5th edition has been dragging on for a while, but we now received word from Addison Wesley that the bound books should be available on April 7, 2006.
The mail we received also said the following: "Please note that some of these dates may change"
;-)
CodeBlo{g|ck}: EMF
This post explains how to use Eclipse EMF dynamically. We start out be defining a metamodel (
MetaModelCreationTest.java. Then we use EMF's code generator to create the metamodel implementation classes and create a metamodel instance (
ModelCreationTest.java). Finally, we use EMF's reflective API to build the same model without using the generated metaclasses (
DynamicModelCreationTest.java).
openArchitectureWare 4 Progress
The new version of openArchitectureWare is getting along nicely. The EMF examples already work. The adaptation layer for oAW 3 projects is also almost finished, only the template editor cannot yet cope correctly with the oAW-Metaclass convention (missing "get" in getters and such). The Wombat and Expand languages have had their underlying infrastructure as well as the expression language standardized. The Recipe Framework also progresses (almost) as planned; so we will have a reasonable number of checks when we release, at least for the Java world (and of course this can be extended for other languages).
We will also get another interesting contribution. And that is a generic model explorer/editor. Using this Eclipse plugin, you can browse, search and modify and oAW model, classic or EMF. In later revisions, you'll also be able to customize the UI for this browser, based on Eclipse Forms.
Also, we will provide a reasonable amount of documentation by the end of January 2006 (which is our de-facto release date for version 4, final). The milestone one on Dec. 15 will probably be met.
News on the book on Model-Driven Software Development
As you might know, we are currently working on the english translation of the
german book on Model-Driven Software Development. We will actually rework several parts, including a discussion of Software Factories, a new Case Study exemplifying cascaded MDSD, some more stuff on MDSD and Component-Based Development, and a section on MDSD and SOA.
What will become especially interesting is the section on Model-to-Model Transformations. We had asked
Simon Helsen to write a small section on QVT. What he delivered was a 27 page discussion of QVT including an extensive example. While this is of course not a complete tutorial for QVT, it is certainly a good introduction and will be a highlight of the english version of the book.
By the way, Wiley and
Amazon says it will be released by May 2006 :-)
Some Thoughts on SOA (and MDSD)
Service-Oriented Architecture, or SOA, is another one of these highly hyped topics in today's IT world. There is no commonly agreed-upon definition of that SOA actually means. Some people equal SOA to "using web services". From our perspective, SOA has nothing to do with certain technologies (WSDL, SOAP, HTTP), but rather constitutes a set of architectural best practices for building large, scalable and composable systems. A well-done component-based architecture with well-defined interfaces and clearly cut component responsibilities can quite justifiable be considered SOA. However, when looking at SOA a bit more closer, one can identify a number of important properties that cannot readily be found in (most) component-based systems:
Service interactions are message-oriented, or document centric. Instead of defining rigidly typed interfaces, document structures (schemas) are defined that serve as the basis for interactions. Done right, this can make evolution of message structures and versioning much simpler.
The interaction patterns, i.e. valid sequences of messages are explicitly defined. Interactions are often conversational, i.e. conversational session state is kept "at both sides" of a service
interaction. These features are the basis for orchestration among services. Usually, interactions are asynchronous, resulting in loosely coupled systems.
Quality of service aspects are explictly addressed. Service providers do not just provide a certain services' functionality, they provide the functionality with a define service level (performance, reliability, etc.).
Service descriptions and characteristics are available at runtime. Using service registries systems can be assembled dynamically.
Often, services are interoperable - they can be used by systems implemented on various platforms.
In addition to these characteristics, services should be designed to be coarse grained and encapsulate functionality relevant from "business perspective" (although nobody can say what this really means). Services are typically (but by no means exclusively) used by explicitly modelled business processes. Finally, like any good IT system, they are secure, transactional and manageable.
Opinions differ whether these characteristics are really so much different from today's well-done enterprise systems. However, what in our view is obvious is that models play a central role in the definition and operation of service-oriented systems.
Message schemas are data structure models that specify required and optional content as well as how message formats change along the evolution of a service.
interaction patterns between services are defined using models; e.g. communicating state machines are useful notations to describe valied sequences of messages as well as exceptional cases.
the levels of quality provided by a service provider (and required by a service consumer) are basically models that are evaluated and checked for compatiblity
The runtime repository basically makes the model information available to runtime queries
And finally, interoperability can be achieved by generating implementations and bindings for various platforms from the same authoritative model.
So the central idea to SOA in our view is: contract first! So the first thing you specify when developing systems is how the communication partners actually interact - and that is independent of ommunication technology and independent implementation platform; rather you specify message formats, interaction patterns and quality of service contracts on an abstract and formal level.
A final word. In the context of SOA you can often see these two pictures where you have this spaghetti-like system with all those interconnections labelled "old" on the one hand side, and a nicely ordered set of components connected through a single bus to which all components are attached labelled "service-oriented" on the other side. This leads people to think that in SOA, all systems must be physically connected through a single technical infrastructure (often web services). Nothing could be more wrong! If you connect all kinds of systems through the same infrastructure you will have a hard time addressing the different non-technical requirements such as throughput, interoperability or performance. The bus you often see on those powerpoint slides must be interpreted as a "logical bus" - i.e. a common, model-based communications infrastructure, where messages can be mapped to various communication technologies and service endpoint be implemented on various platforms