openArchitectureWare.org openArchitectureWare.org

December 01, 2008

Markus Voelter

OSLO Video Comments: A Lap Around Oslo

I just (finally!) started watching the OSLO videos from PDC. I started with the over view session A Lap around OSLO. Here are some thoughts:

I don't like the message that "you've done this for years, it's just like XML and [Attributes] and all that..." Why on the one hand side talk about how new, important and ground-breaking OSLO is, and then say that it's all just XML, SQL and other stuff everybody has done for a long time?

Quadrant is actually all the tooling; part of it is the visual DSL designers as well as the textual ones

Why the heck show the SQL that works with the DSL definition when the "database is just a repository"? Seems like an unimportant implementation detail to me. They even say "M is a way to describe stuff stored in a repository". Sounds to me that's beside the point - isn't M about defining languages??

The longer I watch the video, the more all the stuff seems to me like a new database tool ... I know that's not the idea, but it is presented in that way.

I really like that everything is interpeted. Even the grammar/parsing facilties are interpreted. Very nice.

So it seems that the ability to customize editors is really still limited, they "aspire" to making intellisense and all that available to any DSL.

Wow, this Quadrant tool itself is built to interpret models, it is itself defined via M-stuff. Nice!

Hm... but it again looks like a database tool ("Model-Driven Access"). I don't understand how the textual models interact/relate with the graphical Quadrant stuff? Can I get the textual representation out of the database again? Or can I just use it to put stuff "into" the repo?

Somehow the Quadrant stuff also reminds me of Naked Objects...

As I watch the video, I feel like, while it is not yet finished, it looks very promising. However, I have no idea why they don't also include a code generation. Yes, interpretation is useful, no question, but so is code generation. The only explanation I can come up with is to "deconflict" OSLO with the MS DSL Tools.

When they are showing this MService example DSL where they embed (what looks like) C# code into new abstractions for Service description, I wonder what the means of modularization are. Is C# described in M? Can I easily embed "pieces of" C# code in an M DSL? Sure looks like it... very interesting! Actually, it seems like some workflow stuff that's invoked. But then, at least those need to be combinable. And at some point, I am sure C# will be available, too.

Wow! They have a debugger for their DSLs. VERY NICE! I wonder how much of that is automatic (i.e. somehow derived from the grammar) as opposed to having it written manually.

All in all, this stuff really looks nice and I am looking forward to more ... stay tuned for my comments on the other PDC videos :-)

by Markus Voelter (noreply@blogger.com) at December 01, 2008 08:05 PM

openArchitectureWare 4.3.1 RC1 available

The Release Candidate 1 of Version 4.3.1 of openArchitectureWare is available at oawbranch.pluginbuilder.org.

Happy Testing :-)

by Markus Voelter (noreply@blogger.com) at December 01, 2008 08:05 PM

New Podcast: Omega tau, science and technology in your headphones

Recently I have started a new podcast: Omega tau, science and technology in your headphones

It can be found at http://omegataupodcast.net (and in iTunes, of course) and covers everything in science and technology that I find interesting. It is a mix of German and English language episodes and will probably average at about one episode per month.

We already have five episodes online:
/1/ Mitflug im Motorsegler (German)
/2/ Wetterdatenerfassung (German)
/3/ Das Multiple Myelom (German)
/4/ Commercial Space and SpaceShipOne (English)
/5/ Earthrace - Around the World in a Powerboat (English)

Upcoming episodes will include discussions on Computational Thinking, Airliner-Maintenance, Robotics, Biochemistry and more.

Omega tau is a real hobby for me and my girlfiend (we do this together) and my personal bias towards aviation will probably shine through. We will also experiment with different styles, ranging from interviews over features to collages with different guests in one episode.

So if you're interested in this kind of stuff and like to listen to audio content, why don't you give it a try and let me know what you think?

by Markus Voelter (noreply@blogger.com) at December 01, 2008 10:36 AM

November 28, 2008

Peter Friese

Using Xpand in your Eclipse Wizards

At ESE, I had a nice chat with Chris (actually, I had a lot of nice chats with a lot of nice people - it was quite a challenge to attend any of the sessions), who told me that he was looking into template engines. I leave it up to you to make any assumptions on why he's interested in template engines. I happen to know at least three template engines: Velocity (which I had the joy of using in my active days at AndroMDA.org), the template, erhm, ... mechanism being used in PDE (I once fixed a bug which had been caused by this engine) and - you might have guessed it - Xpand (which I am a committer on).

So, I gave a short demo of Xtext and Xpand to show Chris how easy it is to create (model-aware) code generation templates. Xpand comes with a nice editor which makes template editing a joy - it features code highlighting, hyperlink navigation, model-awareness and other editor goodness.

Instead of letting only Chris know how that works, here's a short guide on how to write your own Xpand template and use it in a wizard. To make the example more realistic, I chose to implement a wizard that creates an Ant build.xml file for a simple project (something which is missing in Eclipse, AFAIK). So, here we go.

Prerequisites:

How to do it

  1. Download and install the prerequisites.
  2. Create a new plug-in project named "de.peterfriese.antwizard"
  3. Add a New File Wizard to the project. I used the Custom plug-in Wizard to get me started.
  4. Brush up the wizard page and add some fields for project name, source folder and binary folder.
  5. We want to transfer the values entered in this wizard into our template, so we need to create an Ecore model that describes our data model.
    antwizard_metamodel

  6. Add org.eclipse.emf and org.eclipse.emf.edit to the dependencies of you plug-in.
  7. Create a genmodel and let EMF generate the model code for you.
  8. Add code to your wizard that transfers the values from the input fields to your model. One might consider using databinding for doing this, I used a straight forward read'n'write approach for the time being:
    public boolean performFinish() {
        final String containerName = page.getContainerName();
        final String srcDirName = page.getSrcDirName();
        final String binDirName = page.getBinDirName();
        // ...
    }
    private BuildSpecification createModel(IProject project, String srcDirName,
        String binDirName) {
        BuildSpecification buildSpecification = BuildspecificationFactory.eINSTANCE.createBuildSpecification();
        Project projectSpecification = BuildspecificationFactory.eINSTANCE.createProject();
        projectSpecification.setName(project.getName());
        projectSpecification.setBinaryFolder(binDirName);
        projectSpecification.setSourceFolder(srcDirName);
        buildSpecification.setProject(projectSpecification);
        return buildSpecification;
    }
  9. Create an Xpand template de.peterfriese.antwizard/src/template/BuildTemplate.xpt:
Ant file template


