Single Page Web App Using Containers?

Xojo experts, would it be reasonable to build a web app using lots of containers to show different “pages”? So say you have a header of some kind and a menu and the rest of the page is a hundred (pick your number) stacked containers, each called by the menu on an as need basis. I guess the question is are containers called dynamically and not loaded into memory until they are called, thus resulting in initial fast page load time? Is this a reasonable approach or not workable in Xojo?

Thanks

That is exactly how I build all my web application. I use containers rather than web pages 95% of the time to control the flow of my applications.

Depending how you call your container will determine if it is in memory all the time. For example, if you drag and drop the container onto your page, it will be in memory for the entire life of that page, even if you hide it, or display a container on top of it. If you call it dynamically, and then close it when it is no longer needed, it will only be in memory during the time you have it displayed.

Excellent. Thanks for your fast reply Robert.

NP…there are other very knowledgable people that will likely add to this information. This site is filled with helpful experts, which, in part, makes Xojo such an excellent tool.

Yes, I’ve read quite a few posts on this forum and appreciate the many experts. Thanks

[quote=433573:@Robert Litchfield]That is exactly how I build all my web application. I use containers rather than web pages 95% of the time to control the flow of my applications.

Depending how you call your container will determine if it is in memory all the time. For example, if you drag and drop the container onto your page, it will be in memory for the entire life of that page, even if you hide it, or display a container on top of it. If you call it dynamically, and then close it when it is no longer needed, it will only be in memory during the time you have it displayed.[/quote]

Current i drag and drop all the containers into the main page and whoa dn hide them. how do i call it dynamically??? below is the code i use to call the search container when i open up the main page

Dim ccSearch1 As New ccSearch
frmMain.Append cccSearch1
ccSearch1.EmbedWithin(frmMain, 0, 0 + ccSearch1.Height, frmMain.Width, ccSearch1.Height)

Richard,
That is how you add a container control dynamically. :slight_smile: If you are doing this, and also dragging the same container control onto the page, you are in essence creating two instances of the same item.

There are a number of good discussions here related to this exact topic. A quick search will probably answer your questions.

[quote=433634:@Robert Litchfield]Richard,
That is how you add a container control dynamically. :slight_smile: If you are doing this, and also dragging the same container control onto the page, you are in essence creating two instances of the same item.

There are a number of good discussions here related to this exact topic. A quick search will probably answer your questions.[/quote]

i already remove the container control and just put it in dynamically.

how do i check if the webcontainer has been call yet? can i use “if fmMain.ccSearch1<>nil THEN”???