Showing posts with label MDA. Show all posts
Showing posts with label MDA. Show all posts

Tuesday, November 25, 2008

Express [posted Nov. 1st 2006 00:27]

Some time back I was discussing MDA principles (with you know who) and it struck me that UML is a great way to express ones thoughts in a structured visual way (being able to communicate a lot in a relatively easy to understand compact manner) but it or rather the tools one has to use to create it are very ineffective/inefficient. I have wondered many times how it can be that modelling tools have only a fraction of the capabilities that modern IDE's have whereas they are used to do the same thing (persist abstract thought in a structured manner). Not only are they used for the same thing they are used by people doing both modelling and coding. MOreover they are written/created by people working on IDE's. Why doesn't anybody creating a modelling tool seem to be bothered by the fact that making models is pretty inefficient. There further is usually very minimal or no support for team modelling, version control, authorisation, merging, configuration management and so on.

Setting my frustration on all these points appart I was mainly p***ed off with the fact that one, in most cases, cannot write UML like you can write code. Not that I love writing code but I can write code a hell of lot faster than I can model the same amount of meaning into UML. Wouldn't it be great if you could just write UML like code. At the moment I think you would have to write your own text to UML/XMI converter to do that or use the OMG standards of which I don't know if there are many implementations (other than producing text rather than using it as a bases) or write XMI directly if you're a real die hard. That would however not even speed up things since XMI is rather verbal. Ron once pointed out that most developers are text oriented rather than picture/figure oriented, suppose that is true for me.

Anyway to take this though a bit further I thought about why not using Java as a language to code ones model in. It is a language that has a meta language definition so why not use the OMG MDA principles to convert it to UML and from there do the [www.omg.org/mda/|MDA] thing. A more dynamic approach with more possibilities could be achieved using a more dynamic language I assumed. This led me to [www.ruby-lang.org/|Ruby] or possibly Groovy (which Ron pointed out to me). The last seemed close to dying at the time and I focussed on Ruby. Not too much later Ruby on Rails began its much famed rise. When I saw the use [http://www.loudthinking.com/|DHH] made of Ruby I was confident that Ruby would be able to deliver what was needed. It actually opened new ideas/possibilities and hopefully would make my life easier.

The idea was to create a framwork that woud support two things.

First it would support code generation based on the principle of enabling domain modelling and defining platform specific artifacts in architectural patterns, a marking model (an idea borrowed from the MDA Workbench) or Aspects. In other words the domain model stays clean and close to the language of the business and as abstract and precise as possible.

Secondly the framework would support prototyping. The importance of prototyping cannot be underestimated I think. In all projects that I have ever worked on I have seen that having something to look at and preferably work with will bring so much more understanding and inspiration to future users of a system than any model that I have ever made. It is with this that Ruby on Rails will hopefully take a lot of work out of my hands. Yes I would like to have frased this "it took a lot of work out of my hands" but I have been busy too much doing client satisfaction.

These two features would give an executable model that would be as abstract as possible and would take as little coding as possible. The executable model would help the definition of the content of the model and at any given time the model could be used to generate code fit for different platforms and architectures. This double cutting sword would possibly be more complex than a static code generation tool, but it would ensure succesfull short cycled iterations. This approach would possibly prevent a lot of hassle with round trip engineering since the code would evolve in the model and the code would hopefully only be generated to enable installing it in the target environment to test it on non functional requirements.

The way things are modelled in the dynamic model is along the lines of RoR (in fact when I first saw the "has_many" style of relationship declaration in RoR it scared me thinking DHH had created everything I thought of already) extending on it to hold more details to enable successfull generation. In fact the extensions or added information (hashes) could be specific for a certain platforms/architecture and not interfere with other target platforms. However, this is probably better addressed with marking model like constructs. The extensions will not interfere with the workings of the RoR framework allowing that to work its magic. Since the platform/architecture of that is set and proven to work the prototyping/dynamic modelling environment is ready to go.

One of the hard bits will be to generate code other than Ruby from the code written in the RoR/dynamic model. To enable this it will probably be necessary to code as much as possible in a generic way not doing any of the Ruby magic since that leaves relatively straight translation into say Java or .Net nearly impossible.

At the moment Groovy seems to be more alive than ever and JRuby is going strong. These are important it seems to me. Not because I think Ruby is not capable of doing a good job but because Java is a much more accepted language and runtime environment which is not something to take lightely in the Enterprise world. It seems to me that having a JVM as a base is more than welcome in getting companies having Enterprise environments to accept concepts like the one described here. Whatever one may think of Enterprise environments I have enough respect for them not to want to be the one standing outside having all the right ideas.

Enough talk/writing for now, time to proof that it can be done. Hopefully, with a little (or lot of) help from a my friends we can show it works soon. Any ideas on a name for the framework are welcome ;-).

YAMT [posted Oct. 31st 2006 22:48]

If two MDA tools are not enough Ron found another yet another mda tool out there called Acceleo. On the site it is described as: " Acceleo is the most powerful code generator tool of its generation. It has been designed to improve software development productivity." and it continues to explain: "Based on the Eclipse and EMF standards, Acceleo brings to everyone the MDA approach applied to development industrialization."

