Replies: 1 comment
-
There's multiple ways to interpret what you're asking - but in each of them, the answer is yes. The first interpretation is whether Toga could be used to build an app shell similar to Electron or Tauri. The answer to that is also yes - see the positron-static and positron-django examples in the Toga repository. This is an example of using Toga to build a native app that is nothing more than a "web app shell" - so, you can serve your web app inside that shell. This can be a useful approach if your app development team is "web native" and doesn't have the time or resources to upskill in native development. A second interpretation is to use the toga-web backend to generate a web page, and then package that app as an Electron or Tauri app. A Toga app with a web backend is nothing more than a single static HTML page with some WASM, CSS and graphic assets; so yes, this could be served by an Electron or Tauri app shell. The third interpretation is the mix of the first two - writing a Toga-web app, and then deploying it in a web shell. This is also possible - take the static web app generated by toga-web, and deploy it in a positron-static shell. However, if you're contemplating the second two, I'd definitely be asking "why?". Toga is a cross-platform API. If you're using Toga to build an app with the toga-web backend, the same code will also run as a native app. Toga-web exists because sometimes deploying through a web browser is a useful mode of delivery; but if your target is a desktop app or mobile phone, and you're already able to deploy to a 100% native user interface, why would you go through the complexity of serving that interface through a web browser wrapped in a single purpose app? |
Beta Was this translation helpful? Give feedback.
-
A question that arose, would it be possible to adapt an interface made in Toga (Web-Backend) to one of these libraries and export to other platforms using briefcase?
https://tauri.app/
https://www.electronjs.org/
Beta Was this translation helpful? Give feedback.
All reactions