the world of model driven development

Posts tagged ‘modeling’

It’s the end of the world

We have all seen it before,the Chrysler building decimated by some apocalyptic disaster of some kind in various world ending scenarios at the movies, but this year it’s going to be different. Yes, 2012 is the end of the world. Not only a leap year too but a year filled with tons of fresh blog posts, already in the pipe line.

You might ask yourself why write a blog post if the world is going to end? The answer is, “Well, we just like modeling so darn much we don’t care if it all ends tomorrow”

Happy modeling for 2012!

Get Create – A solution to the dilemma of using Entities in quantum states.

A common problem I come across in developing Mendix applications is when I have to manipulate an entity in a microflow which may or may not exist. This quantum  occurance would occur when having to update an entity from a 1-1 relationship, or on a 1-* where the child entity (on the many relationship side of things) is also related to a secondary attribute, such as a day or version.

When dealing with this situation you have to try retrieve the entity using the relationship or Key Attribute(such as date), check if it exists, if it doesn’t  create the entity with the new Key Attributes. This now leaves us with two  entities which have to be manipulated seperately or reretrieve the entity into  a common name.

Going with the first case lets look at what my first pass solution would look like on the following Module:

As can be followed from the above microflow there will be much duplication of logic, and complication of the microflow at quick inspection.

Note: When checking to see whether an entity I retrieved exists I like to create an exclusive split with the caption ‘Exists?’ and the formula ‘not($Entity=empty)’. This keeps the reading of the flow in the positive light rather than negative.

The solution I follow now as my standard practice in these circumstances is to create a microflow called Entity_GetCreate which will handle this retrieve or create logic for me and return the respective entity so that I dont need to concern myself with handling these cases seperately.

This GetCreate microflow for the above entity would look as follows:

Which results in the original microflow being simplified to:

Much easier to read for business and mendix users.

Model Driven Development and Beyond!

Model driven development and beyond! See what I discover what works and what doesn’t.

I will be blogging on my Mendix development experiences and Modeling in general. The challenges that await the world of interdependence between business and IT. So, here we go.

Adventures await!

Design a site like this with WordPress.com
Get started