In general, it's probably best to break your application into smaller pieces that each perform a logically discrete task (as you would with any programming language).
You can gain some measure of efficiency in your dialog transitions (e.g. with <goto>) by keeping them within the same document (such transitions do not require an HTTP request), though a large, unwieldy document will be more troublesome to debug.
Any data processing to be performed by server-side scripting (PHP, ASP, etc.) and makes use of the <submit> tag and/or the "namelist" attribute (i.e. <submit> and/or certain uses of <subdialog>) must be done as an HTTP request to another document.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics