I know that you are working on ways to make web apps somehow exportable. I think a nice step in this direction would be to remove the need for realms. I sincerely find them unnecesary, and to make it worst they are mandatory!
I would just use domain templates, which should be exportable. That way we still save time in app development without compromising future deployment in another server. It would work for example as a drop down list during variable creation, and it would just set the parameters for the variable, nothing more.
In any case all domain information should be saved in the app object, to make it standalone (aside from modifying paths).