You are right on all points.
The question is does this result in one big file (JSP, etc) that contains everything?
To avoid the problem of creating a huge honking HTML page you need to think of Content Chunking and granularization. Still complexity can arise and it asks the question how to manage the complexity. The answer lies in creating Content Chunks using JavaScript.
Here is how I would do it. Following is the URL to load the main content.
http://mydomain.com/main The main page needs a menu and downloads the menu at the URL
http://mydomain.com/main/menu Where things are different is that the downloaded content is not HTML, but JavaScript. The downloaded JavaScript is a self-contained chunk that contains the logic of how to create the menu. The main resource contains an incomplete type when called will execute the appropriate logic. Following is the source code that is executed to illustrate an incomplete type. The variable async.onComplete is the asynchronous XMLHttpRequest callback.
asynch.onComplete = function( status, statuscode, text, xml) {
evals( text);
menu.create(); // Incomplete type
}
The variable menu is an incomplete type because when the original main resource is downloaded there is no definition for menu. To make menu complete the /main/menu chunk is downloaded, and executed. Contained within the menu.create() is the logic to create the menu.
Using incomplete types is identical to
Java components in that menu.create is the interface, and the resource /main/menu is the implementation. Using this approach allows you to modularize an Ajax application and distribute logic among individual resources. For example, when the call /main/menu is made the server could implement need to know security as the server has the ability to choose the implementation at runtime.
Does this help?
Christian