Web2.0 was supposed to be a modern framework, but unfortunately it inherited many of the problems from web 1.0.
The Shown event in pages is one of those big problems, while other frameworks try to focus on pre-rendered pages, Xojo has a pretty bad event order that make it look bad and feel sluggish:
First SHOW the uninitialized controls
Make a roundtrip to the server to know what to initialize
Move things around in front of the user worsening perception of slowness
Is there any workaround to initialize controls before those are shown to the user?
For example, to resize some element depending on the page width.
In web, Good Idea/Bad Idea… it all depends on the framework capabilites.
A really common example, You have an UI element with a MaxWidth of 900px (a table for example), if the Viewport is smaller it could be smaller up to the Viewport MinWidth, but if yo have a Maximized window larger than 900px the table should be 900px centered…
Acording to xojo, you should show the table and after the fact, resize it.
That is relative… They dont exist on the DOM, but the DO EXISTS virtually on the server, so with a proper desing, it should be posible to use code to initialize the controls on the opening event, Then the client framework can create the controls on the DOM and inmediatly aply the initializing code.
Xojo Web is not HTML/CSS/JS plain, xojo web has a managed framework. Your better off creating different pages for different purposes just like ios where a screen is more like a form. you can close a page if you don’t need it anymore in memory or keep it unclosed to be able to switch back (again like ios view hiërarchie).
It’s best to go with that xojo provides rather than to go the HTML/CSS/JS thinking (e.g. websites), remember it’s a Web Application.