In case you wonder how to get those funky characters: make sure us create this file using the Xpand editor - it has code assist (CTRL + space) for those characters.
  • Create an Xtend file de.peterfriese.antwizard/src/template/GeneratorExtensions.ext:
  • Ant file extensions

  • Add org.eclipse.xpand, org.eclipse.xtend and org.eclipse.xtend.typesystem.emf to the depencies of your plug-in.
  • Finally, we need to provide some code to invoke the generator:
    private void generate(BuildSpecification buildSpec, IProgressMonitor monitor) throws CoreException {
    
        // get project root folder as absolute file system path
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        IResource resource = root.findMember(new Path(buildSpec.getProject().getName()));
        String containerName = resource.getLocation().toPortableString();
    
        // configure outlets
        OutputImpl output = new OutputImpl();
        Outlet outlet = new Outlet(containerName);
        outlet.setOverwrite(true);
        output.addOutlet(outlet);
    
        // create execution context
        Map globalVarsMap = new HashMap();
        XpandExecutionContextImpl execCtx = new XpandExecutionContextImpl(output, null, globalVarsMap, null, null);
        EmfRegistryMetaModel metamodel = new EmfRegistryMetaModel() {
            @Override
            protected EPackage[] allPackages() {
                return new EPackage[] { BuildspecificationPackage.eINSTANCE, EcorePackage.eINSTANCE };
            }
        };
        execCtx.registerMetaModel(metamodel);
    
        // generate
        XpandFacade facade = XpandFacade.create(execCtx);
        String templatePath = "template::BuildTemplate::main";
        facade.evaluate(templatePath, buildSpec);
    
        // refresh the project to get external updates:
        resource.refreshLocal(IResource.DEPTH_INFINITE, monitor);
    }
  • That's it!

    Taking it for a spin

    1. Launch a runtime workbench by selecting de.peterfriese.antwizard/META-INF/MANIFEST.MF and invoking Run As -> Eclipse Application
    2. Create a new Java project in the runtime workspace.
    3. Invoke your wizard by selecting File -> New -> Other... -> Ant -> Ant build file from existing project
    4. Enter the required information (project name, source folder, binariy folder)
    5. After clicking on finish, you should get a fresh Ant file for your project:
    Ant file

  • Enjoy!
  • You can download the project here. Feedback and comments are welcome!

    by Peter at November 28, 2008 10:42 AM

    November 27, 2008

    Jan Koehnlein

    How to make an xtext language reference another by nsURI

    In principle, Xtext allows two languages to refer to each other by means of the importMetamodel feature. If you specify the imported meta-model by means of a file URI, everything works out of the box. Unfortunately, file URIs are not suitable in many scenarios, so something less physical would be appropriate.

    Due to a certain mismatch between the way openArchitectureWare (and thereby all the language's Xtend and Check files) and EMF access files and handle EPackage registration. The following describes the way to go in the version of Xtext that is shipped with oAW 4.3.1. Note that in TMF/Xtext we will provide easier support by means of classpath relative URIs.

    Example

    We consider the following two DSLs asl and bsl, where asl references bsl:

    asl:
    importMetamodel "http://www.example.org/my/bsl" as mybsl;
    A:
    (imports+=Import)*
    (bs+=BRef)*;
    Import:
    "import" file=URI;
    BRef:
    "a" name=ID "b" b=[mybsl::B];

    bsl:
    B:
    "b" name=ID;
    To allow such cross-language reference, you have bsl has to be installed in the workbench you use for editing asl.

    Install an xtext language

    This usually boils down to deploying the language plug-in into the Eclipse workbench, e.g. by exporting it as deployable plug-ins and fragments into the dropins folder of the Eclipse installation.

    There is one issue with the way xtext registers its meta-model. The EPackage is added to the EPackage.Registry programatically in the generated MetaModelRegistration class, such that we can call it inside or outside a running Eclipse. If running inside Eclipse, the MetaModelRegistration is called by the Activator of the language plug-in. This can be too late, as other plug-ins might not use the language but the meta-model, and rely on it to be accessible from the EPackage.Registry.

    We cannot use EMFs dynamic_package extension point, as it requires the ecore file to be in a plug-in neutral folder. This is not the case in Xtext, as it stores the generated file in a source folder, which is no longer present once the plug-in is deployed.

    There are two ways to solve this problem
    1) Run the EMF generator to generate code from the ecore model. This will also register the generated EPackage Java class to the generated_package extension point of EMF.
    2) Register a proxy class to the generated_package extension point, that implements EPackage (empty methods) and returns MetaModelRegistration.getEPackage() as its eINSTANCE. To ensure that the model is really loaded, you should delete the registered proxy in the static initializer and set the right resource loader before registering the package.

    org.example.bsl.EPackageProxy:
    package org.example.bsl;
    ...
    public class EPackageProxy implements EPackage {
    static {
    ResourceLoader cl = ResourceLoaderFactory.createResourceLoader();
    try {
    ResourceLoaderFactory
    .setCurrentThreadResourceLoader(new ResourceLoaderImpl(
    EPackageProxy.class.getClassLoader()));
    EPackage.Registry.INSTANCE.remove("http://www.example.org/my/bsl");
    MetaModelRegistration.register();
    } finally {
    ResourceLoaderFactory.setCurrentThreadResourceLoader(cl);
    }
    }

    public static final EPackage eINSTANCE = MetaModelRegistration
    .getEPackage();

    public EClassifier getEClassifier(String name) {
    throw new UnsupportedOperationException("Method not implemented");
    }

    // remaining methods of EPackage
    ...
    plugin.xml:
      <extension point="org.eclipse.emf.ecore.generated_package">
    <package class="org.example.bsl.EPackageProxy" uri="http://www.example.org/my/bsl">
    </package>
    </extension>

    Referencing an installed xtext language by nsURI

    The xtext generator starts a new plain Java VM, and therefore does not have access to EPackages registered via extension points. That's why you have to explicitly register the referenced metamodel in the generator workflow. Write a class

    RegisterBslHelper:
    package org.example.asl;
    ...
    public class RegisterBslHelper {

    public RegisterBslHelper() {
    EPackage package1 = MetaModelRegistration.getEPackage();
    package1.eResource().setURI(URI.createURI(package1.getNsURI()));
    }
    }
    and call it in the generator workflow generator.oaw:
    <workflow>
    <property file="'generate.properties'/">
    <bean class="org.example.asl.RegisterBslHelper">
    <component file="'org/openarchitectureware/xtext/Generator.oaw'" inheritall="'true'/">
    </component>
    </workflow>
    Also make sure, that the my.asl plug-in has a dependency on my.bsl and reexports that.

    by Jan Köhnlein (noreply@blogger.com) at November 27, 2008 05:52 PM

    November 20, 2008

    Markus Voelter

    Eclipse Modeling Symposium 2008

    Over the last three days, I was participating in the Eclipse Summit Europe 2008, the Eclipse community's european meeting in Ludwigsburg. Specifically, on Tuesday I moderated the Modeling Symposium. I really liked it this year - the submitted papers were on really interesting topics (model migration, semantics, notation, for example) and not the "usual" trivial stuff. Because every presenter had only 15 minutes (and we really enforced it :-)), people had to get to the point quickly, so the presentation part
    was really quite fast-paced.

    In the afternoon we had Open Space discussions on some of the same topics, and we recorded a couple of video interviews (stay tuned :-)).

    As usual, Ed Merks has created a great blog entry about this event, so I just refer to him for more detail :-)

    by Markus Voelter (noreply@blogger.com) at November 20, 2008 09:01 PM

    Peter Friese

    ESE: Building Refactoring Tools with LTK and Ludwig

    Jeffrey Overbey talked about building refactoring tools using the LTK and his research work "Ludwig".

    I guess you all agree with me that refactoring support is crucial for any programing language, as you need to restructure your code rom time to time.

    Although Eclipse LTK offers a decent API and UI to realize refactoring tools, all the heavy lifting (parsing the text in question, analyzing the AST, creating rewrite rules) is left to you.

    Jeff's research tool Ludwig can help to derive refactoring support from a BNF-style grammar very easily. Ludwig essentially derives a lexer/parser from the grammar and provides an interface to the AST which gets constructed by the parser. Which gives you the chance to walk / visit the AST and (partially) rewrite the AST.

    I really enjoyed Jeff's presentation style. He used a set of slides and pre-recorded screenvideos to drive his talk. I think this is great idea, as it basically eliminates any problems you might run into if you do a live demo. Plus, it gives the presenter the chance to face the audience while demoing, instead of mumbling into the screen :-)

    Eclipse Summit Europe

    by Peter at November 20, 2008 09:49 AM

    November 16, 2008

    Markus Voelter

    EMF and OSLO?

    Lars Corneliussen has written an open letter to Doug Purdy about interop between OSLO and EMF.

    Doug has said that he'd be interested in having the two worlds interoperate ("We want to engage, particularly with the Open Source Community, in order to make sure that we can invent the future together."). Personally, I also think that would be very useful.

    So please let us know what you think and help spread the word. True interop between Microsoft's OSLO and Eclipse's EMF would be very benefitial for both communities.

    by Markus Voelter (noreply@blogger.com) at November 16, 2008 11:31 AM

    November 15, 2008

    Peter Friese

    Maps, Services, Relations and Reuse: Eclipse DemoCamp Hamburg

    On November 10th, the Hamburg Eclipse DemoCamp took place in the stylish EAST Hotel.

    EAST Hotel

    We had 45 reservations and almost all of them made it to the Camp. I always get a little bit nervous 15 minutes before the event starts if no more than 10 people have shown up so far, but I guess that's alright.

    Martin and I welcomed the crowd on behalf of our sponsors (Eclipse Foundation, froglogic, it-agile and itemis):

    Martin Lippert and Peter Friese welcome the crowd

    After that, Harald Wellmann of Harman Becker told us that the world is a disc. Well, at least he and his company try to make it a disc again - Harald leads a team that develops a so called "map compiler". A map compiler takes map source data and condenses that data by extracting only the relevant parts of it. As you may guess this is a long-running process which can hugely benefit from parallelization. Harald and his team use OSGi to modularize their software and make sure they use computing resources efficiently. One thing worth noting is that OSGi is even being used in car entertainment systems: Harald told us about one entertainment system which makes use of OSGi to act as an intermediate / glue layer between the UI (written in Java) and the core (written in C++).

    3022446041_2273030e59_b

    Gerd Wütherich (Independent) continued where Harald stopped and showed us how to use Spring Dynamic Modules and OSGi in his excellent talk - interspersed with some neat demos:

    Eclipse DemoCamp Hamburg


    Together with Nils Hartmann, Mathias Lübken and Bernd Kolb, he wrote the first German book on OSGi, so he really knows what he is talking about.

    After those talks, we took a break to grab some refreshments and take the chance to get in touch with the other attending Eclipse enthusiasts. I had the impression that everybody had a good time discussing all things Eclipse - in fact Martin and I had to interrupt a lot of lively discussions for the second run of talks.

    In the first talk after the break, Miguel Garcia and Rakesh Prithiviraj (both Technical University of Hamburg-Harburg) gave us an update of their research on how to integrate LINQ (Language Integrated Queries) in Java:

    Eclipse DemoCamp Hamburg November 2008

    Eclipse DemoCamp Hamburg November 2008

    The final demo was deliverd by Stephan Herrmann who showed us Object Teams / Equinox, an amazing piece of software that can be used to re-use existing Eclipse plug-ins in an aspect-oriented way. To get an idea of how powerful this approach is, have a look at the following screenshot - this is the JDT, but enhanced by Object Teams in order to support their very own syntax extensions for Java:

    AddUnimplementedMethods


    To learn more about Object Teams, browse to their web site at http://trac.objectteams.org/ot/wiki/OtEquinox.
    3023294590_3c5d9c364b_b


    Everyone in the room was quite impressed with what is possible with Object Teams / Equinox, so you should check it out (it's available for free). If you can manage to go the DemoCamp in Berlin, you'll have the chance to see it live.

    The feedback we received from the attendees was great - some people even sent emails thanking us for organizing the event, so I guess the DemoCamp can be considered a success!

    by Peter at November 15, 2008 12:25 AM

    November 11, 2008

    Markus Voelter

    Eclipse at .NET conference

    Today I was speaking at the prio.conference 2008, a conference on .NET technologies. I gave three talks: my Architecture as Language stuff, my talk on Architecture Documentation and - surprise! - on how to build textual DSLs with Eclipse.

    Now, I did expect a number of people to show up in the two conceptual talks, but I didn't expect many people to come to the Xtext talk - after all, it is a Microsoft technologies conference. I was wrong! The room was full, some people were standing. I wasn't able to find out whether so many people came because the talk was on Eclipse technologies, or in spite of that :-).

    Nonetheless, I was very pleased to see so much interest in Eclipse, Xtext and MDSD in the .NET world

    Thanks to Ralf Westphal for inviting me to the conference!

    by Markus Voelter (noreply@blogger.com) at November 11, 2008 08:07 PM

    Sven Efftinge

    DSLs in the Netherlands


    Last friday I was in the Netherlands near Amsterdam to give a talk about Xtext at profict summer camp 2008. This was really a nice event in an impressing location (see picture - people work there!). They'd invited thee speakers:

    First Neal Ford gave a very entertaining introduction on DSLs. After that he talked about implementing internal DSLs with Java, Groovy and Ruby. He also mentioned external DSLs very briefly and recommended Antlr for this very much.

    His talk gave a nice foundation for my introduction of Xtext. Which I did by leveraging the terminalogy Neal introduced (As Neal is a collegue of Martin Fowler and has done a lot talks on DSLs with him, I assumed that he will stick to Martin's terminology and I was right) . I also showed the implementation of the example from Martin Fowler's upcoming Book on DSLs, which should help to compare the different technologies (internal DSL in Ruby, Antlr, Xtext).
    I've been asked to put my presentation slides online. So here they are.

    The last presenter, Zef Hemel from TU Delft, showed us a web framework called WebDSL, which uses a lot of external DSLs to make development of database driven web applications (CRUD and more) easier. It is implemented in strategoXT, which is crazy stuff.

    After that there was a panel while outdoor a great smelling barbecue was prepared. Unfortunately I had to catch my flight back, so I had to leave without any barbecue :-(.
    Anyway the event was really nice and I've met a lot of very nice people there. It seems that DSLs are a hot topic in the Netherlands.

    by Sven Efftinge (noreply@blogger.com) at November 11, 2008 12:03 PM

    November 10, 2008

    Sven Efftinge

    W-JAX slides online

    I've just uploaded the slides of the presentations I gave at last weeks W-JAX conference in munich.
    • Scala - (It's an introduction to a programming language called Scala. Most of the slides contain code snippets only, so it may not be that usable without explanation.)

    by Sven Efftinge (noreply@blogger.com) at November 10, 2008 02:21 PM

    October 27, 2008

    Peter Friese

    Eclipse DemoCamps

    It's that time of year again - demo time!

    Being run for the third time, demo camps can be considered an integral part of the Eclipse calender of events. Attending a DemoCamp is great. If you haven't yet been to any Eclipse DemoCamp, let me briefly summarize why I think you should consider going to one:

    • see cool technology in action (well, that's the whole point of a DemoCamp, isn't it)
    • get to know Eclipse-minded people from your area
    • have some frosty beverages and fingerfood (well, that actually depends on how the camp is organized)
    • see some exciting buildings from inside (again, depends on how the camp is organized)

    Oh, did I mention that Eclipse DemoCamps are free? Thanks to the Eclipse Foundation and many sponsoring member companies, you get to enjoy all those nice things for absolutely free.

    Here are some of my favorite demos:

    By the way, if we were to award the price of the most indefatigable DemoCamp presenter, it'd go to Wassim Melhem. You can meet him at no less than three locations: Iasi (Romania), Warszawa (Poland), Poznan (Poland).

    Hope I could convince you to attend one of the many DemoCamps. I'll be at the DemoCamps in Hamburg and Leipzig, so see you there!

    by Peter at October 27, 2008 01:13 PM

    October 25, 2008

    Peter Friese

    MDSD Today 2008 Recap

    From October 15 to October 17, MDSD Today 2008 took place at the Nordakademie in Elmshorn near Hamburg, Germany. The conference, which had been organized by Frank Zimmermann (Nordakademie), Simon Zambrovski and yours truly, was intended to bring together practioners, researchers and people from both industry and business.

    We were fortunate enough to aquire a number of well-known speakers, most notably Axel Uhl (SAP) and Ed Merks (of EMF fame).

    On the first day, Axel and Ed delivered their excellent keynotes on the current state of affairs in modeling.

    MDSD Today 08, Elmshorn, Germany

    Ed commented on a number of misconceptions he has been confronted with during the last few years such as "modeling is too complicated", "modeling will just get into my way" or "modeling will limit my creativity". The bottom line of his talk was that although you might not realize it, models drive most software (just think of all the data models you're dealing with in business applications). However, using source code as a representation for your models might not always be the best solution - to gain both a better overview of your software and be more efficient with respect to software development, you should think about raising the level of abstraction, e.g. by using domain specific modeling tools that let you focus on the structure of your model instead of having to deal with (basically irrelevant) syntactical details of the target language. If working at a higher level of abstraction makes things more complicated for you, you're doing something wrong.

    MDSD Today 08, Elmshorn, Germany

    Axel picked up this idea in his keynote on "Current Challenges for Industrial Software Development Tools and Languages" stating that any computer program can be conceived as a model. Since models are independent of their visual representation, they can be represented in various different forms, the most common being text, trees and diagrams of any kind. The question, however, whether to choose text or the abstract model as the primary artifact for storing. A textual representation clearly has advantages with respect to diffing and merging and can be handled with commonly used tools such as CVS nd plain text editors. Using the abstract model as the primary artifact allows for overlapping partial views. Since this model can persisted in some kind of repository, access to the model very much feels like working with a database. In particular, there's no need to parse any text back and forth between the model and an editor. The decision whether to store models as text or in a repository largely depends on boundary decisions, like the availability of the repository technology, the robustness of the mapping between the textual representation and the model, language characteristics, the number of developers who need to work on the model in parallel, the size of the software system built with the model and the life cycle of the software. Axel concluded that on one hand, modeling is not that much different from coding and that, on the other hand, DSLs are becoming increasingly important due to the complexity of UML.

    MDSD Today 08, Elmshorn, Germany

    One of the nice thing about conferences is you get to talk to people who are interested in the same topics as you are. MDSD Today has been no different - during the breaks you could see people involved in all kinds of discussions.

    MDSD Today 08, Elmshorn, Germany

    Later that day, Stefan Reichert and Birger Garbe of Lufthansa Systems shared their experiences regarding model driven software projects with us. The topic of their talk was "Model Driven Software Development in Business Projects: Chance or Risk?" Their anwser to this question was that if've got the right tools, MDSD is a chance and can help you to build better software.

    MDSD Today 08, Elmshorn, Germany

    MDSD Today 08, Elmshorn, Germany

    Thomas Stahl of b+m concluded the day with his talk on how MDSD, BMP and SOA fit together:

    MDSD Today 08, Elmshorn, Germany

    The second and third day of the conference were crammed with hands-on tutorials on MDSD tools like EMF, Xtext, Xpand and GMF. Quite a lot of people attended the tutorials as you can see from the pictures.

    MDSD Today 08, Elmshorn, Germany

    Arno had to overcome the hardship of a broken beamer, so he had to use arms and legs to explain:

    MDSD Today 08, Elmshorn, Germany

    Overall, the conference was a real success and I am looking forward to seeing you all again at MDSD Today 2009!

    by Peter at October 25, 2008 06:42 AM

    October 20, 2008

    Jan Koehnlein

    Started GMFTools project

    I've worked with GMF for several years now, and I've built quite a bunch of graphical editors using it.

    On my way, I've come along several issues, problems and annoyances of the GMF framework. Some of these may be a matter of personal taste, others are just reoccurring topics and tasks, which unfortunately have never been really focused within the GMF project. As these are sometimes hard to separate, I've decided to collect my ideas, extract reusable solutions and share them by making them open-source. This way, I hope to share knowledge with other GMF users, get feedback (maybe even by the committers), provide examples for beginners, and of course make my own life easier.

    Have a look at it at http://code.google.com/p/gmftools/, and, if you like it, feel free to use it. But please don't expect me to provide extensive support. Main topics covered are
    • Sharing an editing domain among several editors
    • Make GMF's development process easier, e.g. by bypassing unreliable reconcilers and provide a very simple UI to the code generator.
    • Additional layouts, e.g. make labels fit into ellipses.
    • How to implement non- or semi-canonical diagrams.
    Of course your comments are very welcome.

    Maybe there are even more people around willing to share GMF solutions...

    by Jan Köhnlein (noreply@blogger.com) at October 20, 2008 05:44 PM

    October 17, 2008

    Sven Efftinge

    Multi-line String Literals in Java

    Having multi-line string literals is a common and useful thing in most modern languages. It is for instance very convenient to use multi-line strings to specify test data in-line as opposed to referring to external files containing the data. As Java lackes multi-line string literals, one observes the definition of data in external files very often.

    I've implemented multi-line strings in Java using a library approach, so that it's possible to write the following:

    /**
    * @param args
    */
    public static void main(String[] args) {
    System.out.println(S(/*
    Wow, we finally have
    multiline strings in
    Java! HOOO!
    */));
    }

    which will print the following to standard out:

    Wow, we finally have
    multiline strings in
    Java! HOOO!


    How does this work?
    Well, first of all you have to make sure that your source is on the class path, then the following code does the job:

    public static String S() {
    StackTraceElement element = new RuntimeException().getStackTrace()[1];
    String name = element.getClassName().replace('.', '/') + ".java";
    InputStream in = getClassLoader().getResourceAsStream(name);
    String s = convertStreamToString(in, element.getLineNumber());
    return s.substring(s.indexOf("/*")+2, s.indexOf("*/"));
    }

    Obviously this don't perform that well, but for unit testing it's sufficient.
    Maybe it would be cool to add some support for interpolation functionality to it (using e.g. groovy or Xpand).

    by Sven Efftinge (noreply@blogger.com) at October 17, 2008 02:25 PM