Introducing notion of a 'Widget'. A back end class can extend the widget class and in the front end ppml (wanna change to pmld and pmlw for pml document and pml widget) you can specify the associated marup file for the widget.