Root CUIP Metalevel

Posts tagged “Essential”.

New kid on the block: XCore

The guys at the Eclipse Modeling Framework leaded by Ed Merks @edmerks are working hard in XCore to provide ECore models a textual syntax. This is a needed feature from a long time.

It was also a good surprise to see how XCore syntax is quite close to Essential Meta. This is good news again: interoperability between the Java modeling  side of world (EMF) and .NET modeling efforts with Essential are now simpler with the arrival of XCore.

As Meinte Boersma @miente37 comment on twitter: semicolons seems to be the main difference.

BTW, a new release of Essential with minimal bug fixing has been released (0.5.1). Try it out!

Modelling the User Interface, the video

The recording of the Code Generation 2011 session about ‘Modelling the User Interface’ is finally available online at InfoQ.

For further details take a look to the slides and Conceptual User Interface Patterns.

During the video you can see a pair of demos:

  •  Essential on action doing full UI inference and code generation
  • and IO, the codename for a new proof of concept UI specification and WYSIWYG prototyping tool.

Essential on Alt.Net Hispano

The Alt.NET Hispano group has published my VAN about Code generation with Essential. The recording was done in Spanish.

La comunidad Alt.NET Hispano ha publicado la VAN (desconferencia) sobre Generación de código con Essential que tuvimos el pasado dia 11 de junio. Si estás interesado en MDD, generación de código y como aplicarlo con Essential, este video grabado para la comunidad en español es un buen punto de partida.

Mi agradecimiento a Alt.NET Hispano por el interés en la materia y la invitación a divulgarlo.

Descarga directa del video (562 Mb).

 

More… »

First public Essential 0.4.44 Beta!

Essential Logo

The Code Generation 2011 conference and the Language Workbenches Competition 2011 Workshop are quite close in the calendar.

I want to celebrate it with the MDD community sharing my work on Essential (a tool designed for acquiring speed with Model Driven Development). On 11th may 2011, version 0.4.44 has been released as the first public beta.

Essential is a meta-modeling and code generation tool providing specific DSLs to define and consume:

  • Metamodels
  • Models
  • Templates (using StringTemplate) &
  • Transformations (Model2Text and Model2Model)
With a strong emphasis on model interpretation, prototyping a code generation can be done in an agile way without the need of generating any infrastructure boilerplate or meta-editor plumbling accessories.
The main goals of the tools is to enable software architects to:
  • Prototyping software directly from models in a unexpensive way
  • Evolve theirs software architectures as fast as possible experimenting with design choices
  • Benchmarking and comparing architectures
  • Code generation
For all of you interested in, feel free to try it, enjoy and provide feedback.

Try it also with the sample projects created for the LWC 2011 challenge.

Getting ready for CG2011

Code Generation 2011 is the leading European conference on modeling and code generation. It’s a great opportunity to meet with the experts in the field and share the latest research in the area.

The invited speakers this year are very, very interesting:

As a novelty, previous to the conference itself the first edition of the Language Workbenches Competition will take place on May 24th in the same venue.

In this edition, I will be there again, more active if ever, taking part with some activities:

As always, I’m looking forward to meet again the code generation community.

Take a look to the full programme and don’t miss the chance.

See you in Cambridge!

Essential submission to LWC11

As blogged before, at CG2010 a group of interest came up with a proposal for creating a Language Workbenches Competition and the first edition will be taking place in Cambridge May 24th, just before CG2011.

I submitted a proposal with Essential for participation in LWC11. It’s going to be a great forum for comparing language workbenches capabilities and the state of the art in the area. If interested, track the progress here LCW11.

During the last weeks I’ve been working a little, replacing the old Microsoft Oslo dependencies to MGrammar inside Essential to an alternative parsing solution. The MS Oslo and later SQL Server Modeling never passed from the CTP stage and finally were discontinued. Therefore, I couldn’t ship a product in such conditions and finally decided to change it.

Hello World with Essential, the video

Essential Logo

The Hello World sample is a nice starting point to show the syntax and capabilities of every new language. This test is also useful for code generators and Domain Specific Languages (DSLs) also as a proof of concept.

Following this honorable tradition, I have created a video showing the capabilities of Essential: the tool I am working on for doing agile Model Driven Development.

In this 10 minutes video you will get a general idea of the DSL the language provides to create:

  • metamodels
  • models
  • templates
  • and control transformations

