Hitchhiker's Guide to Software Architecture and Everything Else - by Michael Stal

Saturday, February 23, 2008

Generative versus Generic Programming

Andrey Nechypurenko, a smart colleague of mine, recently brought up an excellent thought. If we already know a domain very well, why should we bother building model-driven generators? Couldn't we just provide an application framework instead? Indeed, each framework introduces a kind of language. It implements commonalities but also hooks to take care of variability. So, when should we use model-driven techniques and when should we better rely on frameworks?

My first assumptions were:

  • A DSL is much closer to the problem domain which helps different stakeholders to participate establishing the concrete model. If stakeholder participation is essential, than a DSL might definitely be the better way.
  • DSLs are (often) more productive. It is much more verbose to program against a framework than designing using a DSL. Needless to say, that we need to take the efforts for providing the generator into account.

At least in my opinion the answer could also be to use both, a framework that captures the domain's core abstractions and a generator that generates applications on top of this framework.

Any thoughts about these issues? 


  • yes. the combination of both is best practice in the MDSD community.

    By Blogger Markus Voelter, at 8:58 AM  

  • yes. the combination of both is best practice.

    By Blogger Markus Voelter, at 8:59 AM  

  • Is this combination really best practice? Will MDSD tool providers deliver such frameworks with their products?


    By Anonymous Anonymous, at 12:03 AM  

Post a Comment

<< Home