Web Pages/Dialogs/Containers and General Web 2.0 Best Practices


I’m in the process of developing a web application for our company.
Currently, I have a home webpage that contains a vertical navigation sidebar (from Building a Vertical Navigation for your Web Application – Xojo Programming Blog)
which makes the corresponding web container visible based on the navbar item selected. Each web container has a listbox grouped with buttons to add records as well as view/edit/delete selected records in the listbox. I have relied very heavily on web dialogs to add/edit/delete or view data and have even nested web dialogs in other web dialogs in some cases. I have noticed some latency when the home page loads and I’m wondering if this could be due to all of the containers and their corresponding web dialogs being loaded at once. Currently I have been dragging the web dialogs into the control pane to add them to the other containers & dialogs.

My questions are:

  1. Is it better to load the dialogs individually at runtime in code say, for instance, when an event is triggered?

  2. Instead of over-relying on web dialogs, is it considered a better practice to break an application up into web pages and/or web containers instead?

  3. Are there any good Xojo web resources or open source projects (other than Eddie’s Electronics) out there I can look at to help me get an idea on how to develop a nice, responsive UI?

I’m still learning how to implement things efficiently and optimize performance in a web app. Since this is an Intranet for a smaller company, I don’t anticipate more than 20-50 concurrent users. However, the application will inevitably increase in size and scope, so I would like to get the basic functionality ironed out.


#2 web pages and/or web containers are always the right answer, but:

Also consider a WebPagePanel design. I have a WebPagePanel at the base of my WebPages. Panel 1 has the list of items, Panel 2 has the Container used to Edit an item, and Panel 3 has my Help Container. I find this the simplest design to program.

1 Like


some questions for @David_Cox or anyone wants to answer:

  • inside the panel, do you insert controls directly or do you use a container with its controls inside?
  • if you use a container, do you dynamically load it at runtime when you enter the panel?
  • do you think/know whether for the efficiency and stability of the published application it is indifferent to use pages with controls (textboxes, buttons, etc.) directly inside or pages with tabpanels, containers etc inside?

thank you.

  1. More often than not I place Containers on my PagePanels.
  2. No, I drag the container onto my WebPage in the IDE.
  3. I do what is easiest for me to build and maintain. I don’t know whether it is faster place Objects directly rather than first on a Container – I guess Container might be a bit slower, but as I use a lot of Containers in multiple locations, I rarely care for efficiency.
1 Like

thank you @David_Cox, I will try.

I use containers quite a lot on Web apps, but I do not show and hide them with all the containers on a single Web page but rather I use multiple Web pages each with their own dedicated containers.

1 Like

I do the same as Tom. The main reason that I use a container on each page is so that I can place all the controls in the container and make the container size just wide enough to fit all the controls. Then lock all controls to the left and top. Now place the container on the page and only lock the top. That will center all the controls on the page with the correct spacing when displayed in the browser. If you want to stretch a weblistbox, place it on the page and lock left and right.