Wednesday, March 6, 2013

8 reasons why Model Driven Development is great


8 reasons why Model Driven Development is great

This article was inspired by some conference talk with some prospects that basically are worried about the dangers around Model Driven Development, which really started me thinking.
I believe there are many articles written about the dangers of Model Driven Development (MDD), many of them have valid points and some others are more of an historical and repeated nature, not taking in consideration the current developments in this area.

You'll hardly find articles saying "8 reasons because writing code manually is very dangerous", surely there are more than 8 and I was almost tempted to write some of them down. Model Driven Development has many dangers many of which come mostly from not understanding its real value. Thus, while recognizing that a number of risks written in many articles are real, I would like to enumerate some of the good things about MDD.

1. MDD actually introduces a lot of flexibility

Indeed, MDD introduces a lot of flexibility for companies and businesses. Flexibility means responsiveness to change, adaptability, both in the technical side and in the business side. If  you choose a language and hand write a solution, you may have a type of flexibility (related to power in the chosen language? ) in the short term but you are adding a lot of rigidity in the long term. So you have to take into consideration the time you want your investment in development to last, before defining which way to go.   

If you chose Silverlight, Flash, Visual Basic, Fox in the past and now you need to
create HTML5 or iOS applications: How flexible are you? How many
concepts can you reuse from your existing code? If any.


When coding by hand all you have is code, which you may but -most likely- may not reuse. In a Model Driven Development you have a model and you can reuse concepts. People creating an Android app from its FoxPro Win model are the ones who have the most flexibility in the long term.

So, Is MDD flexible? It depends. If you are a businessman or a company planning to stay in the game for the long run, then yes, Model Driven Development it’s extremely flexible.

2. Modern Models have great extensibility

Today there are models with a great extensibility at different levels and are designed to interact with hand-written code at all levels. What commonly happens is that much of this code in the medium term (if it is really very common) is incorporated into the model at some point. There are no perfect models, but many of them are useful and with great extensibility. The trick is to find a way that has the productivity advantage of MDD and the possibility of extending it when modeling is not enough.

3. Programmers can focus on what instead of how

It is great to allow people -who know absolutely nothing about Objective-C- to create business applications for iPhone and iPad that conform to the Apple guidelines, based on a model. A model that can also be used to generate apps in Android, BlackBerry or Windows 8 if required, with marginal effort. It's fantastic!

4. There are MDD platforms that support version control & continuous integration

Contrary to traditional complains against Model Driven Development, it really can support version control, collaboration, and even more. For example we have been working many years to achieve this status, and it’s fantastic to have a full version control system integrated with continuous integration tools.

5. There are great tools embracing MDD

Almost any industry uses software to increase productivity, and improve efficiency and efficacy in all operational levels, it’s an obvious approach of using software.

But the software industry is the only industry that refuses to create software using software to achieve the same goals: increase productivity, improve efficiency and efficacy. Luckily there are many companies working in a paradigm shift.

The only way to do the paradigm shift is by creating more amazing tools that create software using software.

6. The requirements team needs to focus only on the business-side

The requirements team can focus on the business side, without having to see the technical side.
It is often true that a requirement can not be met for example in a particular way due to model limitations, but this is also true in a hand coding solution!
If I request for a form with a scroll inside another scroll in an Android solution, this hardly can be accomplished and that's not because of Model Driven Development.

Because, as I said before, a big advantage of the current models is its interoperability with manually written code the worst-case scenario is to have to write something by hand, which does not invalidate most of the cases, in which the teams only need to focus in the business-side of the equation and not on how to program a particular solution.

7. Sell the solution, not the MDD paradigm

MDD is a way to create a solution efficiently, you don't need to explain MDD to the final customer, he will reap the benefits of it.
Anyway you could say that  your solution is going to be extremely flexible in the long term and that you are saving a lot of business knowledge (represented in models) for further use.

8. Technology evolution is not a worry anymore

If you have a business, you probably want to use the best technology at any particular time, but you will probably lose your focus if you need to worry about any new technology details.

Using a Model Driven Development approach you just need to focus in the model of your business, not worrying about the continuous, trending changes of the underlying technology.



So, that was my initial take on the subject, but it’s a list of reasons that can be improved.
Here Johan den Haan has more reasons to start using Model Driven Development.

Monday, March 4, 2013

Do The Harlem Shake & GeneXus Evolution 2 Upg 3

A new upgrade of GeneXus Evolution 2 (Upgrade 3) is coming.

As always this upgrade brings improvements on several areas such as usability, performance and robustness.

However in this upgrade for mobile generators we have been adding new features to create sophisticated mobile applications.


I like having fun trying out the new features. And the best way to do it is by creating some small application.

This time, because I could not get my teammates do a Harlem Shake video, I decided to create at least one Harlem Shake application ;). Basically a simple one with a catalog of Harlem Shakes, a ranking, you can find some particular one or shake your phone for a random new Shake, etc

A  feature included in this release is the ability to easily create an application with the Navigation Side pattern. This pattern is used in applications like Facebook, Gmail, YouTube, Zite, etc.. (For more about the pattern, see the Android UI Patterns blog entry).

Thus, the first thing I decided is to add this pattern to my application. This is done in GeneXus by simply setting the property to Navigation Style = Side. In this case I used this navigation style for iOS application and left a Tabbed navigation for Android.




I remember I wrote this article 2 years ago saying that Model Driven Development is slower in the initial steps but at some point you start having a more sophisticated model that covers a high percentage of applications requirements faster than coding by hand.


In this Upgrade 3 we started talking about things like transformations, effects for entering and exiting and now you can do sophisticated things using similar concepts to the ones you use when you for example change the border of a table or the color of a button.


Effects, transformations, animations, gestures are elements that we must use with care in order to create an application that is easy to use.

In U3 effects are added in the model without necessarily interfering with the programming model.
For example, if I have a call to a Panel A, the enter and exit effect of the panel are specified declaratively in a Theme.


In my application I added the Harlem Shake Curl effect to show a panel with a Harlem Shake.
So you shake your phone and the application shows a new Harlem Shake panel using a Curl Up effect and the panel exits using a Curl Down effect.



Not only UI elements were incorporated into the Upgrade 3. One extremely interesting feature that was added was Google Analytics, so you can use it in your applications to know what is happening with your application after release.

Adding this feature to your app is really easy just setting a property with an Id given by Google Analytics.
As you can see Analytics is telling me my app is not trending yet ;).




By the way I did this application in 4 days for Android and iOS and my friends from i+Dev uploaded it to the stores, even though there is someone in their team who doesn’t like my great background image ;)



You can download it now from Google Play or from appstore for iPhone or IPad