home


it systemloesungen  OG, Andreas-Hofer-Strasse 22,  6067 Absam    


 
        Blog         Videos         About

 
 

Modelling with the C programming language

posted Mar 5, 2013, 2:53 AM by Daniel Stieger

In Summer 2012 we used the mbeddr toolkit to generate C code out of modelled tests. mbeddr
supports embedded software development based on an extensible version of the C programming
language and an IDE. We recently wrote a case study, where we summarized our experiences made and 
some lessons learned. Feel free to contact us for further information.  

Research still going on ...

posted Nov 16, 2012, 3:01 AM by Daniel Stieger   [ updated Nov 16, 2012, 3:50 AM ]


After almost two years of research we summarized the „status quo“ in a couple of slides (german only). 

As described in the slides, we propose to develop enterprise applications around a few but very central concepts, i.e.

 

(1)   Processes and Conditions

(2)   commands and

(3)   data-structures

 

 

Some explanations of the concepts and the supporting engineering-process can be found in the slides. 

Our goal for Spring 2012 is to further develop the codegenerators to reach an initial release, 

generating OSGi-packages and javaFX userinterface for fat-client usage. 








Forms3 - UI Generator

posted Jul 18, 2012, 12:14 AM by Daniel Stieger


Finally, modellwerkstatt is releasing its first User Interface DSL reffered as "forms3". Non-Programmers can easily define views with tables, tabs and pop-up windows. Various Layouts are supported in order to place view elements with weights or per pixel. Furthermore a full set so called "Delegates" is contained. Delegates are editing elements like TextInput-, DateInput, DecimalInputFields or a ReferenceSelector. Besides views, user interaction opportunities like a button or a dropdown can be modelled as "Actions" which in turn can access any java code.

Forms3 is fully implemented as a DSL in Jetbrains MPS. Java Code for the RichInternetApplication (RIA) Framework apache pivot is fully generated, i.e. no knowledge concerning apache pivot is necessary. Right now, we are also working on a code generator for the Vaadin UI-framework. This will enable application developers to run forms3 models in any html browser, including mobile devices.



Jetbrains MPS showcase

posted Mar 26, 2012, 2:25 AM by Daniel Stieger   [ updated Mar 26, 2012, 2:30 AM ]

We recently wrote a paper describing our two DSLs to model business applications. I attached a pdf version of the paper to this post. Hope there are some interesting thoughts for you. Feel free to contact me in case of questions.   


Here is the paper! mps_showcase.pdf

Objectflow - the first release

posted Feb 21, 2012, 1:38 AM by Daniel Stieger   [ updated Feb 21, 2012, 5:32 AM ]

Instead of discussing language modularization, -composition or -extension in theory, i am going to give you a brief 
glimpse from a practical perspective by pointing out some major aspects of our business-application DSL´s: objectflow and
forms. Both DSL´s were built with jetbrains Meta Programming System. In this blog entry i will focus on objectflow since
we issued the first release of the DSL this week. 

Objectflow builds on the ideas of Eric Evans´ paradigm of domain-driven design (DDD). Any data (entities or value objects
in DDD terms) can be modelled as objectflow business objects  with various attributes and references. For example, an
invoice with invoice positions is modelled as a business object invoice containing a collection of invoice position business
objects. The invoice becomes a so called “root aggregate”, when functionality or operations are added in a dedicated invoice
service. Basically, all necessary functionality has to be put into a service and in turn, the service has to be related to a
business object. Thus, although Objectflow services can be written in plain java, the structure and building blocks of
services are standardized. Particularly this standardization results in more transparency and higher code quality by also incorporating
the flexibility of the java language itself.



 Example of invoice service





Objectflow also takes advantage of a very strong collection language from MPS, which can be applied in services. Building
unions of invoices or summing up a collection of invoices are central operations in business and should therefore be
supported with a very clear and handy syntax. The collection language employed with objectflow provides the means to build 
expressive queries using closures - in a way similar to Microsoft´s LINQ.

The very same high level collection language is also used in objectflow to handle database queries. Objectflow allows the
developer to create a so called “repository” containing various queries for business objects. Instead of generating java code,
SQL queries as well as their mappings to related database table fields with business object properties are generated automatically.
Thus the developer is no longer challenged by technical implementation details like mapping or database querying. 

 Example of database query





Of course, objectflow actively supports test driven development. Developers can create a new executable testsuit - tailored
to test business logic- with just one click. The testsuit contains pretest-data and posttest-data, both described in simple
json-notation. Pretest-data contains necessary data saved in business objects, which gets built and initialized before running a test.
Posttest-data contains expected outcomes which are compared with actual data from the test by posttest-checker methods.
To get a service tested, just shovel some pretest-data into a service and check it after execution with expected results.
In our initial case of invoices, one can test a booking services with a pretest invoice and posttest booking lines. 

 Example of test suit


Feel free to contact me for further explanations. In the forthcomming blog entry, i am going to present some code examples 
and screenshots from the forms DSL. See you soon...

Screencasts added

posted Jan 10, 2012, 12:40 AM by Daniel Stieger   [ updated Jan 10, 2012, 8:49 AM ]

