[quote=183122:@Daniel Gross]I presume you mean the following:
WebApplication → that is the application that runs on a server. Apps connect to the server via browsers.[/quote]
The second sentence is the source of confusion. At least as far as Xojo is concerned, the Web Application is the Xojo compiled application running on the server. Browsers connect to the web app which is running on the server. There isn’t a separate app running on the client browser.
An instance of Session is created when a browser connects to a Web Application. But whether there’s 1 or 1,000 connecting browsers, there’s only one web app (load balancing not withstanding).
(Technically there is a JavaScript app running on the browser, but it’s entirely behind the scenes and not directly accessible to you. All your code and all the data you create in Xojo exists on the server with no real representation on the browser. The browser JavaScript ‘app’ exists merely to keep the browser display in sync with server state and to notify the server of user actions, events.)
Yes. That’s also true if you have two Web Applications running on one server. (Why do this? To better take advantage of multiple cores.)
With Xojo it gets confusing to think of apps in browsers connecting to the app on the server (even though this is correct for some other web app scenarios/languages/frameworks). All the code you write in Xojo Web, everything you do, basically executes on the server in a single instance/memory space of the server app. (Again, load balancing not withstanding.)
In this respect a Xojo web app is very much like an ASP.NET web app. And the same thing is true there: a shared property on a class is shared across all sessions/connections.
[quote]I must admit that intuitively, I would have thought that a shared property should only be shared across one session, assuming that a session is alive for as long as an app is actively connected with the “web app” running on the server.
What is the reason that the design decision was to make shared properties, shared across all sessions?[/quote]
It’s due to the underlying architecture and where the code is executing.