It is an open source MDA tool of which the creators sell a Pro verison that has extra features, prefab domain specific modeling and generation templates.

Acceleo was created by Obeo a small French company. It is a very practicle/pragmatic tool based on eclipse which makes clever use of all the editor facilities to facilitate the user in relatively easily making genration templates and generating code from UML(2) models.

Wikipedia has the following on Acceleo, I'm afraid it was written by the people who made it though.

It can be found on the Eclipse plugins site. They have further turned it into a project on the ObjectWeb.

My colleague Pascal has spent some time of late to get Acceleo to generate .Net code based on an architecture derived form the Domain Driven Design book using NHibernate as a OR mapping/persistency framework. Hopefully Pascal will share some of his experiences here soon.

Today Ron, Pascal and I had a conference call with one of the CEO's/creators of Obeo/Acceleo. He demoed the new Pro version and we were very impressed by the features that holds over the open source version. Traceablility from model to code is a big feature and very well executed.

If you are looking for an MDA tool to quickly help you on your way and well enough set up to very probably be around and usefull in the years to come you should definately check out Acceleo.

MDA tools [posted Oct. 31st 2006 21:34]

So what happened over the last year, well a lot, and very little came out of my hands except the projects that I worked on for clients. Not the most interesting stuff.

However, my neighbour in the mean time came up with two MDA tools. The first, called MDA Workbench eventually made it into the open source world. You can find it at SourceForge.net. It is described as "Capgemini's MDA Workbench is a powerful, simple MDA tool implemented as an Eclipse plug-in. The MDA Workbench allows for creating (UML) model-to-code mappings, markings and lifecycle management from model to code. Proven in very large and small projects.

As if that was not enough Ron went on and created AmplifyMDA. This MDA tool has the tagline "Amplify MDA is an open source Eclipse-based IDE that enables the generation of software components from high-level (usually UML) models. Components can be generated for any programming language (Java, Ruby, HTML, PHP, ?)".

Please do check both of these tools out. A lot of thought went into them and they have proven to be very pragmatic and usefull. And they proof once again that life's not about doing projects that customer pay for but about things that one feels passionate about. I can only say I am humbled by what Ron managed to do in the last year and I feel lucky he is willing to go and have a beer with me once in a while ;-).

Beam me up... [posted Oct. 5th 2005 23:45]

I recently read an article by Scott Ambler entitled The roadmap to agile MDA. Alas, when I just looked it up I found out it was written in 2004, which makes this response somewhat less meaningfull.

I thnk Scott has some good points when it comes to disadvantages of MDA but my main issue with this article is the fact that it is relatively easy to criticise for instance the fact that UML does not have tools to support it as good as modern IDE's and knowledge of UML being less widespread than that of Java. IDE's have been around a hell of lot longer than UML Modelling tools and there has been a lot more competition. And there will probably allways be more people that understand less abstract languages than those that use the more abstract ones.

But that is precisely the point where I don't quite understand Scott, aiming for more abstraction seems like the thing even or maybe exactly the Agile advocates should go for. I don't think code like Java or the like are that agile so why make it the basis.

The problem with people affiliating themselves too much with movements that have a commercial side to them (like Agile, but also UML, RUP and so on) is that one can never quite trust their opinion, as they might incorporate just a little commercial interest. Does this mean I wouldn't mix the two, I like to think so at least, and at the moment I know so. Yes that means this blog is far from hitting it big I'm affraid ;-)

Thursday, November 20, 2008

Gone but maybe not completely [posted Oct. 5th 2005 22:57]

Don't you just hate it when you think you have a good idea and Google tells you there have been quite a number of people that already had the idea a long time ago...

When I was recently pondering the usefulness of models the thought occured to me that it would be not so difficult to generate a model repository from Java source code in a manner like JavaDoc but more advanced or enhanced. This idea as I suggested and expected was realised by others such as Compuware's JavaDoc enhanced with UML models.

Taking it one step further; all roudtrip UML-Java tools offer even more.

An interesting fact of course and completely in line with current development in MDA/code generation tools, ok, I never said it was a revolutionary idea ;-)

Won't choose [posted July 15th 2005 01:27]

I don't know why but I really don't like conflict. It's not that I can't fend for myself as some of my friends and collegues will confirm. I just don't like the idea of trying to argue a point knowing that winning an argument doesn't mean you're right. And usually taking a side on subjects in IT means that you'll end up in numerous arguments about the merrits of things that are probably only distantly related to the hard of the matter. Particularly when the subject has taken on religious proportions. Take MDA vs DSL or rather Java vs .Net.

I see or think I see a difference between how a number of Java people I know seem to think and work differently than a number of .Net people I know. I feel comfortable or seem to support one of those groups most of the time but the number of times that the other groups seems to have the better ideas is large enough for me not to want to choose sides. It's like I really think slashdot is a cool site but when it turns out sometimes how incredibly dumb and unmannered the average slashdotter seems to be I turn to tweakers with ease. Or even though I admire what Apple does when I see how important the persona of its CEO is and how some of Apples consumers follow him like sheep I cannot decide to buy one of their products.