Starting in October 2010, modellwerkstatt developed three domain specific languages (DSL) in order to model the requirments of business applications. The DSL´s are programming languages pretty close to java, but with unique features to easy and accelerate the development of business applications. Major features common to standard business applications are implemented in code generators. This is not only improving time to market, but also increasing standardization and code quality. Please refer to Martin Fowler to get a more in detail explanation of the theory behind DSLs (http://martinfowler.com/bliki/DomainSpecificLanguage.html).


The three languages were developed in Jetbrains MPS:

  1. objectflow: a fast object relational mapper. Objectflow can query databases, convert results in BusinessObjects and save BusinessObjects to a database with appropriate transaction handling. Although various relations are supported, no additional SQL knowledge is needed.Code is generated for the mybatis sql mapping framework.  

  2. forms: a user interface design language. Forms addresses all features needed to develop ERP styled user interfaces, i.e. tabular views, form views, editing windows, wizzards, workflows and a application trees. Code is generated for the Apache Pivot RIA framework.

  3. fopland: a language to define printing layouts. In order to print BusinessObjects on various printing systems, fopland allows for the definition of so called printing stylesheets. The fopland code-generator converts those fopland stylesheets to xsl-fo. Common known formatting systems like apache fop can be use to create pdf documents then.


We have created two sceencasts to point out the power of DSL modelling. A simple BusinessObject “customer” should be handled. The whole business application is built from scratch. In screencast 1 we are creating the application with a view, in screencast 2 we add editing features to the application. Hope you enjoy the videos …  although we have German versions only right now...


The next screencasts will be available in english. We will demonstrate input validation, wizzards, advanced queries and how a service can be implemented with a powerful collection language and preconditions. Stay tuned! 


Some Progress with ObjectFlow and Modelestic

posted Aug 26, 2011, 5:54 AM by Daniel Stieger   [ updated Aug 26, 2011, 6:05 AM ]

Currently, we are developing a business application involving a large database, some business logic and a user interface. The whole application should be modeled with a domain specific language in order to ease communication between stakeholders, increase software development productivity and foster technology independence. With this post, i just want to give a brief overview over the two languages employed in this project: Objectflow and Modelestic.

Jetbrains Meta Programming System (MPS) was chosen as language workbench to implement our two DSL´s. Right know, MPS supports java technology with a complete java model called baseLanguage out of the box. Thus, our two DSL´s were built on top of the baseLanguage, inheriting a good deal of features like expressions or data types from there. Drawing heavily on the MPS baseLanguage was the main reason for using MPS and relying on java. However, java is wide spread in business application environments anyway.

Instead of developing one single DSL for this project, two languages – namely (1) Objectflow and (2) Modelestic – were devised. Objectflow primarily focuses on data structures and business-logic, whereas modelestic is a DSL to model user interfaces (UIs).


Lets first turn to Objectflow. The DDD (domain driven design) paradigm of Evans (2009) can be understood as the foundation of Objectflow. The DSL supports modeling of
  • business objects: the data objects used by the application, e.g. invoice and invoice positions
  • services: operations offered (the business logic iteself)
  • repositories: database save / query operations, e.g. findInvoiceByDate()
  • applications: main entry point, setup and interconnection of all objects like services, repositories …

In order to handle business logic easily, additional high level concepts like a collection language to express operations on lists of objects were included. Therefore, reordering or summarizing receipts and their positions can easily accomplished. Furthermore state-machines and transaction constructs are included. Objectflow's code generators build upon jdbc, mybatis and google juice.


Modelestic is used to model necessary UI´s. Following the ideas of Just-UI (2009), the developer can simply define ui s as list views (display multiple objects of the same type in a table) and form views (display one object at a time). These two patterns can be combined in a master-detail view. The views as well as java controllers are completely generated for the apache pivot toolkit, allowing development of desktop applications and applets (RIA).


The following pictures should give an impression of the DSL s and the outcome generated.


     (1) Main Application Configuration in Modelestic







      (2) Creation of a BusinessApplication Editor for WeBelege




     (3) A fully generated Client based on objectflow / modelestic





DSL - switching from Xtext to MPS

posted Feb 22, 2011, 9:40 AM by Daniel Stieger   [ updated Feb 25, 2011, 12:18 AM ]

According to wikipedia, "a domain-specific language (DSL) is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique." Currently we are aiming at a DSL in order to describe medium sized enterprise-applications. In accordance with domain-driven-design (DDD) we want to describe entities and services with our DSL, additionally we need a type document and worklfows (statemachines) for documents.

While implementing DSL's in declarative style is quite easy to accomplish with xtext (i.e. an entity declaration language), defining control flows get's quite consuming (e.g. for services). After introducing statements and expressions in our DSL, the xtext language structure got more complicated than we imagined. Furthermore, a typesystem was needed and new requirements towards a collection language (analogous to the collection language in xtend) emerged. To put it briefly, we found ourself implementing a DSL which embeds elements of a programming language. A lot of work, a lot of errors, a lot of problems. Would n it be smart to built our DSL on top of basic language elements (like expressions or a collection language)? This would allow us to focus more on our problem domain.

This is where language orientated programming and MPS from jetbrains comes into play. MPS allows you to built a DSL on top of a java base-language implementation. Of course you do not have to embed all language elements available in java. Just select those important to your DSL (e.g. expressions). Following this idea (after evaluating MPS), our approach changed slightly. Instead of developing our DSL from scratch, we rely on jetbrains java base-language implementation and build our DSL on top.






Starting with MPS seems the be a little bit harder compared to xtext since MPS is more abstract at a first glance. However, plenty of documentation and tutorials are available which allow self-study. We found the following tutorials especially helpful (starting from basic to more sophisticated topics):

  1. MPS calculator-tutorial:  http://www.jetbrains.com/mps/docs/tutorial.html

  2. LWC11 MPS tutorial: http://code.google.com/p/mps-lwc11/wiki/GettingStarted

  3. Mirko Richter´s MPS tutorial:  http://www.compago.de/confluence/display/md/Extending+MPS+BaseLanguage+by+Example+-+Complete
    (very interesting tutorial - shows base-language enhancements. You can find his tutorial as printable pdf in the attachments section below, images
     are rescaled and embedded between the text )

Good luck while doing "monkey see, monkey do" ....





1-8 of 8

Comments