In order to see the details, jump to Vimeo, activate the High Definition mode (HD) and set full screen (sorry embebed version is not good enough).

Essential IDE – Hello World sample from Pedro J. Molina on Vimeo.

More info about it and 12 usage scenarios in the last Code Generation 2010 presentation about Tailored Code Generators.

Share your impressions!

Tailored Code Generators at CG2010

I presented the following talk: DSL and tool support for Tailored Code Generators at Code Generation 2010, at Cambridge, UK on June 18th.

It also was the public presentation of Essential: the tooling supporting my approach for applying MDD. I got a very good feedback from the audience and receive many request to test the tool.

People interested in beta testing it can still enroll here.

Essential drop

Essential is going to be presented this week in Code Generation 2010 during the session DSL and tool support for building tailored code generators.

To celebrate this milestone and give the chance to have more people trying it, an early version is going to be released for the people interested in.

If this is your case, please enroll yourself using the evaluation request form.

Modelling with Essential

After presenting the metamodel DSL, today is the turn for the modelling DSL.

As commented previously, Martin Thiede has a nice prototype called Concrete of a Web editor for model and metamodels. Such work and video also helps to understand the modelling and metamodelling duality.

Coming back to Essential, our tool is also providing a DSL to instantiate a metamodel. But a sample will probably be more illustrative:

Suppose the following simple metamodel:

namespace Core.Class
{
    class ClassModel
    {
        composition List<Class> Classes opposite Model;
    }
    class  Class
    {
        string Name;
        composition List<Attribute> Attributes;
    }
    class Attribute
    {
         string name;
         string Type;
    }
}

You could consider it as a very basic OO model. Intentionally I haven’t added too many details to keep it simple.

If you continue building it; adding operations, arguments, association support and more… at the end, you can have a metamodel comprising a full class diagram of UML, for example. The complexity of the metamodel you want to use is up to you. Having the control of the concepts inside the metamodel you can always add or remove features.

Modelling tools focused in UML, for example, provides this metamodel closed. You can’t change it, it’s a hard-wired standard and you are not allowed to change the core directly (only by extensions points like stereotypes and profiles).

Modelling Language

Now, let’s see how we can create a model using the previous metamodel:

using Core.Class;
namespace MyModel
{
    ClassModel  myClassModel
    {
        Classes = [Customer, Invoice];
    }
    Class Customer
    {
        Name = "Customer";
        Attributes = [Name, Surname];
    }
    Attribute Name
    {
        Name= "Name";
        Type= "string";
    }
    Attribute Surname
    {
        Name= "Name";
        Type= "string";
    }
    Class Invoice
    {
        Name = "Invoice";
        Attributes = [
            Attribute Amount
            {
                Name= "Amount";
                Type= "decimal";
            },
            Attribute InvoiceDate
            {
                Name= "InvoiceDate";
                Type= "date";
            }
        ];
     }
}

In the sample, a basic declaration of two classes (Customer and Invoice) has been instantiated using the concept Class defined in the metamodel. Each metamodel concept is instantiated using it as you would be using a class in Java, C# or C++. Properties are assigned in the natural way one would expect in such languages.

As expected, the using operator imports the metamodel to be employed.

In the lines 26-37 you can see how properties can be also defined inline for list contexts.

Under the curtains, the tool is providing code completion, syntax colorization, error management and real-time parsing as you could expect from a modern IDE.

Essential uses DSL text for serialization but also XML can be derived. This XML document is conformant with an XSD derived from the corresponding metamodel.

Intended usage

Consider now, a basic DB metamodel:

namespace Meta.Database
{
    class Schema
    {
		string Name;
		composition List<Table> Tables;
    }
    class Table
    {
		string Name;
		composition List<Column> Columns;
    }
    class Column
    {
		string Name;
		string SqlType;
    }
}

With this base in mind, you can define a business model containing (Customers, Invoices, etc.) based on a class metamodel and then, look for ways to transform your class model in, for example, a DB model representation. This is called, a M2M transformation (Model to Model). Essential will provide specialized languages to do that.

After that, your derived DB model can again be generated to final code, for example SQL DDL scripts in a given certain dialect. This is generally called a M2T transformation (Model to Text) and again Essential provides tools to describe the transformations.

Basically, to complete all this stuff, we need to introduce two more specialized languages: one for applying transformations, and another one for templates to be converted to final text.

I will focus on templates side on the next post.