This is an architectural question pertaining to distributing desktop applications on Windows, Mac and/or Linux - not looking for software/framework recommendations.
Much has been written on the various advantages/disadvantages of Single Page Applications (SPA - React, Vue, Svelte, etc...) vs Server Side Rendering (SSR - Ruby on Rails with TurboLinks, Django, Node, Elixir/Phoenix etc...) approaches.
Some starting points for this debate:
Taking the usual risks inherent in summarizing a complex topic:
SSRs offer great developer ergonomics as people can develop most of their application in their favorite back-end language of choice and their are clever workarounds to keep performance good enough for nearly all use cases BUT a weakness is that full offline usage cannot be catered for!
Potential Solution for Critiquing
Deploy a small embedded web/http server in your desktop application written in your backend language of choice (Elixir, Ruby, Python, Node, Deno,....) and then you will have the advantage that (1) performance will be even better than SSR (can't beat localhost) and (2) you will be able to continue working when offline.
Some downsides that I can think of would be:
- You would need to package a full runtime with your app or at least ensure that the client has (say for example) Python version 3.x.y installed on his machine and that it is in the Path etc...
- Distributing updates will be more difficult than just deploying to your own web server - but whatever update script is run is largely just copying new text files over old text files so this seems achievable
- Data will have to be kept client side (for true offline availability) in some sort of synchronizing database like CouchDb but there seem to be a number of potential master-master syncing database available. This may not be feasible for a large db or sensitive information.
In practice I would see this being achieved by launching a "controller" executable that (1) starts up your web server on a free port and then (2) launches your default web-browser in a similar style to how PWAs are launched (in a dedicated window sans browser ornamentation). The same "controller" would be responsible for stopping the web server when the user exits the browser window.
Are there any other disadvantages that I am not thinking of above?