Embed a Xojo Application within another Xojo Application?

I’ve been reading with much interest about embedding Xojo within an iframe using the appropriate WebAppSecurity Options. I’ve done that before and it was pretty slick. I write what I suppose I might describe a Micro Front Ends using Xojo. Instead of a monolithic application, I’ll write a dozen individual small single page applications…but I want to “group” these applications inside an “application switcher” also written in Xojo. The parent application would manage access the the various MFE apps etc. An update to one of the MFE apps wouldn’t require a grand re-compile of the master application. I didn’t want to create a dozen containers and switch between them. The apps may or may not even be hosted by the same server. To test, I created a simple Xojo Web app and tried to run it inside a WebHTML Viewer Control in another Xojo Web App. It doesn’t display. I’m thinking maybe no bueno since click events inside the WebHTML view control would go…where? (ideally they would received by the embedded application). Is there some world in which this works?

I have been embedding Xojo Web 1.0 apps in Xojo Desktop apps for years. I have also embedded Xojo Web 1.0 apps within an iFrame in other Xojo Web 1.0 apps. It all works well. On occasion I’ll even run one or more Xojo Web 1.0 app/servers in “shells” within my Xojo Desktop apps. I find building UI’s in Xojo Web 1.0 to be superior in most cases to doing it with Xojo Desktop. It allows me to “scale” the interface to fit the screen it’s on and also “cast” the interface onto another device. As you can maybe tell I’m not a fan of Xojo Web 2.0. There are just too many features missing for it to be a viable replacement to the great Xojo Web 1.0 product and I refuse to spend my valuable time developing all the required “workarounds”.

If you need help with this feel free to reach out.

1 Like

Thanks Bart…good to know. Actually…ALL of my current Xojo Web Apps are the 1.0 variety. I tested this idea with 2.0 (which didn’t work for me) — but for what it is…my Web Apps are hosted by servers that are somewhat old and do not support Xojo Web Apps beyond 2019 R4. I’d have to update the entire server OS to get the support…which isn’t my call…and the answer is pretty much…No. I do have some newer servers I could use to host newer 2.0 app…so I thought I would try to build it that way… I’ll give 1.0 a spin and see if that works out better for me.

As you may have noticed on the forum recently I am very disappointed in the direction Xojo has taken with this Web 2.0 product. It may be a great fit for many of the “loudest voices” on this forum but it’s not a valid replacement for the great Web 1.0 product the silent majority of us have relied on for years, especially the many “citizen programmers” that historically have made up the core of Xojo enthusiasts. One can always hope that Xojo and company will wake-up and release a Web Classic product based on Web 1.0 rather than “abandon” so many of us loyal Xojo supporters.

3 Likes

Maybe I’ve been drinking the Kool-Aid but I do find several of the 2.0 ideas hopeful. I do find that my Web 1.0 apps require a non trivial effort to update for 2.0. So I get it. There are things that work intuitively in 1.0 that seem less so in 2.0, but maybe that’s because I’m just used to 1.0?

1 Like

Interesting paradigm. Can you point to any publicly available repos or samples? I’ve used the original Aloe Express within desktop apps to provide APIs which are consumed by other apps (both desktop and mobile). But never a web application. I can envision some potential use cases for that though.

Obviously if you want to support Mobile you need to design a specific API for that. But in a number of my large-scale desktop apps I run a desktop app with an HTML viewer and I generate my UI using a webapp. I’ve used several methods to communicate between Desktop code and Webapp code. Usually the webapp server is running in a shell within the desktop app so I can pass messages back through the shell interface. One of my favorite ways to communicate between between these apps, though, is by using the Postgres Notify event.

https://docs.xojo.com/PostgreSQLDatabase.Notify

In a current large-scale project I have two Xojo desktop apps (one for communication with external devices and one for data presentation screens) plus two Xojo Web 1.0 apps, one to provide the UI and one to provide graphical presentation data. All of this running behind the scenes in a single installable application. Additionally using this method I can launch multiple copies of the UI and/or multiple copies the graphical presentation (showing completely different images and data) and cast them onto any number of devices connected to the network (even an iPad).

An ancillary benefit to this approach, of course, is that I can scale the UI (and also the presentation screens) to fit virtually any display they happens to be on. Plus the fact that an application with so many separate processes takes full advantage of all the multiple CPU cores available to it. Because of that it runs surprising well on bare minimum hardware even the Raspberry Pi.

As you pointed out this is an interesting paradigm. I would have considered offering to present it in a session at the Nashville Developers Retreat. But unfortunately it’s based on Web 1.0 and as we know Web 2.0 is a tool designed for totally different purposes and needs and the great Web 1.0 tool is gone. Oh well !