You want us to write a template to generate master-detail forms? You could try to extend our GUI templates to add a master-detail form, it currently has master-detail in a 2-form way generated into the code.
Get TemplateStudio from the extras section of the v2.0 downloads in the customer area, and the SDK of course, and you can simply alter the existing templates and add new templates.