Maybe I like to think that I don't choose sides because I see the good and bad of both of them. One could say that great men changed the world because they chose something, believed in it and stuck with it. That probably makes me not a great man. That probably is why, when I get home, I change into the non conformist uniform; black. Amongst other reasons because it makes me less visible. If your not a great man you can only aspire to have a great mind. So I avoid light t-shirts to start with.

It's not the labels [posted July 15th 2005 01:27]

When I mentioned the religious war that might break out about MDA vs DSL this actually gives the essence of these kinds of differences. The difference is not in those terms or the technical content they stand for but in the people that get behind them.

It is possible to create a DSL with MDA. There are a number of languages based on MOF the OMG keeps reminding us, like UML but also Corba and the CWM. These can be referred to as DSL's. If those examples seem to generic in nature to consider them as DSL I'm sure a short introduction into MDA wil convince anyone that contructing a DSL using MDA is possible. And of course it is possible and probably the most sensible choise to base DSL solutions on a metamodel that combines and relates the different DSL's. So the only difference between your avarage MDA or DSL solutions is whether the metamodel is MOF (open) or that of a vendor and thus perhaps proprietary. We'll probably see a lot of time being spend on these subjects without it resulting in anything that touches upon this subject.

Maybe its best to stick to the as for now still academic group of the generative programming people with Krzysztof Czarnecki as one of its exponents. They include almost every modern subject in IT on their stride towards generating software. And as long as they write great books about it that's just fine with me.

It's not the labels [posted July 15th 2005 01:27]

When I mentioned the religious war that might break out about MDA vs DSL this actually gives the essence of these kinds of differences. The difference is not in those terms or the technical content they stand for but in the people that get behind them.

It is possible to create a DSL with MDA. There are a number of languages based on MOF the OMG keeps reminding us, like UML but also Corba and the CWM. These can be referred to as DSL's. If those examples seem to generic in nature to consider them as DSL I'm sure a short introduction into MDA wil convince anyone that contructing a DSL using MDA is possible. And of course it is possible and probably the most sensible choise to base DSL solutions on a metamodel that combines and relates the different DSL's. So the only difference between your avarage MDA or DSL solutions is whether the metamodel is MOF (open) or that of a vendor and thus perhaps proprietary. We'll probably see a lot of time being spend on these subjects without it resulting in anything that touches upon this subject.

Maybe its best to stick to the as for now still academic group of the generative programming people with Krzysztof Czarnecki as one of its exponents. They include almost every modern subject in IT on their stride towards generating software. And as long as they write great books about it that's just fine with me.

Holy war [posted July 5th 2005 23:28]

For the first months after MDA came into my life I was completely content to know that I had seen the future and it will be. Recently I realised that one of the reasons that I felt so good about MDA was that it seemed so undisputed. Something you have just gotten to know usually is because you simply haven't gotten to that part of the complete picture. With MDA I had a naive feeling though that this was so new and improved it would be years before anything would touch it.

Well alas, it did not take long before terms like generative programming and DSL started to apear on my horizon. It probably was just pure coincidence that I bumped into MDA first since all of these techniques have been around for quite some years. And they have lived along side each other peacefully for about the same amount of time. However, I'm getting the feeling that just as with Java and .NET as one of the most recent examples MDA and DSL will be getting into a religious battle before long.

This usually soils the joy this kind of great technologies have for me. But maybe it is one of the reasons why both MDA and DSL will evolve faster than expected in the coming years. As the great warriors of holy wars of the past IBM and Microsoft again seem to be taking oposing sides this battle is not going to be over soon.

Saturday, November 15, 2008

What good is UML [posted June 8th 2005 22:30]

One of the things I want to get into in this blog is the quality/usefullness of UML for (certain) modelling purposes.

One of the things that we all seem to discover when working with UML is that it has so little semantics that you end up defining a lot of it for each project you do. One could argue this is a powerfull feature, I think it is a weakness. It makes an argument for DSL. This could lead us straight to a discussion of Generative Programming vs MDA, it is way too early for that, first I need to get some other stuff of my chest.

One of the things that strikes me is the similarity between Java and UML. It probably isn't a coincidence that they grew up together in the mid nineties. The fact that a lot of tools that offer UML combined with coding facilities offer at least Java as a coding/generated language makes for a bias of course. The fact that both have interfaces and classes, and the same basic types (more about that in a later blog entry) might be an indication. OK UML supports multiple inheritence and C++ also has these basic types. So maybe it's more accurate to state that C++ and Java together fathered the UML syntax. Not surprising because in the mid eighties the race wasn't run. It could have been won by C++ just as easily (at least that was the general opinion then, which noone will now admit to ever having of course...). However the point I'm trying to make is not so much where UML came from but that it seems to be lagging behind on even Java and C++ today, never mind other developments (Ruby, AOP, metaprogramming, ... interestingly these have been around longer or about as long as Java and UML).

Is it wise to specify in a language that seems to have missed a great deal of the important inovations that happen around us today in the wold of software devolpment?