grokking hard

code smarter, not harder

The Humble Dialog Box and Ivy Rich Dialogs

Posted at — 2013-May-12

Today I’ve read The Humble Dialog Box of Micheal Feather and it is very interesting. The idea of the article, in Model-View-Controller (MVC) pattern, is to develop in test-first manner the Model in the beginning. All actions, all interactions should be developed and tested against the mockable interface of the View. By doing this, all the logic are encapsulted in the Model (smart object) and the View provides methods for the Model to update. It is somehow an opposite way of MVC.

Where I work, a framework called The Axon.ivy Framework is used by my company for all projects. The framework has a widely used component namedly RichDialog and it is said that the component is using MVC pattern.

I had doubted a long time ago if it was true. The Model of a RichDialog is just a simple data class (e.g Java beans) while all the logic are put in the Logic (Controller) part and they are tied together very strictly. In additions, they are hard to test.

So what will I do? I think I should consider whole part of a RichDialog is just a (big) View, the model should be developed first as plain Java classes, then we will start to see the outcome.