Pedro J. Molina discusses the concepts behind UI and challenges met trying to model user interfaces, and how code generation can be used to create UIs.
Pedro J. Molina is working on code generation, MDD, MDA, software and UI patterns since 1998. He is a Manager & SW Architect for Capgemini Spain. In 2003, he received a PhD from the Technical University of Valencia for “User Interfaces: from Requirements to Automatic Code Generation”. Pedro J. has published more than 20 research papers & 2 books. More: http://pjmolina.com/en/research.
The Code Generation conference is Europe's leading event on Domain-Specific Languages, Model-Driven Software Development and Language Workbenches. The event has a strong practical focus on sharing experiences of what does and doesn't work.
Good to see you posting some content to InfoQ. Really need to make it back to CG sometime soon to catch more of this kind of content!
Pedro J. Molina
BTW, the CG2012 Call for speakers is open till dec-9th.
I've also been working in this area since 1999, where my master thesis was focused exactly on this, surveying more than 26 projects in MBUIDE area since the 1980s.
Currently, my project Merlin (3layer.org/merlin) covers these (and other) items in great detail, focusing the runtime generation of user interfaces using adaptative models from data collected from historical environments with temporal and spatial metrics.
Whenever possible, I try to keep this research (and involved people) up to date and, of course, I will add this presentation on my radar.
Big hug and a nice work ;)
Yes, automatic UI is a good idea, but without code generation
my experience with automatic UI generation is very satisfactory: the productivity improvement is really huge and the programmers are very happy with automatic UI, indeed they cannot go back once they have tried automatic UI generation.
About the flexibility, if the framework you use is mature enough, you can develop the 99% of the app using automatic UI, at least if you are creating a typical business application. In my company we have an application with more than 300 modules (a Payroll application) and all UI of the application is generated automatically, with no custom UI.
However, I don't agree in using code generation for automatic UI. If you use passive code generation the usefulness of the UI generation is just anecdotal, because you put in the hand of the developer a big amount of code that he has to maintain for long time. On the other hand, if you use active code generation, you need a smart way to insert custom logic in order to adapt to every needed situation and at the same time continue working with the specification during all the project lifetime. Moreover, if you use active code generation when the project grows in size (and you have more that 100 modules) the time between a change in the code and seeing the change in the browser is long (maybe minutes, even using incremental code generation) and it brokes the developer creative flow.
Talking about other issue, instead of creating a DSL UI definition I prefer to use already existing artifacts in the application, in particular I like to use domain class as base for UI definition, because domain class are already there and are expressive enough to extract the UI from them, maybe adding a few metadata. I wrote an article some time ago in java.net about this issue. It was Automatic User Interface with OpenXava. I invite you to have a look at it.
Por cierto, soy de Valencia, quizás podriamos crear un Automatic UI Valencia User Group, je, je, je
Re: Yes, automatic UI is a good idea, but without code generation
Pedro J. Molina
I agree that model interpretations alleviates maintaining a great amount of code compared with code generation. This can be useful in some scenarios. As everything in life, model interpretation vs code generation has a nice balance somewhere in the middle, depending on the case.
However IMHO relaying only in annotations (Java) or attributes (.NET) (metadata in domain classes in either case) could derive in anemic UIs biased to an OO domain world view (à la Naked Objects) instead of been guided by user task or an independent UI design.
I see the UI as an independent cross concern respect to the structure of the system logic.
Of course one could derive a predictable OO UI emerged from the domain entities, but other kinds of UIs are still possible (e.g. user task based or designed by an HCI expert).