For some reason I never came across this before, but it seems there is something of a movement (complete with manifesto) promoting client-side-only web apps.
According to the Unhosted site:
By “unhosted web apps” we mean browser-based apps with no server-side backend. Unlike server-side or client-server apps, unhosted web apps leave users in control of their valuable user data and privacy, by default.
I’m a big fan of writing client-side apps using the web standards stack (JS, CSS, HTML) for many of the reasons stated on the site, including not least the fact I don’t need to provide an actual hosting platform – users can run the app locally, or access it from an app store (e.g. Edukapp) or a shared collaboration environment (e.g. Apache Rave).
Publishing a web application in this way means you can also make it available as open source software, allowing it to be forked and modified by users, and also potentially bringing in contributions and improvements from a wider community.
So, even when the intention is to create a web app that will work in a particular hosting runtime such as Apache Wookie, I always start with creating a working web app that will run in the browser without any server-side services. So, you can use the following apps directly in the browser or host them in Wookie:
(You can also run them locally in the browser – download the .wgt version, change the file extension to .zip and extract the contents)
I can then add tests for injected features provided by the runtime, and make use of them where available. For example, multi-user collaboration via the Wave API in Wookie, or inter-widget communication in Rave. Also even for things like storage, I can test whether widget.preferences is available, or default to localstorage. (Maybe in future I might want to give remotestorage a go, which provides more storage options for the user.)
I tend to opt wherever for possible for highly generic back-end services such as storage and communication, rather than creating a tightly-coupled set of services for each application. For some, this seems like an odd restriction, as you have so much freedom to do nice things on the server side (e.g. using NodeJS). However, it does make the apps much more portable and reusable, and avoids a lot of configuration hassles.
Even where it is necessary (at east for now) to use a server-based back-end, such as for collaboration or multi-user games, I created WaveNode as a generic backend in NodeJS so you don’t need to run a dedicated server-side component for each app, and the apps themselves will work anywhere there is a Wave Gadget API implementation (e.g. Apache Wookie, Apache Wave etc).
So I guess I’ve been in the Unhosted movement for a while now without realising it!